Nishant Das
5216402f66
Clean Up State Finalizer ( #10829 )
2022-06-06 09:01:58 +00:00
Potuz
2536195be0
Change forkchoice API ( #10774 )
...
* Change forkchoice API
doubly-linked-tree changes
* protoarray changes
* blockchain tests
* rebase and fix conflicts
* More blockchain fixes
* blockchain test fixes
* doubly linked tree changes again
* protoarray changes v2
* blockchain packages v2
* Radek's review
* Fix on batch processing
* Terence's review
* fill in at start
* Revert "fill in at start"
This reverts commit 8c11db063a02a59df8e0ac6d0af0c8923921dc76.
* wrap error message
* fill in before mutating the state
* wrap nil node errors
* handle unknown optimistic status on init sync
* rename insert function
* prune on batches only after forkchoice insertion
Co-authored-by: terencechain <terence@prysmaticlabs.com>
2022-06-05 17:48:21 +00:00
terencechain
a4b9e006af
Fill missing payload ID ( #10803 )
2022-06-05 05:34:08 +00:00
Nishant Das
d099c2790b
Add Back Timestamp Related Deposit Processing ( #10806 )
...
* use it
* add test
* fix
Co-authored-by: terencechain <terence@prysmaticlabs.com>
2022-06-04 01:58:03 +00:00
Potuz
2fc3d41ffa
goppelganger -> doppelganger ( #10816 )
...
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2022-06-03 22:53:58 +00:00
Jim McDonald
2e4174bdd6
Set fee recipient validator index as per spec. ( #10814 )
...
The beacon API specification states that the `validator_index` field of
the `fee_recipient` structure is a quoted string rather than a bare
integer. This fixes up the encoding to match the spec.
Co-authored-by: james-prysm <90280386+james-prysm@users.noreply.github.com>
2022-06-03 21:52:17 +00:00
kasey
a170fd4bd6
Revert "Change name and return type of HighestSlotBlocksBelow ( #10811 )" ( #10818 )
...
This reverts commit 0e9dfe04a1
.
Co-authored-by: Kasey Kirkham <kasey@users.noreply.github.com>
2022-06-03 18:36:06 +00:00
terencechain
3e36eacd1e
Add registration DB methods ( #10812 )
2022-06-03 15:13:04 +00:00
kasey
0e9dfe04a1
Change name and return type of HighestSlotBlocksBelow ( #10811 )
...
* HighestSlotBlocksBelow to return a single value
* HighestSlotBlocksBelow->HighestBlockBelowSlot
Co-authored-by: Kasey Kirkham <kasey@users.noreply.github.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2022-06-03 07:16:34 +00:00
Radosław Kapka
302a5cf00b
API SSZ content negotiation ( #10760 )
...
* API SSZ content negotiation
* custom code
* use raw string
* code review feedback
* remove duplicated test
2022-06-02 22:13:58 +00:00
kasey
c72f1af951
rewind cursor upon nil value (bucket) ( #10802 )
...
Co-authored-by: Kasey Kirkham <kasey@users.noreply.github.com>
Co-authored-by: Nishant Das <nishdas93@gmail.com>
2022-06-02 04:06:19 +00:00
terencechain
2bc3ef29e0
Wrap unknown RPC errors ( #10793 )
2022-06-01 16:46:07 +00:00
terencechain
bc91d63fcf
Add builder service skeleton and flag ( #10789 )
...
* Add builder service skeleton and flag
* Fix build
2022-06-01 15:12:15 +00:00
Potuz
8f18920ac7
Update forkchoice justified on init sync ( #10801 )
...
* Update forkchoice justified on init sync
* handle err
* add regression test
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2022-06-01 14:13:47 +00:00
terencechain
95c140b512
Validator client: add submit registration ( #10785 )
...
* Add client registration methods
* Mocken
* Run mockgen
* Fix bad tests
* Fix rest of the tests
* Tests
* Fix time tests
Co-authored-by: james-prysm <90280386+james-prysm@users.noreply.github.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2022-06-01 01:53:25 +00:00
kasey
7563bc0444
HighestSlotBlocksBelow, but in reverse ( #10772 )
...
Co-authored-by: Kasey Kirkham <kasey@users.noreply.github.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2022-05-31 21:10:33 +00:00
terencechain
2de2000eb7
Add back finalized info in new block log ( #10792 )
...
* Add back finalized info in new block log
* Better refactor
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2022-05-31 17:44:36 +00:00
Potuz
b582ca27e6
Forkchoice fill chain ( #10783 )
...
* Move chain inclusions to forkchoice handling
* gaz
* return early if no blocks are pending
* Terence's review
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2022-05-31 10:19:48 +00:00
Preston Van Loon
2586a9e667
Add and verify context in AddCommitteeShuffledList ( #10786 )
...
* Add and verify context in AddCommitteeShuffledList
* Add and verify context in AddCommitteeShuffledList
* Change unnecessary arg reordering
* fix build, oops
* Regression test
* Regression test
* fix fuzz cache disabled
2022-05-30 21:38:37 -03:00
terencechain
87251d627d
Ensure finalized root can't be zeros ( #10791 )
2022-05-30 18:01:30 +00:00
Potuz
3ff285dda5
Do not fill in blocks that are not in the finalized branch ( #10776 )
...
* Do not fill in blocks that are not in the finalized branch
* mark blocks as invalid
* Fix old off-by-ones, do not pass finalized state
2022-05-30 11:55:39 +00:00
terencechain
364ad3fbda
Reinsert reorg atts ( #10767 )
...
* Add common ancestor root for protoarray
* More efficient algo
* Tests
* Fix linting
* Fix linting
* Fix linting
* Fix linting
* Fix linting
* Fix linting
* Apply suggestions from code review
Co-authored-by: Potuz <potuz@prysmaticlabs.com>
* Feedbacks
* Revert saveHead changes
* Revert "Revert saveHead changes"
This reverts commit a15fddc2e68b2e370290b1783eb1ee626af17503.
* Fix rest of the tests
* Update beacon-chain/blockchain/head.go
Co-authored-by: Potuz <potuz@prysmaticlabs.com>
Co-authored-by: Potuz <potuz@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2022-05-29 19:32:42 +00:00
Potuz
4cbb69602f
Clean up onBlockBatch and prune forkchoice on init sync ( #10768 )
...
Co-authored-by: terencechain <terence@prysmaticlabs.com>
2022-05-28 11:56:58 +00:00
Potuz
3cf385fe91
Unrealized justification ( #10659 )
...
* unrealized justification API
* Add time elapse logging
* add unrealized justification checkpoint
* Use UnrealizedJustificationCheckpoint
* Refactor unrealized checkpoints
* Move logic to state package
* do not use ctx on a sum
* fix ctx
* add tests
* fix conflicts
* unhandled error
* Fix ordering in computing checkpoints
* gaz
* keep finalized checkpoint if nothing justified
* gaz
* copy checkpoint
* fix check for nil
* Add state package tests
* Add tests
* Radek's review
* add more tests
* Update beacon-chain/core/epoch/precompute/justification_finalization.go
Co-authored-by: terencechain <terence@prysmaticlabs.com>
* deduplicate to stateutil
* missing file
* Add stateutil test
* Minor refactor, don't export certain things
* Fix exports in tests
* remove unused error
Co-authored-by: terence tsao <terence@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2022-05-27 16:38:00 +00:00
David
adabd1fa4f
service.head race condition fix ( #10741 )
...
* added various read mutex locks for service.head
* added RLocks around all calls to s.headRoot()
* added RLocks around all calls to s.headBlock()
* reduce lock surface-> Stop(),handleEpochBoundary()
* refactor Stop() to +performance, -lock_surface
* Apply suggestions from code review
Co-authored-by: terencechain <terence@prysmaticlabs.com>
* fixed indentation
Co-authored-by: terencechain <terence@prysmaticlabs.com>
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
2022-05-27 14:24:43 +00:00
Raul Jordan
1dec9eb912
Remove Unnecessary Stack Traces for Engine Errors ( #10765 )
...
* cleaner rpc responses
* clean up unecessary stack trace
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2022-05-26 22:09:33 +00:00
terencechain
216fdb48cf
Add back ttd override flags ( #10763 )
...
* Add back ttd override flags
* Add warning log for overrides
* Print has hex
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
Co-authored-by: prestonvanloon <preston@prysmaticlabs.com>
2022-05-26 19:12:02 +00:00
Preston Van Loon
1be46aa16e
Add a fuzz test for fieldtrie ( #10757 )
...
* Add a fuzz test for fieldtrie
* gofmt
2022-05-26 13:17:34 +08:00
kasey
a1a12243be
Sync from finalized ( #10723 )
...
* checkpoint sync use finalized state+block
instead of finding the block at the beginning of the weak subjectivity
epoch.
* happy path test for sync-from-finalized
* gofmt
* functional opts for the minimal e2e
* add TestCheckpointSync option
* wip: pushing for CI
* include conn index in log for debugging
* lint
* block until regular sync test finishes
* restore TestSync->testDoppelGangerProtection link
* update bazel deps for all the test targets
* updating to match current checksum from github
Co-authored-by: Kasey Kirkham <kasey@users.noreply.github.com>
2022-05-25 22:52:43 +00:00
terencechain
61cbe3709b
Ignore subset aggregates ( #10674 )
...
* Ignore subset aggregates
* Add test
* Update BUILD.bazel
* Update validate_sync_contribution_proof_test.go
* Update validate_sync_contribution_proof_test.go
* Don't utilize pooled objects. Use direct caches
* Handle mainnet/minimal better
* Revert att changes
* Check overlaps before set
* Feedbacks
* Fixed a copy bug
* Fixed the same copy bug in committee indices cache
* Use SafeCopyBytes
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2022-05-25 05:40:06 +00:00
terencechain
edb03328ea
Sync: use copied bits for seen cache ( #10747 )
...
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2022-05-24 21:11:33 +00:00
Sammy Rosso
c922eb9bfc
Add new DomainType for application usage ( #10740 )
...
* Add new DomainType for application usage
* Add DomainApplicationMask to config_test
* Add func to convert uint32 to 4 byte array
We add a convenience function Uint32ToBytes4 that takes a uint32,
converts it to big endian order and return a 4 byte array.
* Add unit test for Uint32ToBytes4
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: terencechain <terence@prysmaticlabs.com>
2022-05-24 20:16:05 +00:00
terencechain
051a83a83d
Engine metrics: help text typos ( #10746 )
...
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2022-05-24 19:17:17 +00:00
terencechain
f46ff626df
Service: return errors on nil checkpoints ( #10748 )
2022-05-24 16:15:04 +00:00
Nishant Das
5d4078305a
Use Correct Math Library ( #10742 )
...
* use correct math lib
* one more case
2022-05-24 07:22:46 +00:00
Preston Van Loon
6910460173
Refactor migrateStateValidators for better readability ( #10727 )
...
* Refactor migrateStateValidators for better readability
* pass test
* rev
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2022-05-23 23:56:02 +00:00
terencechain
7cc291c09f
Update proposer boost score and spec tests ( #10665 )
...
* Update mainnet_config.go
* Fixed a few tests
* Update rest of the tests
* Consolidate blockchain errors
* Update spec tests to v1.2.0-rc.1
* Fix withdrawal epoch overflows
* add slashings to forkchoice spectests
* Remove unused parameter
* Disable skip slot cache
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
Co-authored-by: Potuz <potuz@prysmaticlabs.com>
2022-05-23 23:08:24 +00:00
Raul Jordan
76645bccee
Move ExecutionPayload Utils to Consensus Types Subpackage ( #10732 )
...
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2022-05-23 21:57:32 +00:00
terencechain
46c0579816
Fix withdrawal epoch overflows ( #10739 )
...
* Fix withdrawal epoch overflows
* Fix typo, used epoch instead of churn
2022-05-23 21:10:19 +00:00
Potuz
237807b248
Do not update forkchoice checkpoints on calls to Head ( #10702 )
...
* Only update forkchoice checkpoints at epoch transition
* gazelle
* blockchain package changes
* fix node
* spectest package
* rpc package
* fix spec test
* Fix spectests
* fix new_slot.test
* gaz
* fix spectests
* fix conflicts
* Update beacon-chain/blockchain/process_block.go
* regression do not update on newSlot
* revert bd64cab
* terence's review
* fix conflicts
* fix latest conflicts
* gaz
* go mod tidy
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2022-05-22 18:37:01 +00:00
terencechain
bcd75adedd
Consolidate blockchain errors ( #10736 )
...
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2022-05-22 17:48:54 +00:00
Potuz
0c981e8853
Change synced new block log ( #10724 )
...
* Change synced new block log
* Update beacon-chain/blockchain/log.go
Co-authored-by: terencechain <terence@prysmaticlabs.com>
* Fix finalized -> justified
* Update beacon-chain/blockchain/receive_block.go
* fix conflicts
Co-authored-by: terencechain <terence@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2022-05-22 16:57:48 +00:00
Potuz
e7991b9d7b
Track unrealized justification/finalization in forkchoice ( #10658 )
...
* Track unrealized justification/finalization in forkchoice
* add missing files
* mod tidy
Co-authored-by: terencechain <terence@prysmaticlabs.com>
2022-05-21 10:27:07 -03:00
Raul Jordan
244e670b71
Move BeaconBlockNil Checker Function to Consensus-Types/Wrapper Package ( #10731 )
...
* beacon block is nil wrapper
* gaz
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2022-05-20 23:29:16 +00:00
Raul Jordan
dc5fb92b28
Remove Unnecessary State Interfaces ( #10707 )
...
* rem other state interfaces
* redundant check
* gaz
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2022-05-20 22:40:03 +00:00
terencechain
a2db03b9e9
Update engine API err codes ( #10730 )
...
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2022-05-20 20:08:00 +00:00
terencechain
370cf1a6c8
Chain info: Return err if checkpoint is nil ( #10729 )
...
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2022-05-20 18:41:33 +00:00
Potuz
76f6d74b83
Add new slot tests ( #10728 )
...
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2022-05-20 18:17:53 +00:00
terencechain
addb3cd665
More selective on marking block as bad ( #10681 )
...
* Starting, looking for feedbacks
* Update error.go
* Wrap invalid blocks to rest of the processings
* More tests
* More tests
* Fix tests
* Update process_block_test.go
* Update execution_engine_test.go
* Update BUILD.bazel
* Nishant's feedback and Kasey's recommendation
* Add comments on what an invalid block is
* Update beacon-chain/blockchain/error.go
Co-authored-by: Potuz <potuz@prysmaticlabs.com>
* Update beacon-chain/blockchain/error.go
Co-authored-by: Potuz <potuz@prysmaticlabs.com>
* Rm faulty invalid conditions
Co-authored-by: Potuz <potuz@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2022-05-20 17:05:39 +00:00
Preston Van Loon
c603d120d7
Refactor high complexity StreamBlocksAltair ( #10726 )
...
* Refactor high complexity StreamBlocksAltair
* catch nil data
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2022-05-20 16:17:55 +00:00