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>
Update t8n, b11r, and friends to support current execution spec
* bonsai migration introduced issues with deleted storage/accounts
* status on pre-constantinople json was invalid
* track refund across tx, not call frame
* allow tests to be executed by name
* fix withdrawal self-destruct test
* trace support in execution-spec-tests
* fix blob tests
* t8n results changes
Signed-off-by: Danno Ferrin <danno@numisight.com>
Move Besu custom error-prone checks into its own repository and use it as an external dependency. This allows to move to a newer version of Google errorprone checks as well while cleaning up build.gradle file.
Key changes resulted due to this change:
* String toLowerCase and toUpperCase to use Locale.ROOT as argument
* Use interface such as List,Map or NavigatableMap instead of concrete class where appropriate.
* Simplify StringBuilder to plain String
* Suppress warnings where appropriate.
-----
Signed-off-by: Usman Saleem <usman@usmans.info>
Update tracing and evm tool
* Intrinsic gas is optional in EVMTool
* For call series, also charge the gas given to the next call level for debug_ series calls.
Signed-off-by: Danno Ferrin <danno.ferrin@swirldslabs.com>
Wire through configuration for the Prague fork, including speculative
PragueGasCalculator, precompiles, genesis options, and implied
forks in GenesisState.
Signed-off-by: Danno Ferrin <danno.ferrin@swirldslabs.com>
Update a few EOF features based on updated spec
* Add a prague reference test target
* Run evmtool from prestate when no code specified
* RETF and dangling immediate arg fixes
Signed-off-by: Danno Ferrin <danno.ferrin@swirldslabs.com>
cleaning up the worldstate section, moving and renaming everything that is forest into a specific package in order to clarify the difference between Bonsai and Forest in the code.
---------
Signed-off-by: Karim Taam <karim.t2am@gmail.com>
Signed-off-by: matkt <karim.t2am@gmail.com>
Refactor some transaction calculations, including moving upfront
overflow checks from the constructor to the validator and optimizing
some RLP calculations. Also fix all lint errors.
Signed-off-by: Danno Ferrin <danno.ferrin@swirldslabs.com>
Introduce a new Journaled World State Updater. Within a transaction it
keeps one copy of account and storage state, restoring previous
revisions on reverts and exceptional halts. This updater only supports
post-merge semantics with regard to empty accounts, namely that they do
not exist in world state.
Adds an EvmConfiguration option for stacked vs journaled updater, and
wire it in where needed. The staked updater is default mode, which is
the current behavior prior to this patch.
Signed-off-by: Danno Ferrin <danno.ferrin@swirldslabs.com>
Add the ability to configure more parameters in the fluent API.
Specifically contract address, coinbase, difficulty, mixHash/prevRandao,
baseFee, block number, timestamp, gas limit, previous block hashes, and
versioned hashes. Also create EVM forks parametrically instead of by
a method name.
Signed-off-by: Danno Ferrin <danno.ferrin@swirldslabs.com>
Add the EIP-3155 "storage" option to the standard tracer, with the
caveat only updated storage is logged.
Signed-off-by: Danno Ferrin <danno.ferrin@swirldslabs.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>
* Add world context to transaction tracing API
Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu>
* Update changelog with PR ID
Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu>
* Add the Transaction to traceEndTransaction
Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu>
* Rebase on main
Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu>
* Add receipt-linked information to the transaction tracer
Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu>
* added test
Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
---------
Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu>
Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
Co-authored-by: Daniel Lehrner <daniel.lehrner@consensys.net>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Merge MutableAccount and EVMAccount functionalities by removing
EVMAccount, all calls to getMutable, and the WrappedEVMAccount that was
wrapping non-EVMAccounts in a mutable fashion. Instead, use a
MutableAccount in all cases an EVMAccount would have been used. This
also tends to reduce a level of layering in many places.
Signed-off-by: Danno Ferrin <danno.ferrin@swirldslabs.com>
* added missing methods to transaction interface, created new AccessListEntry interface to add it to the transaction interface
Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
* CHANGELOG.md entry
Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
* added missing javadoc entry
Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
* Update datatypes/src/main/java/org/hyperledger/besu/datatypes/Transaction.java
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
* Update datatypes/src/main/java/org/hyperledger/besu/datatypes/Transaction.java
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
* Make smart contract permissioning features work with london fork (#5727)
* Make smart contract permissioning features work with london fork
Override the transactionSimulator's default TransactionValidationParams with one that allows for exceeding the account balance (which effectively zeros the baseFee).
This mimics the way that eth_estimateGas and eth_call are implemented.
Similar change to #5277
Update ATs to use londonBlock (existing genesis allocs necessitate zeroBaseFee as well)
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
* changelog
Signed-off-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>
* Correctly cache the TransactionValidator instance on creation (#5726)
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
* Reference tests 12.3 (#5733)
Update Reference Tests to 12.3
* fix decoding error
* add ignored field
* update module
Signed-off-by: Danno Ferrin <danno.ferrin@swirldslabs.com>
Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
* Return all not selected transactions, not only invalid ones. (#5711)
This way it is possible for the caller to have more data about the selection
process.
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
* Address import performance issues (#5734)
* ensure we are on a single tuweni version
* factor out an unneeded concatenate
Signed-off-by: Danno Ferrin <danno.ferrin@swirldslabs.com>
Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
* Add type to PendingTransactionDetail (#5729)
* add type
* update changelog
---------
Signed-off-by: George Tebrean <george@web3labs.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
* Migrate to blobGas in execution-spec-tests (#5745)
Execution-spec-tests migrated from DataGas to BlobGas and checks for its
inclusion in tests now. Add needed support.
Signed-off-by: Danno Ferrin <danno.ferrin@swirldslabs.com>
Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
* remove AccessListEntry interface and move its class to the datatypes module
Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
* add missing cost methods to interface, add method to get RLP of transaction
Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
* updating hash with updated reference tests
Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
* added missing javadocs
Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
* fixed compiler errors in integration tests
Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
* retro blobGas name change into Transaction interface
Signed-off-by: garyschulte <garyschulte@gmail.com>
* removed methods from transaction interface which values can be derived through other means. Added new method encoded to return the encoded tx in Bytes instead of RLPOutput
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>
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Signed-off-by: Danno Ferrin <danno.ferrin@swirldslabs.com>
Signed-off-by: George Tebrean <george@web3labs.com>
Signed-off-by: garyschulte <garyschulte@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Simon Dudley <simon.dudley@consensys.net>
Co-authored-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Co-authored-by: Danno Ferrin <danno.ferrin@swirldslabs.com>
Co-authored-by: George Tebrean <99179176+gtebrean@users.noreply.github.com>
Co-authored-by: garyschulte <garyschulte@gmail.com>
* EvmTool fixes
A mixed collection of EVMTool fixes
* Ensure ECDSA algo is pre-configured
* used clamped math in an old gas calculator
* use correct gas calculator in fluent APIs
Signed-off-by: Danno Ferrin <danno.ferrin@swirldslabs.com>
* spotless
Signed-off-by: Danno Ferrin <danno.ferrin@swirldslabs.com>
---------
Signed-off-by: Danno Ferrin <danno.ferrin@swirldslabs.com>
The "code" mode of the EVMTool did not support the side effects of a
contract create. Expose the TransactionProcessor method that handles
that switching.
Signed-off-by: Danno Ferrin <danno.ferrin@swirldslabs.com>
* Call Operation performance improvements
- Move values that are the same or shared across the transaction to
TxValues record
- Move warm and cold storage to undoable sets and tables.
- Move transient storage to undoable table.
- Move address hashing inside of address with a memoized field.
- lazy create EOF return stack
Signed-off-by: Danno Ferrin <danno.ferrin@swirldslabs.com>
Execution-spec-tests migrated from DataGas to BlobGas and checks for its
inclusion in tests now. Add needed support.
Signed-off-by: Danno Ferrin <danno.ferrin@swirldslabs.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>
* track CREATE/CREATE2/create-tx in a new "creates" field in the MessageFrame
* re-wrote Self-Destruct logic for clarity and optional EIP-6780 semantics.
Signed-off-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>
An omnibus of minor changes needed for t8n-server to work with the EFs
new execution-spec-tests framework
* Reduce logging output
* Fix json library mismatch between t8n and t8n-server
* Add hook to enumerate supported forks
* temporarily map Shanghai+6780 to Cancun
* add to main distro under 'evmtool' name
* No longer support the "protected" attribute in TXes
Signed-off-by: Danno Ferrin <danno.ferrin@swirldslabs.com>
- 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>
* add new class to reflection config
* move CLI output to be system-err oriented
* make logger in evmtool nop
* exclude some problematic jars from compilation
- mixed versions of bouncy castle
- netty initializations of log4j
* Standardize JSON ObjectMapper Construction
* Add some manual mappings
* Directly instantiate crypto algorithms where appropriate
Signed-off-by: Danno Ferrin <danno.ferrin@swirldslabs.com>
Updates needed to keep executing execution-spec-tests
* add withdrawals support
* add access lists to transactions
* accept t8n and b11r CLI args that are zero length or all whitespace
* Enumerate forks in t8n and b11r help
* remove JSON wrapping from t8n transaction RLP
Signed-off-by: Danno Ferrin <danno.ferrin@swirldslabs.com>
As per a recent EIP update the opcode numbers for Transient Storage
have been updated. EOF opcodes were also updated.
Update the code and test cases for the new numbers.
Signed-off-by: Danno Ferrin <danno.ferrin@swirldslabs.com>