Nishant Das
3b2dc8346d
Release State Field Trie ( #6340 )
...
* remove flag and references
* fix flag
* Merge refs/heads/master into releaseStateFieldTrie
* Merge refs/heads/master into releaseStateFieldTrie
2020-06-22 15:25:55 +00:00
Ivan Martinez
97315c8837
Add flat spans to slasher runtime ( #6287 )
...
* Add flat spans to runtime
* Fix tests
* Remove normal span cache from runtime
* Uncomment
* beyond lookback to db
* Remove heavy span
* better cache handling for disable lookback
* Fix lint
* Fix lint again
* Add cache back for now
* Update slasher/detection/attestations/spanner_test.go
* Fix imports
Co-authored-by: shayzluf <thezluf@gmail.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2020-06-22 09:55:52 -05:00
Victor Farazdagi
6f8349cdb4
Reclaims leakybucket resources in sync service ( #6339 )
...
* Reclaims leakybucket resources
* move calls to defer
* do not reuse queue, after stopping
2020-06-22 11:23:23 +00:00
Preston Van Loon
d4545233cd
Fix race condition issues in beacon state ( #6322 )
...
* Fix race condition issues in beacon state
* Merge branch 'master' of github.com:prysmaticlabs/prysm into race-condition-fixes
* Checkout beacon-chain/state/stateutil/BUILD.bazel from master
* @nisdas PR feedback. defer unlock
2020-06-20 00:27:23 +00:00
rkapka
4f4846794a
renamed variable ( #6319 )
2020-06-19 13:46:18 -07:00
Nishant Das
7e1a61f8eb
Add Debug Endpoints For Peers ( #6304 )
...
* add debug endpoints
* gaz
* add more stuff
* add tests
* clean up
* Update beacon-chain/rpc/debug/server.go
* fmt
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-06-19 13:25:47 -05:00
Patrick
624209eba7
Fix Pagination Bug When Total Size % Page Size == 0 ( #6266 )
...
* Add failing test for pagination
* Fix failing test for pagination
* Fix other tests for pagination
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2020-06-19 09:39:12 -05:00
terence tsao
394f3ab53a
Revert "Fetch deposit data only up to canonical Eth1 height when proposing ( #6309 )" ( #6313 )
...
This reverts commit fb26b0b65c
.
2020-06-18 16:56:38 -07:00
rkapka
fb26b0b65c
Fetch deposit data only up to canonical Eth1 height when proposing ( #6309 )
...
* get data up to canonical block height
* gofmt
* simplified calculation of canonical height
2020-06-18 17:31:26 -05:00
Victor Farazdagi
90542c21dc
Implements max k-coverage greedy algorithm ( #6305 )
...
* implements max k-coverage greedy algorithm
* updates go-bitfield dependency
* gazelle
* update base aggregate
* re-arrange to shared
* clean references to atts in max cover
* max_cover: updates visibility
* fixes tests
* attestations related methods
* Merge branch 'master' into attaggregation-max-cover
* better op order
* fix comments
* removes debug stringer methods
* Merge refs/heads/master into attaggregation-max-cover
* log random seed
* Merge branch 'attaggregation-max-cover' of github.com:prysmaticlabs/prysm into attaggregation-max-cover
* Merge refs/heads/master into attaggregation-max-cover
* adds more comments
* Merge branch 'attaggregation-max-cover' of github.com:prysmaticlabs/prysm into attaggregation-max-cover
* fixes typo
2020-06-18 20:56:23 +00:00
Preston Van Loon
6926592065
Add a debug log statement when enabling dev flags ( #6306 )
...
* Add a debug log statement when enabling dev flags
* Merge refs/heads/master into add-dbg-log-for-dev-flags
2020-06-18 20:25:34 +00:00
Preston Van Loon
addc3897c4
Use STABLE_ prefix for git tag to force a relink of version ( #6307 )
...
* Use STABLE_ prefix for git tag to force a relink of version
* Add comment about STABLE_
2020-06-18 19:59:47 +00:00
Raul Jordan
7067c84c69
Stream Duties Client Implementation ( #5867 )
...
* include validator client stream
* Update validator/client/validator_attest.go
* gazelle
* rem extraneous logs
* fixing tests
* resolve most tests
* gaz
* add lock
* ivan feedback
* pass tests for update protect
* gaz
* duties gaz
* no need for canonical head slot
* fix ctx leak
* fmt
* add in feature flag
* add streaming subpackage
* add polling/streaming separation
* able to build
* fix duplicate package names
* fix polling
* imports
* confirm it works
* fixed up comment
* go lint comments
* gaz
* build
* Update validator/client/streaming/service_test.go
Co-authored-by: terence tsao <terence@prysmaticlabs.com>
* tidy
* fmt
* add stream duties to e2e
* add stream duties to e2e flags
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
Co-authored-by: terence tsao <terence@prysmaticlabs.com>
2020-06-18 13:30:05 -05:00
Jim McDonald
10af753f59
Unlock mutex on return ( #6303 )
...
Co-authored-by: Nishant Das <nishdas93@gmail.com>
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2020-06-18 11:04:08 -05:00
Nishant Das
5201403750
update herumi ( #6301 )
...
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-06-18 09:54:55 -05:00
Jim McDonald
86e9b0ae51
Ping handler timeout ( #6302 )
...
* Fix goroutine using cancelled context.
* Only close stream when finished
* Simplify function structure
2020-06-18 19:59:18 +08:00
Nishant Das
340ddf20cb
Update Node RPC Endpoints ( #6289 )
...
* checkpoint progress
* some more stuff
* fix tests
* fix tests
* lint
* fix test and initialization
* gaz
* Merge branch 'master' into updateP2PRPC
* Merge refs/heads/master into updateP2PRPC
* Merge refs/heads/master into updateP2PRPC
* Merge refs/heads/master into updateP2PRPC
* Merge refs/heads/master into updateP2PRPC
* Merge refs/heads/master into updateP2PRPC
* Merge refs/heads/master into updateP2PRPC
* Merge refs/heads/master into updateP2PRPC
* Merge refs/heads/master into updateP2PRPC
* Merge refs/heads/master into updateP2PRPC
2020-06-18 03:53:46 +00:00
Preston Van Loon
da5ab499da
Add @prysmaticlabs/core-team as codeowner for deps.bzl ( #6296 )
...
* Add @prysmaticlabs/core-team as codeowner for deps.bzl
* Update CODEOWNERS
2020-06-18 03:38:02 +00:00
Paul Nelson
c1c3b75867
Move generic HashTreeRoot funcs to //shared ( #6167 )
...
* Functions that are to be moved to //shared/htrutils captured in separate file.
* Move files into new //shared/htutils package
hash_function.go renamed to hashers.go
* Refactor to reference moved methods in new package
- Added import for htrutils to state and stateutil packages
- Update references to imported funcs (append "htrutils.")
- Updated funcs in htrutils to be exported where necessary
* Add tests
2020-06-18 10:15:13 +08:00
terence tsao
640bba8a6c
Avoid active validator count cache for genesis ( #6292 )
...
* Add helper to prevent zero hashes
* Test
* Don't use cache if it's genesis
* Regression test
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-06-17 19:48:10 -05:00
terence tsao
6781bd643b
Fix getting att pre state in sync ( #6295 )
2020-06-17 16:44:43 -07:00
terence tsao
802bdf5561
Fix GetValidatorPerformance
before/after balances ( #6293 )
...
* Add helper to prevent zero hashes
* Test
* Fix precompute validators to have before/after balances
* Update tests to use correct values
* Even better test setups
* Gaz
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-06-17 13:46:42 -05:00
terence tsao
523fc621d9
First part of block chain service cleanup ( #6286 )
...
* Add helper to prevent zero hashes
* Test
* Merge branch 'master' of github.com:prysmaticlabs/prysm
* Merge branch 'master' of github.com:prysmaticlabs/prysm
* Merge branch 'master' of github.com:prysmaticlabs/prysm
* Merge branch 'master' of github.com:prysmaticlabs/prysm
* Merge branch 'master' of github.com:prysmaticlabs/prysm
* Remove ReceiveBlockNoPubsubForkchoice and rename ReceiveBlockInitialSync
* Apply feature flag to process_block.go
* Update mock and tests
* Update beacon-chain/blockchain/process_block.go
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
* Merge refs/heads/master into bc-pkg-cleanup
* Merge refs/heads/master into bc-pkg-cleanup
* Fix mock ReceiveBlockInitialSync. Thanks Victor!
* Merge branch 'bc-pkg-cleanup' of github.com:prysmaticlabs/prysm into bc-pkg-cleanup
* Merge refs/heads/master into bc-pkg-cleanup
* Merge refs/heads/master into bc-pkg-cleanup
2020-06-17 17:11:21 +00:00
Shay Zluf
472fbd3949
Less restrictive block stream for slashing detection ( #6269 )
...
* verify sig in stream
* state cache used
* fix import
* fix import
* fix tests
* add log for proposer slashing
* fix e2e
* use chain head to verify sig
* revert fix
* remove extra line
* add line
* revert extra log
* fix tests
* terence feedback
* fix
* fix test
* remove extra setup
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-06-17 12:38:07 -04:00
Ivan Martinez
cd439adfc7
Implement flat spans cache into DB ( #6248 )
...
* Implement flat spans cache DB
* Fix interface
* Fix db func
* Gaz
* Update slasher/detection/attestations/types/epoch_store_test.go
* Fix tests
* Fix
* Fix for comments
* Fix test
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2020-06-17 10:26:08 -05:00
Raul Jordan
0bfa1ecd03
Clarify Insecure gRPC Connection Logs ( #6276 )
...
* clarify insecure conn
* fix up broken test
* Merge refs/heads/master into amend-grpc-instructions
* Merge refs/heads/master into amend-grpc-instructions
* Merge refs/heads/master into amend-grpc-instructions
* Merge refs/heads/master into amend-grpc-instructions
* Merge refs/heads/master into amend-grpc-instructions
* Merge refs/heads/master into amend-grpc-instructions
* Merge refs/heads/master into amend-grpc-instructions
2020-06-17 14:32:13 +00:00
terence tsao
af3122a9e8
Fork choice avoids redundant call to get_ancestor ( #6282 )
...
* Add helper to prevent zero hashes
* Test
* Add cacheJustifiedStateBalances
* Cache justifed balances
* Use cached justified balances
* Remove unncessary justification checks during initial syncing
* Test
* Proper locking
* Use getter
* Add CheckPointIsEqual helper
* Test CheckPointIsEqual helper
* Update finalizedImpliesNewJustified
* Better tests for finalizedImpliesNewJustified
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-06-17 08:50:10 -05:00
Preston Van Loon
4740f7ed57
pre-allocate memory for AggregateVerify ( #6285 )
...
* pre-allocate memory for AggregateVerify
2020-06-16 23:21:31 +00:00
Preston Van Loon
213be4cfbe
Verify many block attestations at once ( #6277 )
2020-06-16 14:19:10 -07:00
Preston Van Loon
5fa3bbb991
Add --initial-sync-verify-all-signat as a dev flag. Issue #5176 . ( #6283 )
2020-06-16 11:06:32 -07:00
terence tsao
fe2f8a1c04
Use justified balances for fork choice ( #6272 )
2020-06-16 08:10:34 -07:00
Nishant Das
ed883c9fff
More Fixes For Powchain ( #6278 )
...
* fix issues
* add check
* Update beacon-chain/powchain/service.go
* Update beacon-chain/powchain/service.go
* Update beacon-chain/powchain/service.go
* Update beacon-chain/powchain/service.go
Co-authored-by: terence tsao <terence@prysmaticlabs.com>
2020-06-15 21:07:20 -05:00
terence tsao
4c143f4ed4
Fix underflow in resyncIfBehind
( #6274 )
2020-06-15 16:46:36 -07:00
Preston Van Loon
8097eea607
Fix underflow in SlotsSinceGenesis ( #6275 )
...
* Fix an underflow in genesis time calculation
* goimports
2020-06-15 21:56:11 +00:00
Ivan Martinez
4b4a7459d9
Fix windows DB path error and make errors more concise ( #6270 )
...
* Make DB errors more verbose, fix windows path error
* Merge branch 'master' into windows-err
* Merge refs/heads/master into windows-err
* Merge refs/heads/master into windows-err
2020-06-15 20:00:35 +00:00
Ivan Martinez
bf548d1670
Fix validator creation path ( #6271 )
...
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-06-15 12:27:45 -07:00
terence tsao
e59ee2f203
Fix validator summary reporting ( #6267 )
...
* Add helper to prevent zero hashes
* Test
* Merge branch 'master' of github.com:prysmaticlabs/prysm
* Update validator summary
* Update existing tests to work with new indices
* Remove extra log
* Gazelle
* Merge branch 'master' into fix-validatory-summary
* Merge refs/heads/master into fix-validatory-summary
* Merge refs/heads/master into fix-validatory-summary
2020-06-15 17:25:58 +00:00
Raul Jordan
83d1aa8fa2
Default BeaconRPCProvider for Validator Should Match Beacon Node's Host ( #6268 )
...
* default bind to localhost for validator
* Merge branch 'master' into validator-localhost
2020-06-15 16:52:15 +00:00
Victor Farazdagi
9d42148b93
Go mod tidy ( #6264 )
...
* updates go.sum
* go mod tidy checker
* reverts go.sum
* updates apk command
* fixes path
* show git status
* more debug info
* more debug info
* minor test
* get rid of git
* multiple checks
* test reset
* change order of checkers
* mod verify
* broken sum
* Merge refs/heads/master into go-mod-tidy
* better info
* Merge branch 'go-mod-tidy' of github.com:prysmaticlabs/prysm into go-mod-tidy
* better info
* reset
* run go mod tidy to fix
2020-06-15 16:15:54 +00:00
Nishant Das
87084ec9f1
fix issues ( #6265 )
2020-06-15 10:43:45 -05:00
Victor Farazdagi
ebd45ba336
updates go.sum ( #6262 )
2020-06-15 06:37:07 -07:00
Nishant Das
9d8420b20c
Fix Discovery Panic ( #6261 )
...
* fix dv5 panic
* add back
2020-06-15 04:22:29 +00:00
terence tsao
a9070ad725
ActiveValidatorCount
to use cache (#6254 )
...
* Add helper to prevent zero hashes
* Test
* Add ActiveIndicesCount getter for committee cache
* ActiveIndicesCount test
* ActiveValidatorCount to use cache
* Update cache on miss
* Update tests
2020-06-14 15:24:49 -07:00
terence tsao
f4e9e2f49c
Minor clean up to 6249 ( #6253 )
...
* Add helper to prevent zero hashes
* Test
* Comments
* Comments
2020-06-14 10:43:25 -07:00
Nishant Das
1dfeb645b6
Filter Peers Properly With Connection Gater ( #6251 )
...
* add new filtering
* add new tests
* gaz
* shay's review
* Merge branch 'master' into fixFiltering
2020-06-14 14:47:58 +00:00
Nishant Das
933ab6808b
mark peer as bad ( #6250 )
2020-06-14 07:10:18 -07:00
Nishant Das
f9d80e4a28
Fix Genesis Justified Checkpoints ( #6249 )
...
* handle zero hash
2020-06-14 09:02:56 +00:00
Ivan Martinez
f6ecf66d1a
Fix pubkey used in validator metrics ( #6246 )
...
* Fix validator metrics pubkey
* Merge branch 'master' into val-metrics
2020-06-14 08:28:26 +00:00
Nishant Das
caf61bd824
Use Connection Gater to Manage Peer Connections ( #6243 )
...
* use gater
* Merge branch 'master' into connGater
* Update beacon-chain/p2p/testing/p2p.go
* fmt
* gaz
2020-06-14 07:35:05 +00:00
terence tsao
87ba5a5993
Fix ancestor to return most recent root in the case of skip slot ( #6242 )
...
* Revert "remove excess copies (#6142 )"
This reverts commit c956905cf0
.
* Update ancestor function to handle skip slot
* Test
* Revert "Revert "remove excess copies (#6142 )""
This reverts commit f1222b5e77f9356dd370182808d9c1e5fc3f5e12.
* Merge refs/heads/master into fix-ancestor
2020-06-14 06:58:36 +00:00