Add Genesis ("CancunEOFTime") and reference test ("CancunEOF") support
for a temporary Cancun+EOF fork, in anticipation of potential devnets.
Signed-off-by: Danno Ferrin <danno@numisight.com>
Make the max code size and max initcode size a part of the EVM
configuration. As part of the change we need to move the tasks
CodeFactory once handled as a static class and move it into the EVM.
This has a nice follow on effect that we don't need to pass in max EOF
versions or max code sizes anymore.
Signed-off-by: Danno Ferrin <danno@numisight.com>
Check and test for the unused container rule, and only returncontract
targets can have truncated data rule.
Also test the other subcontainer rules in unit tests.
Signed-off-by: Danno Ferrin <danno@numisight.com>
A complete and up to date implementation of EIP-7692 EOF v.1. For genesis
file activation use "PragueEOFTime", for references tests it activates as
part of Prague.
Signed-off-by: Danno Ferrin <danno@numisight.com>
Remove all EIP-3074 code from Besu. Since EIP-3074 has been replaced
with EIP-7702 in Pectra, and there is no intent to schedule it for a
future fork there is no need to retain the code.
Signed-off-by: Danno Ferrin <danno@numisight.com>
* build: Update jacoco version to 0.8.11
* build: Enforce Java 21 and above check for build
* CI: Use Java 21 in Github CI workflows
* CI: Use Java 21 in circleci workflows
* build: Update gradle verification metadata for jacoco 0.8.11
* refactor: Fix javadoc related warnings which are applicable to Java 21
* fix(test): BackwardSyncAlgSpec slightly increase timeout to pass it in CI
---------
Signed-off-by: Usman Saleem <usman@usmans.info>
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>
* 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>
* Upgrade reftests to 13.3
* Implement retroactive EIP-7610
We need to do both of these at once as the reference tests needed to be
updated to reflect the changes in the retroactive EIP.
EIPTests for prague are disabled as they are still in flux
Signed-off-by: Danno Ferrin <danno@numisight.com>
* Add EIP-2537 precompiles to prague
* Update gas schedule
* Update native lib to one with subgroup checks in mul and multiexp
* re-cost gas on most vectors
Signed-off-by: Danno Ferrin <danno@numisight.com>
adds AUTH and AUTHCALL opcodes to Prague evms.
adds a mutable authorizedBy:Address field to the MessageFrame
adds AUTH opcode costing to gas calculators
---------
Signed-off-by: Justin Florentine <justin+github@florentine.us>
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>
Preparatory for EOF. Refactor the gas calculation logic so that it does
not depend on specific stack entries, and break out the pieces of the
calculation for readability.
Signed-off-by: Danno Ferrin <danno@numisight.com>
Co-authored-by: Justin Florentine <justin+github@florentine.us>
Co-authored-by: Danno Ferrin <danno@numisight.com>
Upgrade spotless to 1.22.0 and reformat.
This is required for Java21 support.
Signed-off-by: Danno Ferrin <danno@numisight.com>
Co-authored-by: Danno Ferrin <danno@numisight.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
The BerlinGasCalculator had a side effect of warming addresses when
calculating call gas costs. By introducing a boolean we can keep the
side effects in the operation instead of in the gas calculator. This
makes gas cost estimation by downstream users of the API safer.
Signed-off-by: Danno Ferrin <danno.ferrin@swirldslabs.com>
* wildcard in place of task name in path, in case it gets changed.
* test splitting action is unreliable at these numbers of tests
* pin to new gradle action, increase runners
* found the missing tests, back to parity
* rename to avoid consolidation status collision with workflow name
* fixes javadoc checks at build time
* overrides project version on release, so embeds (startup info) will match release artifacts
---------
Signed-off-by: Justin Florentine <justin+github@florentine.us>
Co-authored-by: RoboCopsGoneSock <158174948+RoboCopsGoneSock@users.noreply.github.com>
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>
* Remove uses of org.jetbrains annotations
We have a mix of org.jetbrains.annotations.NotNull and
javax.annotations.Nonnull. Change all to the latter. Add an errorprone
check to enforce this.
Signed-off-by: Danno Ferrin <danno.ferrin@swirldslabs.com>
* spotless
Signed-off-by: Danno Ferrin <danno.ferrin@swirldslabs.com>
* spdx
Signed-off-by: Danno Ferrin <danno.ferrin@swirldslabs.com>
---------
Signed-off-by: Danno Ferrin <danno.ferrin@swirldslabs.com>
* Change halt reason when contract creation fails due to collision or account already exists
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
* Fix ATs
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
* Add ILLEGAL_STATE_CHANGE to the list of hal reasons that must not be ignored when producing the vm trace
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
* add changelog
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
---------
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.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>
The fluent API incorrectly added the code size limit in Tangerine
Whistle instead of first adding it in Spurious Dragon.
Signed-off-by: Danno Ferrin <danno.ferrin@swirldslabs.com>