6014 Commits

Author SHA1 Message Date
Justin Florentine
8bc9e3f9fd fixes syntax errors (#8164)
Signed-off-by: jflo <justin+github@florentine.us>
2025-01-24 06:00:02 +10:00
daniellehrner
7840e8b4fb rename methods and variables, clarify comments (#8155)
Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
2025-01-23 06:08:03 +00:00
Gabriel-Trintinalia
a1e087d5b5 Move p2p host validation to CLI validation (#8158)
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
2025-01-23 05:19:23 +00:00
Gabriel-Trintinalia
113cf8b2a9 Use orElseGet for efficiency, address comment of previous PR 8139 (#8145)
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
2025-01-23 04:32:27 +00:00
daniellehrner
a54c46a131 Check existence of hardfork milestone to decide if engine APIs should be added or not (#8136)
* check existence of hardfork milestone to decide if engine APIs should be added or not

Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>

* add test

Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>

* move pragueAllMilestonesZeroProtocolSchedule to JsonRpcMethodsFactoryTest to not break other tests using ProtocolScheduleFixture

Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>

* trim down genesis file

Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>

* increase timeout to make tests pass in CI

Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>

---------

Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
2025-01-22 21:26:58 +00:00
daniellehrner
e9a94f3682 Devnet-5: bug fixes for 7702 (#8148)
* * fix code hash for delegated accounts in ExtCodeHashOperation
* move common code to AbstractExtCodeOperation class

Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>

* * rename DelegatedCode -> CodeDelegation, for consistency

Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>

* * rename authorization -> CodeDelegation, for consistency

Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>

* rename method to start with lower case

Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>

---------

Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
Co-authored-by: Simon Dudley <simon.dudley@consensys.net>
2025-01-22 21:59:27 +01:00
Iryoung Jeong
519323f77e Fix eth_getBlockByNumber with empty params returns (#8134)
* fix testcase

Signed-off-by: Iryoung Jeong <iryoung@fairsquarelab.com>

* fix EthGetBlockByNumber logic to pass testcase

Signed-off-by: Iryoung Jeong <iryoung@fairsquarelab.com>

* fix missed testcase - JsonRpcHttpServiceTest

Signed-off-by: Iryoung Jeong <iryoung@fairsquarelab.com>

---------

Signed-off-by: Iryoung Jeong <iryoung@fairsquarelab.com>
Co-authored-by: Matilda-Clerke <matilda.clerke@consensys.net>
2025-01-21 22:04:42 +00:00
Matilda-Clerke
e930c2dcb3 8053: Add GetPooledTransactionsFromPeerTask and appropriate usage (#8058)
* 8053: Add GetPooledTransactionsFromPeerTask and appropriate usage

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7582: Loosen restriction to allow fewer or equal results than requested, but not more

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 8053: Protect against null message response in peer task executor

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 8053: spotless

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

---------

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>
2025-01-21 21:31:31 +00:00
Karim Taam
6d05f8312c Improve error message for Invalid operation (#8141)
Signed-off-by: Karim Taam <karim.t2am@gmail.com>
2025-01-21 16:28:48 +00:00
Matilda-Clerke
5933a2aae4 Fix rlp validate to handle lists ending at the start of another list (#8143)
* 8053: Add RLPDecodingHelpers.Kind.EM
and handle empty lists in AbstractRLPInput

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* Revert previous change, implement new fix

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* Revert previous change, implement new fix

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

---------

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>
2025-01-21 05:59:45 +00:00
Fabio Di Fabio
448d1a97ee Merge branch 'main' into zkbesu 2025-01-20 11:20:00 +01:00
Gabriel-Trintinalia
702ce74c3d Simulation: Add nonce to call parameter (#8139)
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
2025-01-20 15:31:52 +11:00
Luis Pinto
74d22a082b Revert "Add back deprecated traceStartBlock methods to the tracer API (#8112)" (#8137)
This reverts commit 1f67cb511c.

Signed-off-by: Luis Pinto <luis.pinto@consensys.net>
2025-01-18 01:25:00 +00:00
daniellehrner
a98e950eac Add baseFeeUpdateFraction to blobSchedule genesis config (#8128)
* Add baseFeeUpdateFraction to blobSchedule genesis config

Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>

* added genesis file for CodeDelegationTransactionAcceptanceTest

Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>

* remove hard coded baseFeeUpdateFraction from CancunFeeMarket & PragueFeeMarket

Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>

* make FeeMarket constructors package private

Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>

---------

Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
2025-01-17 12:09:39 +00:00
Simon Dudley
89632d7743 Unignore Prague ref tests and remove osakaTime from Prague (#8133)
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
2025-01-17 06:16:48 +00:00
Sally MacFarlane
870f3b7857 default target gas limit for holesky (#8125)
* default target gas limit for holesky

---------

Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: Justin Florentine <justin+github@florentine.us>
Co-authored-by: Justin Florentine <justin+github@florentine.us>
2025-01-16 19:55:29 +00:00
daniellehrner
1e7f6f6bf3 EIP-7623 (#8093)
Implements EIP-7623 (increase calldata cost)

Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
Co-authored-by: Simon Dudley <simon.dudley@consensys.net>
2025-01-16 10:09:04 +00:00
daniellehrner
b5fdcc096f Pectra devnet 5: 7702 changes (#8118)
* first draft for 7702 changes for pectra-devnet5

Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>

* spotless, javadoc

Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>

* fixed get code in call operations

Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>

* allow code delegation chain id to be up to 2^256-1

Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>

* set code for delegated accounts correctly in the initialFrame of the tx processing

Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>

* delegated accounts return empty bytes for the code if the target does not exist

Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>

---------

Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
Co-authored-by: Simon Dudley <simon.dudley@consensys.net>
2025-01-16 06:20:20 +00:00
Danno Ferrin
479bec0310 Update EXTCALL creation detection (#8038)
Update the EXTCALL account creation detection to match legacy call
detection.

Signed-off-by: Danno Ferrin <danno@numisight.com>
2025-01-16 15:47:50 +10:00
Sally MacFarlane
5834afd44e [CHANGELOG] list deprecated bonsai CLI options (#8126)
* upcoming breaking changes for various deprecated bonsai CLI options

Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>

* order

Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>

---------

Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
2025-01-16 12:12:25 +10:00
Fabio Di Fabio
1bb7624325 Merge branch 'main' into zkbesu
# Conflicts:
#	.github/workflows/draft-release.yml
2025-01-15 11:24:31 +01:00
Gabriel-Trintinalia
5cc309a26e Add support for movePrecompileToAddress in State Overrides (eth_call) (#8115)
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
2025-01-15 04:27:57 +00:00
Vaidik
9c12ed19df handling IllegalArgumentException caused by Discovery Disabled
* Update ethereum/p2p/src/main/java/org/hyperledger/besu/ethereum/p2p/discovery/Endpoint.java

Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: Vaidik <vaidikbhardwaj00@gmail.com>

* loopback address
* use constant

Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>

---------

Signed-off-by: Vaidik <vaidikbhardwaj00@gmail.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
2025-01-15 00:10:11 +00:00
daniellehrner
42b26a466d Move gas refund calculation from MainnetTransactionProcessor to GasCalculator (#8106)
* move gas refund calculation from MainnetTransactionProcessor to RefundCalculator

Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>

* fix MainnetTransactionProcessorTest

Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>

* add test for FrontierRefundCalculator

Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>

* add test for FrontierRefundCalculator

Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>

* add PragueRefundCalculator dummy

Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>

* move refund logic to gas calculator, delete RefundCalculator

Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>

---------

Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
2025-01-14 22:58:35 +00:00
daniellehrner
8308650ef9 Exclude empty requests from requests hash (#8036)
* exclude empty requests from requests hash

Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>

* Exclude empty requests and prepend request type byte in engine_getPayloadV4

Fixes https://github.com/ethereum/execution-apis/pull/599 change to EIP-7685

Signed-off-by: Simon Dudley <simon.dudley@consensys.net>

* fix test

Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>

* fix prague tests: change request hash, reorder json elements

Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>

* fix extracting of request for new payload

Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>

* fix test by fixing request object creation

Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>

* spotless

Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>

* set request type to only one byte, fixed creation of request list in T8nExecutor

Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>

* fix expected json output to exclude empty requests

Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>

---------

Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
Co-authored-by: Simon Dudley <simon.dudley@consensys.net>
2025-01-14 19:45:10 +01:00
ahamlat
11a43171fa Improve debug_traceBlock calls performance (#8103)
- Change debug_traceBlockByNumber implementation by using a pipeline
- Change the defaults to match Geth and Nethermind defaults
- Improve general performance
- Add unit tests

Signed-off-by: Ameziane H. <ameziane.hamlat@consensys.net>
2025-01-14 13:24:40 +01:00
Simon Dudley
daf4aaeb8c Log calculated world state contents upon state root mismatch (#8099)
Collect trielog rolling exceptions and display upon state root mismatch

Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
2025-01-14 11:31:08 +00:00
Simon Dudley
c4f6f178c0 Support authorizationList parsing in reference test txs (#8116)
Support authorizationList parsing in reference tests for execution-spec-tests
Allow zero chainId

Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
2025-01-14 21:03:09 +10:00
Joshua Fernandes
ff5266af9e add workflow to verify artifacts (#8056)
* add workflow to verify artifacts

Signed-off-by: Joshua Fernandes <joshua.fernandes@consensys.net>

* curate list of artifacts based on PR review

Signed-off-by: Joshua Fernandes <joshua.fernandes@consensys.net>

* make the artifacts list simple

Signed-off-by: Joshua Fernandes <joshua.fernandes@consensys.net>

---------

Signed-off-by: Joshua Fernandes <joshua.fernandes@consensys.net>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
2025-01-14 03:54:20 +00:00
Sally MacFarlane
b797f2e346 log4j conf: replace status (deprecated) with level (#8087)
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
2025-01-14 02:36:43 +00:00
ahamlat
9ebba75192 Expose head execution time metric (#8092)
* Add head execution time metric during new payload execution
* Change the metric value only if the block was executed sucessfully

Signed-off-by: Ameziane H. <ameziane.hamlat@consensys.net>
2025-01-13 20:44:40 +00:00
Fabio Di Fabio
1be83c5ff9 Update Gradle verification metadata
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
2025-01-13 17:42:59 +01:00
Fabio Di Fabio
0b17320927 Merge branch 'main' into zkbesu 2025-01-13 17:28:36 +01:00
Luis Pinto
1f67cb511c Add back deprecated traceStartBlock methods to the tracer API (#8112)
Signed-off-by: Luis Pinto <luis.pinto@consensys.net>
2025-01-13 16:21:56 +00:00
Danno Ferrin
0810b73ee3 Refactor BlockHashOperation block height check into Operation (#8091)
* Refactor BlockHashOperation block height check into Operation

Refactor the 4 different places block height is checked across Besu into
the BlockHashOperation. Add support to make the lookback range
configurable in the BlockHashLookup interface, but default it to 256.

Signed-off-by: Danno Ferrin <danno@numisight.com>

* spotless

Signed-off-by: Danno Ferrin <danno@numisight.com>

* javadoc

Signed-off-by: Danno Ferrin <danno@numisight.com>

* Update Unit Tests to use the operation.

Signed-off-by: Danno Ferrin <danno@numisight.com>

* Update Unit Tests to use the operation.

Signed-off-by: Danno Ferrin <danno@numisight.com>

---------

Signed-off-by: Danno Ferrin <danno@numisight.com>
2025-01-13 15:51:11 +00:00
Fabio Di Fabio
f9776cbf55 Increase the max number of prioritized blob tx in the layered txpool for Pectra (#8101)
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
2025-01-13 11:43:21 +00:00
Gabriel-Trintinalia
4eb6fb07b7 Rename accountOverride to stateOverride to match spec (#8111)
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
2025-01-13 03:48:43 +00:00
Karim Taam
85f85da3cd add fallback for parallelization (#8084)
Signed-off-by: Karim Taam <karim.t2am@gmail.com>
2025-01-10 21:34:46 +01:00
Luis Pinto
8cddcfd955 Pass miningBeneficiary address to BlockAwareOperationTracer::traceStartBlock calls (#8096)
Signed-off-by: Luis Pinto <luis.pinto@consensys.net>
2025-01-10 11:37:12 +00:00
Fabio Di Fabio
0698734678 Support code delegations when purging confirmed blocks in the layered txpool (#8018)
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
2025-01-10 10:22:09 +00:00
garyschulte
2aadbfcb0a implement the proposed gas changes for bls / eip-2537 (#8008)
* implement the proposed gas changes for bls / eip-2537 for pectra-devnet-5
* disable eip-2537 testing until we have new artifacts that reflect pectra gas costs

Signed-off-by: garyschulte <garyschulte@gmail.com>
2025-01-10 00:25:00 +00:00
Gabriel-Trintinalia
844874359b Fix guess type for delegate code transactions (#8090)
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
2025-01-09 12:15:37 +11:00
Matilda-Clerke
4ae3be55ad Add GetBodiesFromPeerTask (#8040)
* 7311: Add PeerTask system for use in future PRs

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: Clean up some warnings

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: Add feature toggle for enabling use of the peertask system where available

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: Remove log used for testing, apply spotless

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: Add private constructor to PeerTaskFeatureToggle to prevent instantiation

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: Switch to logging a warning instead of throwing an exception when initializing PeerTaskFeatureToggle multiple times

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: Update javadoc to match previous commit

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: spotless

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: Fix broken BesuCommandTest

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: add class

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: Move PeerTaskFeatureToggle to more appropriate location

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: add X prefix to peertask-system-enabled

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: Move --Xpeertask-system-enabled out of BesuCommand and make hidden

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: spotless

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: Add GetReceiptsFromPeerTask

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: Move isPeerTaskSystemEnabled to SynchronizerOptions

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: Fix javadoc issue

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: Fix javadoc issue

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: Move PeerTaskFeatureToggleTestHelper to TestUtil and fix RunnerTest

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: spotless

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: Remove PeerTaskFeatureToggle in favor of including isPeerTaskSystemEnabled in SynchronizerConfiguration

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: Adjust to the removal of PeerTaskFeatureToggle and use SynchronizerConfiguration to get the toggle instead

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: Reduce timeout in PeerTaskRequestSender to 5s

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: Refactor PeerManager to be an interface

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: Fix up compile errors after merge

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: Fix MetricsAcceptanceTest

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: Fix MetricsAcceptanceTest

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: Fix DownloadReceiptsStep when using peer task system

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: Rename PeerManager to PeerSelector

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: Reword PeerSelector javadoc to avoid implementation details

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: Use ConcurrentHashMap in DefaultPeerSelector

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: Reword trace log in DefaultPeerSelector

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: Remove unused imports

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: Use a 1 second delay between retries in PeerTaskExecutor to match old implementation

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: Add testGetPeerButNoPeerMatchesFilter to DefaultPeerSelectorTest

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: Add testGetPeerButNoPeerMatchesFilter to DefaultPeerSelectorTest

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: spotless

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: Fix MetricsAcceptanceTest

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: Fix MetricsAcceptanceTest

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: Modify PeerTaskExecutor metric to include response time from peer

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: Use SubProtocol instead of subprotocol name string in PeerTask

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: rename timing context to ignored to prevent intellij warnings

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: Use constants for number of retries

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: Convert PeerTaskExecutorResult to a record

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: Rename PeerTaskBehavior to PeerTaskRetryBehavior

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: Move peer selection logic to PeerSelector

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: spotless

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: Fix up everything broken after merge

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: Attempt to improve performance of peer task system in pipeline

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: fix compile check

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: Fix broken workflow

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: Reduce logging in JsonRpcExecutor to trace level

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: More changes in DownloadReceiptsStep

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: Rework DownloadReceiptsStep

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: Make changes as discussed in walkthrough meeting

Remove DefaultPeerSelector, make EthPeers implement PeerSelector interface, and add PeerTask.getPeerRequirementFilter

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: Update after merge and make discussed changes from walkthrough discussion

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: Change to regular HashMap

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: Remove runtime exception again

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: Rename getPeerTaskBehavior to getPeerTaskRetryBehavior

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: Rename getPeerTaskBehavior to getPeerTaskRetryBehavior

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: Rework PeerTaskExecutor retry system to be 0-based

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: Fix up compile errors after merge

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: Fix broken DownloadReceiptsStepTest test

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: Move GetReceipts to services worker for parallelism

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: Refactor peer task system usage in DownloadReceiptsStep to better match old system

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: Remove unused async methods in PeerTaskExecutor

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: Return Optional<EthPeer> in PeerSelector.getPeer and utilise existing peer selection behavior in EthPeers

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: Update after merge

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: Redo getPeer again to include hasAvailableRequestCapacity check

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: Add protocol spec supplier to GetReceiptsFromPeerTask

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: Rework getPeer again to use LEAST_TO_MOST_BUSY comparator

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: Import PeerNotConnected class instead of using fully qualified class name

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: Change to specifying retry counts in PeerTask instead of behavior enums

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: clean up after merge

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: clean up after merge

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: Fix up javadoc

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: Add additional metrics to PeerTaskExecutor

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: Add Predicate to PeerTask to check for partial success

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: Fix incorrect name on isPartialSuccessTest

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: Implement isPartialSuccess and add unit tests

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: Add partialSuccessCounter and inflightRequestGauge in PeerTaskExecutor

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: Also filter by whether a peer is fully validated

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: Remove unneeded throws in RunnerTest

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: Fix up inflight requests gauge in PeerTaskExecutor

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: Update plugin api hash

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: Update plugin api hash

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: Add javadoc to LabelledGauge.isLabelsObserved

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: Update plugin-api hash

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: Update changelog

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: Handle headers with no receipts as a special case in DownloadReceiptsStep

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: Complete merge

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: Use taskName instead of className for labelNames

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: Use snake_case for metric names

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: Use _total metric name suffix

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: rework partial success handling

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: Update GetReceiptsFromPeerTask with partialSuccess changes

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: Add default implementation to LabelledGauge.isLabelsObserved

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: Fix broken unit test

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: Rename parseResponse to processResponse

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* add possibility to use the new peer task system when downloading the bodies

Signed-off-by: stefan.pingel@consensys.net <stefan.pingel@consensys.net>

* fix loop

Signed-off-by: stefan.pingel@consensys.net <stefan.pingel@consensys.net>

* 7311: Wrap peer task system usage in ethScheduler call to match other usages

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* small fixes

Signed-off-by: stefan.pingel@consensys.net <stefan.pingel@consensys.net>

* update API change

Signed-off-by: stefan.pingel@consensys.net <stefan.pingel@consensys.net>

* spotless

Signed-off-by: stefan.pingel@consensys.net <stefan.pingel@consensys.net>

* 7311: apply spotless

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: Move check for empty trie hash into GetReceiptsFromPeerTask and update unit test to test for this functionality

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: spotless

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: Fix compile issue after merge

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: Remove BodyValidator and update code and test to match

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: spotless

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: Fix up pre-fill and add test to test failure scenario

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: Use ProtocolSchedule.anyMatch to find if any ProtocolSpecs are PoS, remove new usages of currentProtocolSpecSupplier

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: Only attempt to remove headers on successful requests

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7311: Fix broken stuff after merge

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* spotless

Signed-off-by: stefan.pingel@consensys.net <stefan.pingel@consensys.net>

* Fix up compile errors after merge

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* Add PeerTaskExecutor usage for GetBodies in DownloadHeaderSequenceTask

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* Add PeerTaskExecutor usage for GetBodies in ForwardSyncStep and apply spotless

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* Allow custom retries against other peers in GetBodiesFromPeerTask

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* Fix infinite loop in CheckPointSyncChainDownloaderTest

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* spotless

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* Update CompleteBlocksWithPeerTask.getBlocks to retrieveBlocksFromPeers and add javadoc

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* Add javadoc to GetBodiesFromPeerTask

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7582: Simplify withdrawals validation

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

---------

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>
Signed-off-by: stefan.pingel@consensys.net <stefan.pingel@consensys.net>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: stefan.pingel@consensys.net <stefan.pingel@consensys.net>
2025-01-09 00:06:06 +00:00
Simon Dudley
fa9ca9c27f Update EIP-2935 (#8066)
* Update HISTORY_STORAGE_ADDRESS and HISTORY_SERVE_WINDOW for EIP-2935

https://github.com/hyperledger/besu/issues/8061

* Update HISTORY_STORAGE_ADDRESS and genesis code in tests.

Even for unrelated tests, this has a knock-on impact on the state root due to the history storage account being created when the BlockHashProcessor runs for block 1

Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
2025-01-07 16:25:02 +10:00
Usman Saleem
01126c0853 Reimplement EthereumNodeRecord for DNS discovery (#7989)
* Reimplement EthereumNodeRecord and remove dependency on tuweni-devp2p
* Refactor EthereumNodeRecord for DNSDaemon
* Update EthereumNodeRecord to use Besu RLP
* additional unit tests
* Convert ENR to Java record
* regenerate equals and hashcode for enr record
---------

Signed-off-by: Usman Saleem <usman@usmans.info>
2025-01-07 13:14:39 +10:00
Simon Dudley
ffd593d72b Remove EIP-7742 (#8083)
This EIP was removed and equivalent functionality replaced by EIP-7840.

---

Revert "Rename targetBlobCount to targetBlobsPerBlock (#7981)"

This reverts commit 1671306749.

Revert "EIP-7742: Add target_blob_count to block header (#7808)"

This reverts commit f855d5b72f.

Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
2025-01-07 01:19:26 +00:00
garyschulte
2909ea4776 prague fee market for blob gas (#8064)
* prague fee market for blob gas

Signed-off-by: garyschulte <garyschulte@gmail.com>

* Fix wiring and unit test

Signed-off-by: Simon Dudley <simon.dudley@consensys.net>

---------

Signed-off-by: garyschulte <garyschulte@gmail.com>
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
Co-authored-by: Simon Dudley <simon.dudley@consensys.net>
2024-12-21 19:42:20 +00:00
Luis Pinto
b3b33da540 eip-7709 implement BLOCKHASH opcode from system contract state (#7971)
* eip-7709 implement BLOCKHASH opcode from system contract state

Signed-off-by: Luis Pinto <luis.pinto@consensys.net>

* fixup! eip-7709 implement BLOCKHASH opcode from system contract state

 reimplement blockhashlookup with MessageFrame instead of WorldUpdater

Signed-off-by: Luis Pinto <luis.pinto@consensys.net>

* fixup! eip-7709 implement BLOCKHASH opcode from system contract state

 address review comments

Signed-off-by: Luis Pinto <luis.pinto@consensys.net>

* fixup! eip-7709 implement BLOCKHASH opcode from system contract state

 add comment about unused BlockHashProcessor

Signed-off-by: Luis Pinto <luis.pinto@consensys.net>

---------

Signed-off-by: Luis Pinto <luis.pinto@consensys.net>
2024-12-20 10:29:25 +00:00
Sally MacFarlane
c72d02ea38 Ignore gasPrice if 1559 gas params are specified (#8059)
* don't throw if all the gasprice params are specified

Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>

---------

Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
2024-12-20 05:47:06 +00:00
Jason Frame
ea8579d63a Move the core of qbft into a qbft core module (#8043)
Move the core of QBFT into a qbft core module so it can be reused outside Besu

Signed-off-by: Jason Frame <jason.frame@consensys.net>
2024-12-20 13:12:06 +10:00