Bastin
92bd211e4d
upgrade v6 to v7 ( #15989 )
...
* upgrade v6 to v7
* changelog
* update-go-ssz
2025-11-06 16:16:23 +00:00
Potuz
4e47905884
Do not mark blocks as invalid unnecessarily ( #15846 )
2025-10-10 20:55:29 +00:00
Potuz
0f6070a866
Fix race on ReceibeBlock ( #15565 )
...
* Fix race on ReceibeBlock
In the event two routines for `ReceiveBlock` are triggered with the same
block (it may happen if one routine is triggered over gossip and the
other in init-sync) it may happen that the second routine believes it's
syncing the block for the first time. This is because the cache on
`blocksBeingSynced` is not checked to be set and the block may still not
be put in forkchoice by the first routine.
In the normal case this would not cause any trouble as the second
forkchoice insertion is a noop by design. However, if the second routine
times out or has any error in processing (for example the engine will
return an error if we try to send FCU to an older head) then the second
routine will attempt to remove the inserted block from forkchoice and
this bricks the node since forkchoice refuses to remove a valid node,
the root is removed inconditionally from db and the node ends up with a
root that is not in db and remains in forkchoice.
This PR just prevents the race.
As a followup perhaps we can gate the rollback function from db to nodes
that are effectively not in forkchoice, alternatively, force removal
from forkchoice when rolling back from db (although this version is
complicated due to possible accounting issues on forkchoice).
* Fix lint
2025-08-06 17:18:13 +00:00
Manu NALEPA
a0060fa794
PeerDAS: Implement blockchain. ( #15350 )
...
* PeerDAS: Implement blockchain.
* Fix forkchoice spectest panic.
* Update beacon-chain/blockchain/error.go
Co-authored-by: Preston Van Loon <pvanloon@offchainlabs.com >
* Fix Preston's comment.
* Fix Preston's comment.
* Fix Preston's comment.
* Fix Preston's comment.
* Fix Preston's comment.
* Fix Preston's comment.
---------
Co-authored-by: Preston Van Loon <pvanloon@offchainlabs.com >
2025-06-02 11:33:07 +00:00
kasey
e47a4e1d56
Penalize peers for bad rpc data in range sync ( #15149 )
...
* Penalize peers for bad rpc data in range sync
* gofmt
---------
Co-authored-by: Kasey <kasey@users.noreply.github.com >
2025-04-10 21:19:08 +00:00
Potuz
21e1f7883b
Add feature flag to blacklist blocks ( #15030 )
...
* Add feature flag to blacklist blocks
* review and add tests
* add test
* review
* Kasey's review
---------
Co-authored-by: Radosław Kapka <rkapka@wp.pl >
2025-03-21 22:20:39 +00:00
Potuz
d7628bab37
Fix genesis block proposal ( #15084 )
...
* Fix genesis block proposal
* fix test
* fix test 2
2025-03-21 15:34:22 +00:00
Preston Van Loon
a3cc81a048
Add nil check for head in IsOptimistic ( #13439 )
2024-01-09 19:40:26 +00:00
kasey
1123df7432
Verified roblobs ( #13190 )
...
Co-authored-by: Kasey Kirkham <kasey@users.noreply.github.com >
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2023-11-21 18:44:38 +00:00
terencechain
f9a40ef111
Handle wrapped invalid block error ( #12982 )
...
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2023-10-04 18:16:35 +00:00
kasey
3476112d63
sync blobs in initial-sync ( #12522 )
2023-08-31 08:41:57 -05:00
Potuz
5bb482e5d6
Remove forkchoice call from notify new payload ( #12560 )
...
* Remove forkchoice call from notify new payload
* add unit test
2023-06-28 13:38:24 +00:00
Potuz
b9917807d8
Ignore some untimely attestations ( #12387 )
...
* Ignore some untimely attestations
* correct child slot check
* consider tips as viable for checkpoints
* deal with canonical blocks
* forkchoice unit tests
* blockchain readonly beacon state
* Ignore some untimely attestations
* correct child slot check
* consider tips as viable for checkpoints
* deal with canonical blocks
* forkchoice unit tests
* blockchain readonly beacon state
* Fix AttestationTargetState mock
* Fix ineffectual assignment lint
* Fix blockchain tests
* Fix build
* Add Nil check
* add comment on lock
---------
Co-authored-by: terence tsao <terence@prysmaticlabs.com >
Co-authored-by: Preston Van Loon <pvanloon@offchainlabs.com >
2023-05-12 16:55:33 +00:00
Nishant Das
5ecebbe15a
Recover State Summary Correctly ( #12214 )
...
* fix it
* add zerohash checks
* preston's review
2023-03-30 09:09:36 -05:00
Potuz
ec13d52f03
Remove VerifyFinalizedBlkDescendant ( #12046 )
...
* Use forkchoice HasNode to check if a block is consistent with finality
* interface fix
* fix tests
* remove VerifyFinalizedBlkDescendant
* fix validateBeaconBlock
2023-02-25 13:39:13 -03:00
Potuz
0d01debe9a
reuse code from stategen in the justified balance cache ( #11961 )
...
* add balance cache tests to testsuite
* reuse code from stategen in the justified balance cache
* remove state getters from the balance cache
* fix unit tests
* rebase on 11962
* unused error
---------
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2023-02-02 14:53:08 +00:00
Radosław Kapka
1c5b0596c7
More user-friendly message in ErrUndefinedExecutionEngineError ( #11777 )
...
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2022-12-15 07:46:17 +00:00
terencechain
cb9b5e8f6e
Use payload attribute type for engine-API ( #11719 )
...
* Add payload attribute type
* Gazelle
* Fix test
* Use new payload attribute type
* Fix test
* Fix test
* Update beacon-chain/execution/engine_client.go
Co-authored-by: Radosław Kapka <rkapka@wp.pl >
* Feedbacks
* Fix suggestion
* Update argument, fix test
* Return emptyAttri instead of nil
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
Co-authored-by: Radosław Kapka <rkapka@wp.pl >
2022-12-08 21:39:45 +00:00
int88
1572c530b5
some minor fixes ( #11572 )
...
* some minor fixes
* minor fix
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com >
2022-10-26 20:44:24 +00:00
terencechain
9830ce43d6
Set invalid roots for bad block ( #10982 )
...
* Set invalid roots for bad block
* Update for fcu
* Update for fcu
* Set bad blocks in subscriber
* Update process_block_test.go
* Rename
2022-07-25 13:45:03 +00:00
terencechain
7fd2c08be3
Propagate FCU invalid error ( #10997 )
...
* Wrap fcu error
* Wrap fcu error
* Wrap error better
* More test
* Add else
* Potuz feedback
* Propagate the correct root for fcu
* Always return true for invalid
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2022-07-09 20:51:03 +00:00
terencechain
3a957c567f
Handle invalid_block_hash error from ee ( #10991 )
...
* Handle invalid_block_hash error from ee
* Update beacon-chain/blockchain/error.go
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com >
* Remove invalid block and state
* Revert "Remove invalid block and state"
This reverts commit 9ca011b8ce .
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com >
2022-07-06 00:22:12 +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
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
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
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
terencechain
a90335b15e
Blockchain: Use get_block to retrieve block ( #10688 )
...
* Use get block
* Remove unused errNilParentInDB
* Fix TestVerifyBlkDescendant
* Update beacon-chain/blockchain/service.go
Co-authored-by: Potuz <potuz@prysmaticlabs.com >
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
Co-authored-by: Potuz <potuz@prysmaticlabs.com >
2022-05-15 02:23:01 +00:00
Potuz
649dee532f
insert block to forkchoice after notifyNewPayload ( #10453 )
...
* insert block to forkchoice after notifyNewPayload
* Add optimistic candidate check
* Terence's review
* Apply suggestions from code review
Co-authored-by: terence tsao <terence@prysmaticlabs.com >
2022-03-31 09:17:49 -03:00
terence tsao
fe98d69c0a
Clean up blockchain pkg ( #10452 )
...
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2022-03-30 17:45:24 +00:00
Potuz
5550334956
set optimistic status on notify payload ( #10398 )
...
* set optimistic status on notify payload
* pre-execution blocks are never optimistic
* add unit test
* add test for lengths
* Update optimistic_sync_test.go
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
Co-authored-by: terence tsao <terence@prysmaticlabs.com >
2022-03-22 03:35:02 +00:00
Potuz
807b71244b
Add database methods for optimistic sync ( #10357 )
...
* Add database methods for optimistic sync
* Add epoch comparison
* add extra epoch comparison
* Summary instead of block
* fix tests
Co-authored-by: terence tsao <terence@prysmaticlabs.com >
2022-03-15 20:52:59 +00:00
Potuz
2744eba391
Update optimisticCandidateBlock to specs version ( #10355 )
...
* Update optimisticCandidateBlock to specs version
* fix double import
* Change error message
2022-03-15 19:12:52 +00:00
terence tsao
5a505509c3
Use store in blockchain service ( #10125 )
...
* Use store in blockchain service
* handle nil cases
2022-01-25 18:47:39 +00:00