* add a merge-specific definiton of bestPeer and the supporting plumbing
Signed-off-by: garyschulte <garyschulte@gmail.com>
* set reached TTD when finishing a fast sync if appropriate
Signed-off-by: garyschulte <garyschulte@gmail.com>
* spdx header
Signed-off-by: garyschulte <garyschulte@gmail.com>
* fix BetterSyncTargetEvaluatorTest tests
Signed-off-by: garyschulte <garyschulte@gmail.com>
* ignore 2 tests that assume that the system language is English, if that should not be the case
Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
* adds interfaces for tracking merge state and forchoices
* after 2 finalizations from fcu, disconnect any peers sending new blocks, or connecting with td > ttd
* tests for preventing pow peers from joining
* refactored to separate out merge logic
Signed-off-by: Justin Florentine <justin+github@florentine.us>
* After merge add a rule to check that the current block is more recent than its parent
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
* Update CHANGELOG
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
* Unit test
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
* Return of lastest valid hash in case of bad block
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
* Add CHANGELOG entry
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
* Remove now unused method
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
* Revert changes to backward sync, since not needed for this fix
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
* Adapt new test coming from the rebase with main
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
* Unit tests
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
* ignore forkchoice update if new head is an ancestor of the chain head
* added draft for CHANGELOG.md
* update PR link for CHANGELOG.md
Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
Co-authored-by: Justin Florentine <justin+github@florentine.us>
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
* If terminal block is present in the genesis, then peers must have it
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
* Update unit test
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
* address review comments
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
* fix for TransitionProtocolSchedule getByBlockHeader when the chain is not finalized AND terminal block was exactly TTD
Signed-off-by: garyschulte <garyschulte@gmail.com>
* make invalid timestamp error return success response with INVALID status
* fix newPayloadTest expectation for invalid timestamp, add check in bad blocks for heads not in blockchain, return Hash.ZERO for latest valid ancestors that are PoW
* assert latestValidHash returns ZERO if PoW and ancestor hash if not.
Signed-off-by: garyschulte <garyschulte@gmail.com>
* integration test covering websocket subscription without auth
* uses authenticated user on websocket handler when auth enabled and successful
* sonarlint fixes and copyright correction
* moved test specific class to test sources
Signed-off-by: Justin Florentine <justin+github@florentine.us>
Co-authored-by: garyschulte <garyschulte@gmail.com>
* When executing a newPayload do not move the chain head or update the world state
* When proposing a block, use a lightweight validation, without storing
* forwardToBlock moves head to the block and triggers advanced head event
* Do not persist prepared blocks
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Co-authored-by: garyschulte <garyschulte@gmail.com>
Co-authored-by: Jiri Peinlich <jiri.peinlich@gmail.com>
Co-authored-by: Karim TAAM <karim.t2am@gmail.com>
If baseFeePerGas is configured to "0x0" in the genesis file, bypass the need for a transaction to have a gas price of >= 7 Wei
Ensure baseFeeFloor is either 0 or >= 7 to avoid integer arithmetic issues.
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>