299 Commits

Author SHA1 Message Date
Karim Taam
552cb283f9 rename diffbased bonsai prefix (#8424)
Signed-off-by: Karim Taam <karim.t2am@gmail.com>
2025-03-17 14:08:35 +00:00
Simon Dudley
789542f76d Pull in Consensys/tuweni v2.7.0 (#8330)
This replaces io.tmio/tuweni with the Consensys fork.

Also Includes:
- reduce check argument args allocations - https://github.com/Consensys/tuweni/pull/10
which should reduce Integer and int[] and therefore gc pressure

Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
2025-03-17 19:42:25 +10:00
Matt Whitehead
a190be3f3c Use protocol schedule to determine mining beneficiary (#8387)
* Use protocol schedule to determine mining beneficiary

Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>

* Add entry to changelog

Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>

* Update isolation test

Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>

* Fix for zero addresses

Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>

* Test compile fix

Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>

* Use next header, not current header

Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>

---------

Signed-off-by: Matthew Whitehead <matthew.whitehead@kaleido.io>
Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>
Signed-off-by: Matt Whitehead <matthew.whitehead@kaleido.io>
2025-03-14 10:10:41 +00:00
Bhanu Pulluri
2db46e964c Enable Quorum/IBFT1 to Besu migration (#8262)
* Enable Quorum/IBFT1 to Besu migration

Signed-off-by: Bhanu Pulluri <bhanu.pulluri@kaleido.io>

* Fix BftMining acceptance test

Signed-off-by: Bhanu Pulluri <bhanu.pulluri@kaleido.io>

* Introduce delay after London fork update in BFT mining test to prevent timing issues

Signed-off-by: Bhanu Pulluri <bhanu.pulluri@kaleido.io>

* Update besu/src/main/java/org/hyperledger/besu/controller/IbftLegacyBesuControllerBuilder.java

Co-authored-by: Matt Whitehead <matthew1001@hotmail.com>
Signed-off-by: Bhanu Pulluri <59369753+pullurib@users.noreply.github.com>

* Review changes

Signed-off-by: Bhanu Pulluri <bhanu.pulluri@kaleido.io>

* update creating additional JSON RPC methods for all controllerbuidlers in consensus schedule

Signed-off-by: Bhanu Pulluri <bhanu.pulluri@kaleido.io>

* Create ethprotocol manager and plugin factory for both consensus controllers in migration

Signed-off-by: Bhanu Pulluri <bhanu.pulluri@kaleido.io>

* Refactor resource files

Signed-off-by: Bhanu Pulluri <bhanu.pulluri@kaleido.io>

* fix verification metadata

Signed-off-by: Bhanu Pulluri <bhanu.pulluri@kaleido.io>

* fix regression

Signed-off-by: Bhanu Pulluri <bhanu.pulluri@kaleido.io>

* update changelog

Signed-off-by: Bhanu Pulluri <bhanu.pulluri@kaleido.io>

* Fix controller selection at the transition block

Signed-off-by: Bhanu Pulluri <bhanu.pulluri@kaleido.io>

* Review changes

Signed-off-by: Bhanu Pulluri <bhanu.pulluri@kaleido.io>

* Revert BftExtraData changes

Signed-off-by: Bhanu Pulluri <bhanu.pulluri@kaleido.io>

---------

Signed-off-by: Bhanu Pulluri <bhanu.pulluri@kaleido.io>
Signed-off-by: Bhanu Pulluri <59369753+pullurib@users.noreply.github.com>
Co-authored-by: Bhanu Pulluri <bhanu.pulluri@kaleido.io>
Co-authored-by: Matt Whitehead <matthew1001@hotmail.com>
Co-authored-by: Matt Whitehead <matthew.whitehead@kaleido.io>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
2025-03-12 14:08:51 +00:00
Fabio Di Fabio
74a1d8a1ea Support pending transaction score when saving and restoring txpool (#8363)
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
2025-03-04 09:24:30 +01:00
Fabio Di Fabio
428a638569 Allow plugins to propose transactions during block creation (#8268)
* Allow plugins to propose transactions during block creation

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>

* Apply suggestions from code review

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>

* Document AbstractStatefulTransactionSelector

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>

* Unit tests for BlockSizeTransactionSelectorTest

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>

---------

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
2025-02-12 15:59:59 +01:00
Fabio Di Fabio
a81879370e Use PendingTransaction interface in block creation classes (#8254)
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
2025-02-05 21:31:09 +01:00
Gabriel-Trintinalia
630a8f7d0f EIP2935 - Use system call instead of direct storage modification (#8243)
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
2025-02-05 17:18:37 +10:00
Fabio Di Fabio
90df5e5564 Not all invalid transient not selected txs should be penalized (#8231)
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
2025-02-04 09:52:34 +00:00
Sally MacFarlane
a2ef71b425 disable flaky test classes (#8239)
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
2025-02-04 14:33:23 +10:00
Fabio Di Fabio
4fa9f0c9c4 Add a tx selector to skip txs from the same sender after the first not selected (#8216)
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
2025-02-03 12:06:16 +00:00
Karim Taam
b3192a5960 Refactor the methods for getting mutable states in the WorldState provider (#8113)
Refactor the methods for retrieving mutable states in the WorldState provider and make additional improvements to clean up the code.

---------

Signed-off-by: Karim Taam <karim.t2am@gmail.com>
2025-01-27 16:59:54 +00: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
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
Simon Dudley
e830db7248 EIP-7840 Implementation (#8042)
Drive Cancun, Prague and Osaka target and max blobs per block from genesis config.
If blobSchedule is missing, use the mainnet default values.
Target is wired into appropriate *GasCalculator implementations.
Max is wired into appropriate *TargetingGasLimitCalculator implementations.

---------

Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
2024-12-20 00:14:35 +00:00
Justin Florentine
3b4136dac5 rename GenesisConfigFile because it's not a file at all (#8050)
Signed-off-by: jflo <justin+github@florentine.us>
2024-12-18 17:39:00 -05:00
Fabio Di Fabio
f8e93bf544 Support rpc pending block tag when estimating gas (#7951)
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
2024-12-06 12:50:38 +00:00
Simon Dudley
472357f118 EIP-7742 - gas calculation using target_blobs_per_block (#7823)
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
2024-12-05 01:50:23 +00:00
Sally MacFarlane
792c6569cd PoW mining - deprecation (#7905) 2024-11-29 05:09:15 +00:00
Fabio Di Fabio
73a1e5beee Simplify difficulty calculator interface (#7893)
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
2024-11-20 16:38:39 +00:00
Fabio Di Fabio
833a5ce5dd Simplify ProtocolContext creation (#7792)
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
2024-11-19 14:51:04 +00:00
Justin Florentine
8fce5aa6ff IntelliJ do not fail me (#7846)
Signed-off-by: jflo <justin+github@florentine.us>
2024-11-04 09:12:00 +10:00
Justin Florentine
7eb7b870c3 Refactoring around MiningParameters (#7798)
decoupled parent block header from block creators
optionalized some fields of ProtocolSchedule constructor, which will allow us to reduce number of constructors later.
Refactored JsonBlockImporterTest so it can provide a BesuComponent
ProtocolScheduleBuilder optionalizes the default chainid
Blocks SubCommand is now Dagger aware
Creates but rarely uses ProtocolSpec and ProtocolSchedule modules. Deeper adoption pending.
Adds a Coinbase module with fixed values for use in testing.
Introduces an EthereumCoreComponent, to be used as a subcomponent of BesuComponent in the future.
Introduces a MiningParameters module with common static values used by tests. Removes MiningParameters static constructor.

---------

Signed-off-by: Justin Florentine <justin+github@florentine.us>
Signed-off-by: jflo <justin+github@florentine.us>
2024-11-01 09:26:41 +10:00
Jason Frame
f16d3526db Change execution requests to use flat encoding (#7771)
Signed-off-by: Jason Frame <jason.frame@consensys.net>
2024-10-24 09:02:43 +00:00
Fabio Di Fabio
f9695c18c0 Interrupt candidate tx execution on block creation timeout (#7673)
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
2024-09-27 18:42:42 +00:00
Fabio Di Fabio
6df4149f2a Fix logging the evaluation time when a tx is selected for block creation (#7636)
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
2024-09-18 13:55:10 +00:00
Justin Florentine
9a570d415e Decouple block creators (#7468)
* wip decoupled parent block header from block creators

---------

Signed-off-by: Justin Florentine <justin+github@florentine.us>
2024-09-09 13:25:37 +00:00
Stefan Pingel
cf592c48d1 implement engine_getBlobsV1 (#7553)
* implement engine_getBlobsV1

Signed-off-by: stefan.pingel@consensys.net <stefan.pingel@consensys.net>
Signed-off-by: Stefan Pingel <16143240+pinges@users.noreply.github.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
2024-09-06 09:37:36 +02:00
Matilda-Clerke
da98fa5541 Reintroduce engine get client version v1 with commit in manifest (#7548)
* Include Commit-Hash in manifests
* Add commit method in BesuInfo
* Use 8 character hash in EngineGetClientVersionV1 and revert calculateVersion back to original spec

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>
Co-authored-by: garyschulte <garyschulte@gmail.com>
2024-08-30 18:13:53 +00:00
Fabio Di Fabio
19e1a9aaf6 Add pending block header to TransactionEvaluationContext (#7483)
Add pending block header to TransactionEvaluationContext plugin API, so PluginTransactionSelector can access info of the pending block.

---
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Co-authored-by: Usman Saleem <usman@usmans.info>
2024-08-20 09:50:26 +10:00
Fabio Di Fabio
30dfa66c1e Penalize invalid transient pending transactions in the layered transaction pool (#7359)
* Introduce score for pending transactions

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>

* Introduce score for pending transactions

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>

* Update package javadoc

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>

---------

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
2024-07-26 07:53:53 +10:00
Matilda-Clerke
0269d83f39 7732: Remove datagas related stuff in favour of blobgas (#7353)
* 7732: Remove datagas related stuff in favour of blobgas

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

---------

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>
2024-07-22 09:22:33 +10:00
Karim Taam
30c96c7a1d Optimistic parallelization of transactions to improve performance (#7296)
Optimistic transaction parallelization execution during block processing to improve the performances. This feature can enabled with a flag --Xbonsai-parallel-tx-processing-enabled=true

Signed-off-by: Karim Taam <karim.t2am@gmail.com>
Co-authored-by: Ameziane H <ameziane.hamlat@consensys.net>
Co-authored-by: garyschulte <garyschulte@gmail.com>
2024-07-19 09:11:30 -07:00
Fabio Di Fabio
99260fae96 Improve blob size transaction selector (#7312)
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
2024-07-17 07:50:09 +10:00
Fabio Di Fabio
465fd1cbe5 Fix and restore disabled block creation unit tests (#7331)
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
2024-07-16 13:09:10 +02:00
Danno Ferrin
17f4dc9a8a Update unit test (#7317)
* Update parameterized unit tests so the enumerate with --dry-run
* Update the prague-withdrawal.json unit test to handle current code

Signed-off-by: Danno Ferrin <danno@numisight.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
2024-07-15 04:31:18 +00:00
Gabriel-Trintinalia
4ee14eca1d Implement System Calls (#7263)
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
2024-07-04 12:21:25 +10:00
Fabio Di Fabio
19d2079377 Reduce lock contention on transaction pool when building a block (#7180)
* Avoid keeping txpool lock during block creation

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>

* Update CHANGELOG

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>

* Remove unneeded synchronized

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>

---------

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
2024-06-13 10:25:51 +00:00
Gabriel-Trintinalia
2df721619a [MINOR] Rename deposit to depositRequest (#7145)
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
2024-05-29 03:39:44 +00:00
Gabriel-Trintinalia
7a5a3e0957 Minor improvements to EIP-7685 (#7142)
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
2024-05-28 07:55:38 +00:00
Danno Ferrin
0cca642bc5 EIP-2935 Nyota updates (#7120)
Bring implementation up to nyota version of the EIP,
and remove invasive change into the EVM code.

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

Co-authored-by: Lucas Saldanha <lucascrsaldanha@gmail.com>
Co-authored-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
Co-authored-by: Justin Florentine <justin+github@florentine.us>
Co-authored-by: Jason Frame <jason.frame@consensys.net>
Co-authored-by: Jason Frame <jasonwframe@gmail.com>
2024-05-20 06:56:51 +00:00
Gabriel-Trintinalia
f9a61a0b83 EIP-7685 (#7068)
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
Co-authored-by: Lucas Saldanha <lucascrsaldanha@gmail.com>
2024-05-15 10:47:43 +03:00
Danno Ferrin
821daf12b9 EIP-2935: Serve historical block hashes from state (#7080)
* EIP-2935: Serve historical block hashes from state

Refactor the BlockHashOperation to move hash lookup into the
ProtocolSpec, and combine logic with beacon root storage.

Update t8n test to use block hash list in new format

Signed-off-by: Danno Ferrin <danno@numisight.com>
Author: Gabriel-Trintinalia gabriel.trintinalia@consensys.net
Co-authored-by: Danno Ferrin danno@numisight.com
Co-authored-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
2024-05-12 07:43:35 +00:00
Fabio Di Fabio
40cfc800f7 New RPC methods miner_setExtraData and miner_getExtraData (#7078)
* New RPC methods to set and get block extra data

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>

* Remove redundant methods to set the extra data

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>

* miner_getExtraData unit tests

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>

* Add CHANGELOG

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>

* Apply suggestions from code review

Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>

---------

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
2024-05-09 08:34:14 +00:00
Fabio Di Fabio
690a2ea81e Refactor genesis config file and options (#7012)
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
2024-05-02 13:47:59 +00:00
Usman Saleem
0d6b38ee65 Apply Hyperledger license header to ethereum/blockcreation/ (#7033)
Signed-off-by: Usman Saleem <usman@usmans.info>
2024-05-02 11:12:44 +00:00
Usman Saleem
a98dfff4f6 build - Update license headers formatting (#7018)
Fix license headers formatting under: ethereum/

---------

Signed-off-by: Usman Saleem <usman@usmans.info>
2024-05-01 01:10:25 +00:00
knowmost
eb6c3495e3 chore: fix some typos in comments (#7005)
Signed-off-by: knowmost <knowmost@outlook.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
2024-05-01 07:58:56 +10:00
Lucas Saldanha
9cd50e1405 EIP-7220: Updates (Exit -> Withdrawal Request) (#6967)
Signed-off-by: Lucas Saldanha <lucascrsaldanha@gmail.com>
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
Co-authored-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
2024-05-01 08:03:54 +12:00
Danno Ferrin
381e692b1f Refactor: take blockchain out of MainnetTransactionProcessor (#6962)
Remove an unused parameter in MainnetTransactionProcessor, as well as
all code supporting sending that parameter.

Signed-off-by: Danno Ferrin <danno@numisight.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
2024-04-22 03:56:44 +00:00