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>
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>
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>
* 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>
- Print docker commands during upload and manifest creation
- Separate out docker push and docker manifest push commands for release
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
Added Ethereum execution spec test to be generated and executed by reference tests gradle task. Add `https://github.com/ethereum/execution-spec-tests/releases` as custom ivy repository to easily download and cache the test specs. Updated the reference test gradle file to generate the test Java classes.
Signed-off-by: Usman Saleem <usman@usmans.info>
Update following sections:
Gradle build, CircleCI, GitHub Actions, Docker
The devp2p TLS mutual authentication unit tests dealing with PKCS11+nss and QBFT+PKCS11+nss ATs were failing on Java 17 when dealing with RSA keys. The unit tests and AT are updated to use EC keys instead. The keystores, truststores, CRL etc. involved in those ATs are regenerated and detailed instructions are provided on how they are created.
Signed-off-by: Usman Saleem <usman@usmans.info>
- 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>
As an example of usecase - this should make it easier to build linux/amd64 images on M1.
Signed-off-by: Jiri Peinlich <jiri.peinlich@gmail.com>
Signed-off-by: Jiri Peinlich <jiri.peinlich@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
When Integration tests were migrated to JUnit 5 the gradle configuration was not added.
Fix various tests that had broken in the meantime:
- NPEs when EnclaveEncryptorType was introduced
- Account for new future nonce restrictions in the txpool
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
Co-authored-by: Danno Ferrin <danno.ferrin@swirldslabs.com>
Co-authored-by: Simon Dudley <simon.dudley@consensys.net>
Update the greclipse version in spotless as directed by build errors
to reduce random formatting errors.
Also, update formatting to new version
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
Sonar has been removed from the build workflow. This PR removes all
configuration and code markings that were used to facilitate it.
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
* first pass at building arm64 besu docker images
* add arch to docker publish
* add architecture envars to executors
* first pass at manifest docker
* setup docker in manifest step
* add base image to manifestDocker
* add changelog
Signed-off-by: garyschulte <garyschulte@gmail.com>
Change the unit test execution to use the Junit5 JUnitPlatform. This
allows for a mix of junit 4 and junit 5 tests and for a gradual
migration to junit 5 instead of a big bang. One class depended on
junit 4 exceptions and was updated. Two tests depending on
native libraries fail gracefully on mac (and only mac).
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
Migrate the jump dest analysis cache into a more generic code cache that
lives inside the EVM.
This is in preparation for Ethereum Object Formats where a string of
code may be treated differently depending on what EVM version is
executing the code. Newer versions will also have difference analyses to
run that will need different backing data structures.
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
Add block choice rule to Clique
1. Choose the block with the most total difficulty.
2. Then choose the block with the lowest block number.
3. Then choose the block whose validator had the least recent in-turn block assignment.
4. Then choose the block with the lowest hash.
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
Co-authored-by: Sally MacFarlane <sally.macfarlane@consensys.net>
* Bump SLF4J version
Signed-off-by: Diego López León <dieguitoll@gmail.com>
* Replace log4j2 API with SLF4j API
Signed-off-by: Diego López León <dieguitoll@gmail.com>
* Replace usage of LogManager#getFormatterLogger
This is for keeping compatibility with SLF4J. If neccesary, a specific formatter can be created for the RlpBlockImporter class
Signed-off-by: Diego López León <dieguitoll@gmail.com>
* Unset the default logging value for the retesteth
This is because it's not possible to resolve the root logger level into a Log4J2 field
Signed-off-by: Diego López León <dieguitoll@gmail.com>
* Prevent creation of Logger context outside SLF4J
org.hyperledger.besu.cli.BesuCommand#setAllLevels was taken from
https://github.com/apache/logging-log4j2/blob/rel%2F2.17.1/log4j-core/src/main/java/org/apache/logging/log4j/core/config/Configurator.java#L309
Signed-off-by: Diego López León <dieguitoll@gmail.com>
* Add FATAL level deprecation message
Signed-off-by: Diego López León <dieguitoll@gmail.com>
* [Sonar] Fix java:S2139
Exceptions should be either logged or rethrown but not both
Signed-off-by: Diego López León <dieguitoll@gmail.com>
* [Sonar] Fix java:S3457
Printf-style format strings should be used correctly
Signed-off-by: Diego López León <dieguitoll@gmail.com>
* Add changelog
Signed-off-by: Diego López León <dieguitoll@gmail.com>
* lots of errorprone fixes
* some license updates
* some mockito updates
* upgrade the rocksdb version
* Prometheus left at 0.9.0 as 0.10.0+ introduces OpenMetrics
related changes that break unit tests.
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
* exclude ATs from sonar cloud
Signed-off-by: Frank Li <b439988l@gmail.com>
* add debug line
Signed-off-by: Frank Li <b439988l@gmail.com>
* remove sonar property (should fail)
Signed-off-by: Frank Li <b439988l@gmail.com>
* try different class
Signed-off-by: Frank Li <b439988l@gmail.com>
* actual non covered code
Signed-off-by: Frank Li <b439988l@gmail.com>
* add sonar coverage flag
Signed-off-by: Frank Li <b439988l@gmail.com>
* delete debug entries
Signed-off-by: Frank Li <b439988l@gmail.com>
* trigger bad coverage
Signed-off-by: Frank Li <b439988l@gmail.com>
* try different file
Signed-off-by: Frank Li <b439988l@gmail.com>
* remove coverage trigger
Signed-off-by: Frank Li <b439988l@gmail.com>
Co-authored-by: Sally MacFarlane <sally.macfarlane@consensys.net>
Temporary use a build of this plugin that contains the proposed PR[1],
that improve the downloadLicenses task, reducing its execution time from
about 10 minutes to under 1 minute.
The build is temporary hosted in a custom repository, until a new upstream
version with the patch is released.
[1]https://github.com/hierynomus/license-gradle-plugin/pull/203
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Jacoco failed to instrument some tests using the old version of the tool
when build under jdk17
Signed-off-by: Jiri Peinlich <jiri.peinlich@gmail.com>
Co-authored-by: Sally MacFarlane <sally.macfarlane@consensys.net>
* adds a new docker build focusing on providing tools for debugging
* updates the latest build to only include a jvm, not a full jdk as shipped for Java 17
Signed-off-by: Justin Florentine <justin+github@florentine.us>