change Transaction Validation and Selection Plugin to make them more useful
Signed-off-by: Stefan <stefan.pingel@consensys.net>
Signed-off-by: Stefan Pingel <16143240+pinges@users.noreply.github.com>
Co-authored-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
* add plugin API to enable plugins to validate transaction before they are added to the transaction pool
Signed-off-by: Stefan <stefan.pingel@consensys.net>
* updated plugin version
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Stefan <stefan.pingel@consensys.net>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
* create a bonsai based reference test worldstate
-> getOrCreate in BonsaiWorldStateUpdateAccumulator - do not throw if we discover an empty account in a non-null BonsaiValue<Account>
-> add curentStateRoot to t8n
-> storageEntriesFrom and streamAccounts implemented in BonsaiWorldStateKeyValueStorage
-> add endKey version of streamFromKey
* bonsai fix for self-destruct and create2 at the same address and same block
Signed-off-by: garyschulte <garyschulte@gmail.com>
Signed-off-by: Karim TAAM <karim.t2am@gmail.com>
Co-authored-by: Karim TAAM <karim.t2am@gmail.com>
Implement a method to trace a range of blocks and have access to the worldstate before and after the tracing
Signed-off-by: Karim TAAM <karim.t2am@gmail.com>
Implement EIP 4788
Unit tests need to be added
Implementation is working for test net 8, address of the contract will probably change
EIP 4788 is still not finalized. Some changes might be necessary.
Signed-off-by: Stefan <stefan.pingel@consensys.net>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
* Implements EIP-4844.
* introduces a Hardfork class to the protocol schedule system
* new Engine APIs required for CL to work on 4844
* new DataGas type for tracking block cost for 4844 data
* new VersionedHash type to reflect that a versioned hash is not quite a pure sha256
* incorporates wrapped jc-kzg library for KZG point evaluations
* New transaction type, and domain objects for constituent parts to represent the Blobs, KZGCommitments, and Proofs used for 4844
* RLP encoders and decoders to support new transaction type
* gas pricing calculators for the new type of gas
* plugin-api version was changed
Signed-off-by: Justin Florentine <justin+github@florentine.us>
Co-authored-by: Jiri Peinlich <jiri.peinlich@gmail.com>
Co-authored-by: Jason Frame <jason.frame@consensys.net>
Co-authored-by: garyschulte <garyschulte@gmail.com>
Co-authored-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
Co-authored-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
Co-authored-by: Stefan <stefan.pingel@consensys.net>
Co-authored-by: spencer-tb <spencer@spencertaylorbrown.uk>
* junit5 updates
Signed-off-by: Justin Florentine <justin+github@florentine.us>
* update t8n test
Cancun gas claculator was inheriting from london, should have been shanghai.
Signed-off-by: Danno Ferrin <danno.ferrin@swirldslabs.com>
---------
Signed-off-by: Justin Florentine <justin+github@florentine.us>
Signed-off-by: Danno Ferrin <danno.ferrin@swirldslabs.com>
Co-authored-by: Jiri Peinlich <jiri.peinlich@gmail.com>
Co-authored-by: Jason Frame <jason.frame@consensys.net>
Co-authored-by: garyschulte <garyschulte@gmail.com>
Co-authored-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
Co-authored-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
Co-authored-by: Stefan <stefan.pingel@consensys.net>
Co-authored-by: spencer-tb <spencer@spencertaylorbrown.uk>
Co-authored-by: Danno Ferrin <danno.ferrin@swirldslabs.com>
* Extend OperationTracer with new methods, create
Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
* Rename ExtendedOperationTracer to BlockAwareOperationTracer
Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
* fixed plugin api hash
Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
* added missing javadoc comments
Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
* Update evm/src/main/java/org/hyperledger/besu/evm/tracing/OperationTracer.java
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
* Only update peer with the first and last block (#5659)
* only update peer with the first and last block
Signed-off-by: Stefan <stefan.pingel@consensys.net>
Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
* Put download links into CHANGELOG and do some clean up (#5660)
* put the download links for 23.4.4 into the CHANGELOG.md
* clean up CHANGELOG
Signed-off-by: Stefan <stefan.pingel@consensys.net>
Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
* Add --amend to docker manifest create to fix docker latest tag (#5661)
We need to replace previous release's latest tag. Might be broken due to a recent change in the docker command implementation
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
* Add Xlayered-tx-pool to the config log printout (#5665)
Unrelated: clarify epoch length in javadoc
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
Co-authored-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
* Add hooks to AbstractCreateOperation for library users (#5656)
Add hooks for a successful contract create, a failed contract create,
and an invalid contact create. Users of the library will be able to
customize create responses without having to replace core logic.
Signed-off-by: Danno Ferrin <danno.ferrin@swirldslabs.com>
Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
* Test updates for cancun execution-spec-tests (#5670)
- support legacy V values (larger V value) and type 1+ (v is recId only)
- new fields
- shared transaction extraction
- rejection detection
Signed-off-by: Danno Ferrin <danno.ferrin@swirldslabs.com>
Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
* Upgrade BouncyCastle libraries (#5675)
Upgrade bouncy castle to v1.75. This involved a change in maven
coordinates for other modules.
Signed-off-by: Danno Ferrin <danno.ferrin@swirldslabs.com>
Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
* Introduce transaction validator interface (phase 1) (#5673)
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
* Only validate `--miner-enabled` option for ethash networks (#5669)
* Modify the min-gas-price option validation
* Check for whether ethash is in use, either from genesis or network config, and use that for miner checks
* Add genesis configuration isPoa() convenience function
---------
Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>
Signed-off-by: Matt Whitehead <matthew1001@hotmail.com>
Co-authored-by: Simon Dudley <simon.dudley@consensys.net>
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
* Update tuweni2.4.2 (#5684)
* Revert "Revert "Update Tuweni to 2.4.1 (#5513)" (#5585)"
This reverts commit 6111e1bbc3.
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
* update Tuweni to 2.4.2
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
---------
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
* Do not leak references to PendingTransactions (#5693)
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
* remove v0 version of the database (#5698)
Signed-off-by: Karim TAAM <karim.t2am@gmail.com>
Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
* updated plugin api hash
Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
* spotless
Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
* updating plugin api hash
Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
* moved transcation interface to datatypes to use it in the OperationTracer.traceStartTransaction method
Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
* fix import
Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
---------
Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
Signed-off-by: Stefan <stefan.pingel@consensys.net>
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
Signed-off-by: Danno Ferrin <danno.ferrin@swirldslabs.com>
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>
Signed-off-by: Matt Whitehead <matthew1001@hotmail.com>
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
Signed-off-by: Karim TAAM <karim.t2am@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Stefan Pingel <16143240+pinges@users.noreply.github.com>
Co-authored-by: Simon Dudley <simon.dudley@consensys.net>
Co-authored-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
Co-authored-by: Danno Ferrin <danno.ferrin@gmail.com>
Co-authored-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Co-authored-by: Matt Whitehead <matthew1001@gmail.com>
Co-authored-by: Antoine Toulme <antoine@lunar-ocean.com>
Co-authored-by: matkt <karim.t2am@gmail.com>
The proposed pull request introduces a feature that allows healing of the flat database by streaming the flat database data and validating it by generating a proof from the trie structure. If the proof is found to be invalid, the code traverses the trie to fix the invalid range. To optimize the process and avoid checking the entire flat database, the PR includes enhancements such as tracking the accounts that need to be repaired during SnapSync. By implementing these optimizations, the PR aims to significantly reduce the time and resources required for repairing the flat database.
Signed-off-by: Karim TAAM <karim.t2am@gmail.com>
* update to 2.4.1
* update use of DNS daemon with Vertx
* fix issue with Bytes.repeat
* update antlr version
* fix dns tests
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
---------
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
This API fulfils the basic requirements, but will probably be extended in the near future.
Signed-off-by: Stefan <stefan.pingel@consensys.net>
Signed-off-by: Stefan Pingel <16143240+pinges@users.noreply.github.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Refactor crypto, datatypes, and plugin-api to reduce plugin APIs in the EVM.
Split crypto into crypto services and crypto algorithms
Reverse the dependency between datatyps and plugin-api.
Remove plugin Hash and Address types (use datatypes)
Move PublicKey and Quantity into datatypes.
Lots of changes to imports and build files, and some fromPlugin calls removed.
Signed-off-by: Danno Ferrin <danno.ferrin@swirldslabs.com>
Signed-off-by: Danno Ferrin <danno.ferrin@shemnon.com>
Co-authored-by: Justin Florentine <justin+github@florentine.us>
Add deposits to the Execution Layer block structure: EIP-6110. The scope of this commit is to add Deposit related info into BlockHeader and BlockBody. The rest of the EIP including RPC API and validating Deposit with be included in future PRs.
---------
Signed-off-by: Navie Chan <naviechan@gmail.com>
Signed-off-by: navie <naviechan@gmail.com>
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
- Added missing javadocs so that javadoc doclint passes against JDK 17 (invoke by Besu gradle build).
- Exclude following packages from javadoc lint:
org.hyperledger.besu.privacy.contracts.generated
org.hyperledger.besu.tests.acceptance.*
- Temporarily exclude ethereum and evm submodule for doc lint checks.
- Run the javadoc task using GitHub actions (use Java 17) to report any javadoc errors during the PR builds
- Updating plugin-api build.gradle with new hash as javadoc comments caused it to change
Signed-off-by: Usman Saleem <usman@usmans.info>
* new type and fix for BesuEventsImplTest
* replace iteration over tx type enums with explicit lists, fixes BesuEventsImplTest
* fixes more tests
* fixes BlockchainQueriesTest by changing the ORDER of transaction types, wtf
Signed-off-by: Justin Florentine <justin+github@florentine.us>
* use debug rpc endpoint to resync worldstate
* Reset transaction pool state every time the initial sync is done
Signed-off-by: garyschulte <garyschulte@gmail.com>
Co-authored-by: Fabio Di Fabio <fabio.difabio@consensys.net>
* implementation of Bonsai snapshots based BonsaiWorldStateArchive
includes: try-with-resources and AutoCloseable WorldState in order to release snapshots when we are done with them
Signed-off-by: garyschulte <garyschulte@gmail.com>