mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-26 05:17:22 +00:00
c5f186d56f
34 Commits
Author | SHA1 | Message | Date | |
---|---|---|---|---|
terence tsao
|
c5f186d56f
|
Batch save blocks for initial sync. 80% faster BPS (#5215)
* Starting a quick PoC * Rate limit to one epoch worth of blocks in memory * Proof of concept working * Quick comment out * Save previous finalized checkpoint * Merge branch 'master' of github.com:prysmaticlabs/prysm into batch-save * Test * Merge branch 'prev-finalized-getter' into batch-save * Minor fixes * Use a map * More run time fixes * Remove panic * Feature flag * Removed unused methods * Fixed tests * E2e test * Merge branch 'master' into batch-save * comment * Merge branch 'master' into batch-save * Compatible with current initial sync * Merge branch 'batch-save' of github.com:prysmaticlabs/prysm into batch-save * Merge refs/heads/master into batch-save * Merge refs/heads/master into batch-save * Merge refs/heads/master into batch-save * Merge branch 'master' of github.com:prysmaticlabs/prysm into batch-save * Feedback * Merge branch 'batch-save' of github.com:prysmaticlabs/prysm into batch-save * Merge refs/heads/master into batch-save |
||
Preston Van Loon
|
35d74981a0
|
Correctly return attestation data for late requests (#5183)
* Add functionality to support attestation requests that are older than the head state * lint * gaz * Handle nil state case * handle underflow of first epoch * Remove redundant and possibly wrong genesisTime struct field * fix remaining tests * gofmt * remove debug comment * use stategen.StateByRoot interchangably with beaconDB.State * gofmt * goimports Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com> |
||
Raul Jordan
|
1f87cb11fc
|
Use Current Time Slot for Fetching Committees in RPC (#5094)
* use genesis time fetcher * Merge branch 'master' into use-time-fetcher * fix breaking * Merge branch 'use-time-fetcher' of github.com:prysmaticlabs/prysm into use-time-fetcher * list beacon committees tests fixed * Merge branch 'master' into use-time-fetcher * Merge branch 'master' into use-time-fetcher * Merge refs/heads/master into use-time-fetcher * Update beacon-chain/rpc/beacon/committees_test.go |
||
terence tsao
|
6b8ec26c56
|
Handle nil head block in cache (#4888)
* Nil check * Fixed tests * Covered rest of the codebase * Race tests Co-authored-by: Raul Jordan <raul@prysmaticlabs.com> |
||
Preston Van Loon
|
4598344918
|
Clear initial sync state caches after round robin sync (#4817)
* Clear initial sync state caches after round robin sync * fix test mock * lint Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com> |
||
Nishant Das
|
f16a71f178
|
Revert "Update Slices More Efficiently" (#4790)
* Revert "Update Slices More Efficiently (#4789)"
This reverts commit
|
||
Nishant Das
|
669e1ea787
|
Update Slices More Efficiently (#4789)
* better cached states * lint * jim's review |
||
Preston Van Loon
|
34178aff2a
|
Strict verify attestations in pubsub (#4782)
* Verify attestations before putting them into the pool * use existing method * Validate aggregated ones too * Revert "Validate aggregated ones too" This reverts commit a55646d131813c3e65e0539ef5b2e5bda19a5e91. * Merge branch 'master' of github.com:prysmaticlabs/prysm into verify-all-atts * Add feature flag * The remaining shared reference fields with conditional copy on write * Merge branch 'master' into better-copy-2 * Merge branch 'better-copy-2' of github.com:prysmaticlabs/prysm into verify-all-atts * gaz * fix build, put into validate * lint * Merge branch 'master' of github.com:prysmaticlabs/prysm into verify-all-atts * why does goland do this to me * revert unrelated change * fix tests * Update shared/featureconfig/config.go Co-Authored-By: terence tsao <terence@prysmaticlabs.com> * Merge refs/heads/master into verify-all-atts * Update beacon-chain/blockchain/testing/mock.go Co-Authored-By: terence tsao <terence@prysmaticlabs.com> * gofmt |
||
Raul Jordan
|
a9d144ad1f
|
Stream Blocks Functionality for RPC (#4771)
* stream blocks functionality included * necessary tests for stream blocks and notifier * gazelle and tests passing * gazelle and tests passing * Merge branch 'master' into stream-block * Update beacon-chain/core/feed/block/events.go * Merge refs/heads/master into stream-block * Merge refs/heads/master into stream-block * Merge refs/heads/master into stream-block * Merge refs/heads/master into stream-block * naming * build * Merge refs/heads/master into stream-block * Merge refs/heads/master into stream-block * Merge refs/heads/master into stream-block * fix up tests * Merge branch 'stream-block' of github.com:prysmaticlabs/prysm into stream-block * Merge refs/heads/master into stream-block * shay comment * Merge refs/heads/master into stream-block * Merge branch 'stream-block' of github.com:prysmaticlabs/prysm into stream-block * Merge refs/heads/master into stream-block |
||
terence tsao
|
f77049ae74
|
Handle attestations with missing block (#4705)
* Fmt * Starting * Cont * Store aggregate attestation is better * Conflict * Done * Merge branch 'master' of git+ssh://github.com/prysmaticlabs/prysm into process-pending-atts * Comment * Better logs * Better logs * Fix existing tests * Update metric names * Preston's feedback * Broadcast atts once it's valid * Gazelle * Test for validating atts and pruning * Tests * Removed debug log * Conflict * Feedback * Merge refs/heads/master into process-pending-atts * Merge refs/heads/master into process-pending-atts |
||
Raul Jordan
|
cc741ed8af
|
Ensure New State Type Tests Pass in Prysm (#4646)
* begin state service * begin on the state trie idea * created beacon state structure * add in the full clone getter * return by value instead * add all setters * new state setters are being completed * arrays roots exposed * close to finishing all these headerssss * functionality complete * added in proto benchmark test * test for compatibility * add test for compat * comments fixed * add clone * add clone * remove underlying copies * make it immutable * integrate it into chainservice * revert * wrap up comments for package * address all comments and godocs * address all comments * clone the pending attestation properly * properly clone remaining items * tests pass fixed bug * begin using it instead of head state * prevent nil pointer exceptions * begin using new struct in db * integrated new type into db package * add proper nil checks * using new state in archiver * refactored much of core * editing all the precompute functions * done with most core refactor * fixed up some bugs in the clone comparisons * append current epoch atts * add missing setters * add new setters * fix other core methods * fix up transition * main service and forkchoice * fix rpc * integrated to powchain * some more changes * fix build * improve processing of deposits * fix error * prevent panic * comment * fix process att * gaz * fix up att process * resolve existing review comments * resolve another batch of gh comments * resolve broken cpt state * revise testutil to use the new state * begin updating the state transition func to pass in more compartmentalized args * finish editing transition function to return errors * block operations pretty much done with refactor * state transition fully refactored * got epoch processing completed * fix build in fork choice * fixing more of the build * fix up broken sync package * it builds nowww it buildssss * revert registry changes * Recompute on Read (#4627) * compute on read * fix up eth1 data votes * looking into slashings bug introduced in core/ * able to advance more slots * add logging * can now sync with testnet yay * remove the leaves algorithm and other merkle imports * expose initialize unsafe funcs * Update beacon-chain/db/kv/state.go * lint Co-authored-by: Raul Jordan <raul@prysmaticlabs.com> * More Optimizations for New State (#4641) * map optimization * more optimizations * use a custom hasher * comment * block operations optimizations * Update beacon-chain/state/types.go Co-Authored-By: Raul Jordan <raul@prysmaticlabs.com> * fixed up various operations to use the validator index map access Co-authored-by: Raul Jordan <raul@prysmaticlabs.com> * archiver tests pass * fixing cache tests * cache tests passing * edited validator tests * powchain tests passing * halfway thru sync tests * more sync test fixes * add in tests for state/ * working through rpc tests * assignments tests passed * almost done with rpc/beacon tests * resolved painful validator test * fixed up even more tests * resolve tests * fix build * reduce a randao mixes copy * fixes under //beacon-chain/blockchain/... * build //beacon-chain/core/... * fixes * Runtime Optimizations (#4648) * parallelize shuffling * clean up * lint * fix build * use callback to read from registry * fix array roots and size map * new improvements * reduce hash allocs * improved shuffling * terence's review * use different method * raul's comment * new array roots * remove clone in pre-compute * Update beacon-chain/state/types.go Co-Authored-By: Raul Jordan <raul@prysmaticlabs.com> * raul's review * lint * fix build issues * fix visibility Co-authored-by: Raul Jordan <raul@prysmaticlabs.com> * fix visibility * build works for all * fix blockchain test * fix a few tests * fix more tests * update validator in slashing * archiver passing * fixed rpc/validator * progress on core tests * resolve broken rpc tests * blockchain tests passed * fix up some tests in core * fix message diff * remove unnecessary save * Save validator after slashing * Update validators one by one * another update * fix everything * fix more precompute tests * fix blocks tests * more elegant fix * more helper fixes * change back ? * fix test * fix skip slot * fix test * reset caches * fix testutil * raceoff fixed * passing * Retrieve cached state in the beginning * lint * Fixed tests part 1 * Fixed rest of the tests * Minor changes to avoid copying, small refactor to reduce deplicated code * Handle att req for slot 0 * New beacon state: Only populate merkle layers as needed, copy merkle layers on copy/clone. (#4689) * Only populate merkle layers as needed, copy merkle layers on copy/clone. * use custom copy * Make maps of correct size * slightly fast, doesn't wait for lock Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com> * Target root can't be 0x00 * Don't use cache for current slot (may not be the right fix) * fixed up tests * Remove some copy for init sync. Not sure if it is safe enough for runtime though... testing... * Align with prev logic for process slots cachedState.Slot() < slot * Fix Initial Sync Flag (#4692) * fixes * fix up some test failures due to lack of nil checks * fix up some test failures due to lack of nil checks * fix up imports * revert some changes * imports Co-authored-by: Raul Jordan <raul@prysmaticlabs.com> * resolving further conflicts * Better skip slot cache (#4694) * Return copy of skip slot cache state, disable skip slot cache on sync * fix * Fix pruning * fix up issues with broken tests Co-authored-by: Nishant Das <nish1993@hotmail.com> Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com> Co-authored-by: shayzluf <thezluf@gmail.com> Co-authored-by: terence tsao <terence@prysmaticlabs.com> Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com> |
||
terence tsao
|
5ab1efb537
|
Cached head root retrieve from DB on miss (#4552) | ||
terence tsao
|
89eedd2123 |
Efficient computation of epoch participation (#4430)
* Remove custody (#3986)
* Update proto fields
* Updated block operations
* Fixed all block operation tests
* Fixed tests part 1
* Fixed tests part 1
* All tests pass
* Clean up
* Skip spec test
* Fixed ssz test
* Skip ssz test
* Skip mainnet tests
* Update beacon-chain/operations/attestation.go
* Update beacon-chain/operations/attestation.go
* Decoy flip flop check (#3987)
* Bounce attack check (#3989)
* New store values
* Update process block
* Update process attestation
* Update tests
* Helper
* Fixed blockchain package tests
* Update beacon-chain/blockchain/forkchoice/process_block.go
* Conflict
* Unskip mainnet spec tests (#3998)
* Starting
* Fixed attestation mainnet test
* Unskip ssz static and block processing tests
* Fixed workspace
* fixed workspace
* fixed workspace
* Update beacon-chain/core/blocks/block_operations.go
* Unskip minimal spec tests (#3999)
* Starting
* Fixed attestation mainnet test
* Unskip ssz static and block processing tests
* Fixed workspace
* fixed workspace
* fixed workspace
* Update workspace
* Unskip all minimal spec tests
* Update workspace for general test
* Unskip test (#4001)
* Update minimal seconds per slot to 6 (#3978)
* Bounce attack tests (#3993)
* New store values
* Update process block
* Update process attestation
* Update tests
* Helper
* Fixed blockchain package tests
* Slots since epoch starts tests
* Update justified checkpt tests
* Conflict
* Fixed logic
* Update process_block.go
* Use helper
* Conflict
* Merge branch 'master' of https://github.com/prysmaticlabs/prysm into v0.9.1
* Conflict
* Fixed failed tests
* Lower MinGenesisActiveValidatorCount to 16384 (#4100)
* Fork choice beacon block checks (#4107)
* Prevent future blocks check and test
* Removed old code
* Update aggregation proto (#4121)
* Update def
* Update spec test
* Conflict
* Update workspace
* patch
* Resolve conflict
* Patch
* Change workspace
* Update ethereumapis to a forked branch at commit
|
||
terence tsao
|
6d2a2ebadf |
Update run time to v0.9.3 (#4154)
* Remove custody (#3986)
* Update proto fields
* Updated block operations
* Fixed all block operation tests
* Fixed tests part 1
* Fixed tests part 1
* All tests pass
* Clean up
* Skip spec test
* Fixed ssz test
* Skip ssz test
* Skip mainnet tests
* Update beacon-chain/operations/attestation.go
* Update beacon-chain/operations/attestation.go
* Decoy flip flop check (#3987)
* Bounce attack check (#3989)
* New store values
* Update process block
* Update process attestation
* Update tests
* Helper
* Fixed blockchain package tests
* Update beacon-chain/blockchain/forkchoice/process_block.go
* Conflict
* Unskip mainnet spec tests (#3998)
* Starting
* Fixed attestation mainnet test
* Unskip ssz static and block processing tests
* Fixed workspace
* fixed workspace
* fixed workspace
* Update beacon-chain/core/blocks/block_operations.go
* Unskip minimal spec tests (#3999)
* Starting
* Fixed attestation mainnet test
* Unskip ssz static and block processing tests
* Fixed workspace
* fixed workspace
* fixed workspace
* Update workspace
* Unskip all minimal spec tests
* Update workspace for general test
* Unskip test (#4001)
* Update minimal seconds per slot to 6 (#3978)
* Bounce attack tests (#3993)
* New store values
* Update process block
* Update process attestation
* Update tests
* Helper
* Fixed blockchain package tests
* Slots since epoch starts tests
* Update justified checkpt tests
* Conflict
* Fixed logic
* Update process_block.go
* Use helper
* Conflict
* Merge branch 'master' of https://github.com/prysmaticlabs/prysm into v0.9.1
* Conflict
* Fixed failed tests
* Lower MinGenesisActiveValidatorCount to 16384 (#4100)
* Fork choice beacon block checks (#4107)
* Prevent future blocks check and test
* Removed old code
* Update aggregation proto (#4121)
* Update def
* Update spec test
* Conflict
* Update workspace
* patch
* Resolve conflict
* Patch
* Change workspace
* Update ethereumapis to a forked branch at commit
|
||
terence tsao
|
30b4b045f5 |
Add justified check points to chain info getters (#4335)
* Add justified checkpoint getters * Use it for chainhead * Mock * Fixed tests * Fixed TestServer_StreamChainHead_OnHeadUpdated * Caught a run time bug. Fixed Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com> |
||
terence tsao
|
2e4908e7c4
|
Optimize committee helpers (#4328) | ||
terence tsao
|
3e15e2fc1e |
Add operation feed (#4215)
* Events * Notifiers * Refactor * Gaz * Fixed rest * Lint * Lint * Visibility * Typo * Typo * Apply suggestions from code review Co-Authored-By: Nishant Das <nishdas93@gmail.com> |
||
Raul Jordan
|
0326be86b5 |
Apply Patch Rules to Use EthereumAPIs Generated Protos in Prysm (#4112)
* starting on patch * finish determining all required patches * properly redefine the patch rules * new patch * rem double semicolon * fix patch file * Merge branch 'master' of github.com:prysmaticlabs/prysm into deprecate-eth-protos * building the deps * test target passes using ethereumapis * compile gateway * attempting to build everything * e2e use ethereumapis * more fixes for slasher * other item * getting closer to compiling slasher * build slasher package * Merge branch 'master' into deprecate-eth-protos * Merge branch 'master' into deprecate-eth-protos * fix benches * lint gazelle * Merge branch 'deprecate-eth-protos' of github.com:prysmaticlabs/prysm into deprecate-eth-protos * proper gateway * lint * Merge branch 'master' into deprecate-eth-protos * fix build * Merge branch 'deprecate-eth-protos' of github.com:prysmaticlabs/prysm into deprecate-eth-protos * use swag * resolve * ignore change * include new patch changes * fix test * builds * fix e2e * gaz |
||
Jim McDonald
|
9e45cffabc |
Move StateInitialized and ChainStarted to state feed (#4084)
* Migrate ChainStarted and StateInitialized to state notifier * Provide state notifier to powchain service * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Remove commented line * Merge branch 'master' into master * Merge branch 'master' into master * Merge remote-tracking branch 'upstream/master' * Merge branch 'master' of github.com:mcdee/prysm * Accept err from HeadState() as non-fatal * Merge branch 'master' into master * Merge branch 'master' into master * Merge branch 'master' into master |
||
terence tsao
|
26da7c4114 |
Nil state fallback in Blockchain.HeadState() (#4042)
* Can build * All tests pass * Update beacon-chain/blockchain/chain_info.go * Fix context |
||
Jim McDonald
|
65d920e13a |
Add generic state feed (#4004)
* Initial implementation of state feed * Add instructions on adding new events * Tidy up log messages * Tidy up mock * Update beacon-chain/core/statefeed/events.go Co-Authored-By: terence tsao <terence@prysmaticlabs.com> * Update beacon-chain/core/statefeed/events.go Co-Authored-By: terence tsao <terence@prysmaticlabs.com> * Remove unused BlockReceivedData * Rename BlockHash to BlockRoot in BlockProcessedData * Punctuation * Use correct root for block processed event * StateFeeder -> StateNotifier; fix up tests. * Add Verified flag to BlockProcessed event * Fix visibility in Bazel |
||
Nishant Das
|
6e90931837
|
Handle Missing Blocks (#3880)
* add fixes * more changes * simplify the solution * add shuffle * remove prom metric * add to mock * go doc * use non default source * add test * terence's review * all tests passing |
||
Nishant Das
|
f8c870aa91
|
Fix Failure Counter (#3850)
* fix bug * return if not ok * don't set peer status there * fix build * fix test * fix all other tests * add regression test * cosmetic changes |
||
Preston Van Loon
|
fb510a3510 |
Reject blocks from the future in regular sync (#3799)
* reject blocks from the future in syncing * fix test and gofmt |
||
Nishant Das
|
73938876b1 | better log validator votes (#3590) | ||
terence tsao
|
3ef681e649
|
Initial sync no verify block (#3586) | ||
Preston Van Loon
|
5345ddf686 |
Initial Sync: Round robin (#3538)
* first pass, step 1 works * naive from finalized to head * delete commented code * checkpoint progress on tests * passing test * abstract code slightly * failure cases * chkpt * mostly working, missing a single block and having timeout * passing tests * comments * comments * gaz * clarify comments * progress on a few new cases * add back bootnode query tool * bootstrap from DHT * chunked responses in round robin * fix tests and deadlines * add basic counter, time estimation * hello -> handshakes * show peers in use during sync * just one last test failure * only request blocks starting in the finalized epoch for step 1 * revert that * comment out test and add better commentary * move requestBlocks out to pointer receiver * mathutil * Update beacon-chain/sync/initial-sync/round_robin.go Co-Authored-By: Raul Jordan <raul@prysmaticlabs.com> * PR feedback * PR feedback |
||
Raul Jordan
|
e8b6951591
|
Complete ListAttestations EthereumAPIs v1alpha (#3452)
* retrieve attestations by block root as well * add beacon block root filter * rem err unimpl * add changes to list atts filter proto * utilize the new filter attributes * add filter types * utilize filters in the api server impl * tests for filter * tests pass * filter test done * fix test by using head fetcher instead * gaz * no panic * use new ethapis commit * elim panic * res panic * ensure proto compatibility * fixed broken test |
||
Raul Jordan
|
037c01f4d7
|
Archiver Service Definition (#3507)
* archive flags * gaz * create archiver * register archiver in node * registering the head updater feed * add more gazelle * cancel func * test for service * properly utilize the mocks * lint * remove extraneous log * add back write to disk * gaz |
||
shayzluf
|
bdb1b472b6 |
Test proccess on chainstart (#3516)
* first version of the watchtower api * first version * delete watchtower * move to message loop * roughtime * one time * fix test * add test to chain start * fix test * move logic to mock * remove unused method * remove imports * gaz * goimports * goimport |
||
Raul Jordan
|
49a529388b
|
Resolve Miscellaneous Prysm TODOs (#3465)
* resolve * resolve * return * remove deprecated protos * rem deprecated pbs * resolve cache * resolve md TODO * node server * resolve config todo * resolve even more * broken build |
||
Raul Jordan
|
af07c13730
|
[Interop] Improve RPC Codebase + Start Beacon Chain With Mock ETH1 Values (#3407)
* add main.go * interop readme * proper visibility * standardize and abstract into simpler funcs * formatting * no os pkg * add test * no panics anywhere, properly and nicely handle errors * proper comments * fix broken test * readme * comment * recommend ssz * install * tool now works * README * build * readme * 64 validators * rem print * register the no powchain flag * work on mock eth1 start * common interface * getting closer with the interface defs * only two uses of powchain * remove powchain dependency * remove powchain dependency * common powchain interface * proper comment in case of flag * proper args into rpc services * rename fields * pass in mock flag into RPC * conforms to iface * use client instead of block fetcher iface * broken tests * block fetcher * finalized * resolved broken build * fix build * comment * fix tests * tests pass * resolved confs * took them out * rename into smaller interfaces * resolve some confs * ensure tests pass * properly utilize mock instead of localized mock * res lint * lint * finish test for mock eth1data * run gazelle * include flag again * fix broken build * disable powchain * dont dial eth1 nodes * reenable pow * use smaller interfaces, standardize naming * abstract mock into its own package * faulty mock lint * fix stutter in lint * rpc tests all passing * use mocks for operations * no more mocks in the entire rpc package * no mock * viz * testonly |
||
terence tsao
|
14c59b2ff9 |
Remove deprecated services and --next (#3371)
* Save new validators in DB * Use info * Add total validator count * Fixed tests * Add new test * Revert light client config * Add state metrics back * Gaz * Mark old ones as deprecated * Deprecate not --next services * Fixed all operation tests * Fixed node test * All tests passing locally * Add deprecated-p2p back, blocked by boostrap-query * Revert message proto * delete deprecated DB items * delete all other instances of old db * gaz * cycle rem * clear db |
||
terence tsao
|
64d0826469
|
Update RPC service to use chain info (#3309) |