* Prepare for version 23.1.1-SNAPSHOT (#5067)
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
* Add getPayloadBodiesByRangeV1 and getPayloadBodiesByHash engine methods (#4980)
* Add engine get payload body methods and test
Signed-off-by: Zhenyang Shi <wcgcyx@gmail.com>
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
* Add header
Signed-off-by: Zhenyang Shi <wcgcyx@gmail.com>
* Update result struct & add test
Signed-off-by: Zhenyang Shi <wcgcyx@gmail.com>
* Change constant to use upper case
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
* Add PayloadBody class and withdrawals to response of methods
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
* Add unit tests
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
* Add changelog
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
* spotless
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
* Add check to prevent returning trailing null results past the head
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
* Add test to check trailing null post head scenario
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
* Split tests into pre and post shanghai
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
* spotless
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
* Rename methods
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
* Use getName() to log method name
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
* spotless
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
* Rename variable
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
* Call constructor directly
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
* Fix ByHash json parsing
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
* Fix json parsing again
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
* Add check to prevent unnecessary queries
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
* Refactor method
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
* Add new error code for EngineGetPayloadBodies methods
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
* Add return error for request above the API limit
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
* Add constructor for empty response
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
* add check for number of blocks requested and for requests of post head
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
* Add test to check error code when request exceeds API limits
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
* add constant for max blocks allowed per request
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
* spotless
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
* Fix some nits
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
* Add invalid params check
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
* Add tests for invalid params check
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
* Fix test and spotless
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
* Revert "Fix json parsing again"
This reverts commit 558d325bf3.
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
* Revert "Fix ByHash json parsing Signed-off-by: Simon Dudley <simon.dudley@consensys.net>"
This reverts commit 663e11e2
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
* Use UnsignedLongParameter to cast params of the request
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
* Add optional withdrawals to the NewPayload log (#5021)
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
* kubernetes and errorprone - update versions (#5013)
* update errorprone and kubernetes versions
* fixed errorprone issues in prod cod
* fixed errorprone issues in test code
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
* Rename JsonRpcService to EngineJsonRpcService (#5036)
* rename JsonRpcService to EngineJsonRpcService
Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
* Params should be single item of array type, not outer array of strings (#5037)
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
* Add EIP-2537 (BLS12-381 curve precompiles) to Cancun (#5017)
Add the BLS curve precompiles into the registry for cancun. All of the
curve precompiles have been here since berlin, so this is just wiring
them in.
Signed-off-by: Danno Ferrin <danno.ferrin@swirldslabs.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
* Use UnsignedLongParameter to cast params of the request
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
* Add optional withdrawals to the NewPayload log (#5021)
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
* kubernetes and errorprone - update versions (#5013)
* update errorprone and kubernetes versions
* fixed errorprone issues in prod cod
* fixed errorprone issues in test code
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
* Rename JsonRpcService to EngineJsonRpcService (#5036)
* rename JsonRpcService to EngineJsonRpcService
Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
* Params should be single item of array type, not outer array of strings (#5037)
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
* Add EIP-2537 (BLS12-381 curve precompiles) to Cancun (#5017)
Add the BLS curve precompiles into the registry for cancun. All of the
curve precompiles have been here since berlin, so this is just wiring
them in.
Signed-off-by: Danno Ferrin <danno.ferrin@swirldslabs.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
* Convert start and count from hex to match JSON-RPC Spec standard
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
---------
Signed-off-by: Zhenyang Shi <wcgcyx@gmail.com>
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
Signed-off-by: Danno Ferrin <danno.ferrin@swirldslabs.com>
Co-authored-by: Zhenyang Shi <wcgcyx@gmail.com>
Co-authored-by: Simon Dudley <simon.dudley@consensys.net>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Daniel Lehrner <daniel.lehrner@consensys.net>
Co-authored-by: Danno Ferrin <danno.ferrin@swirldslabs.com>
* Revert "Keep Worldstate Storage open for Bonsai archive latest layer (#5039)" (#5073)
This reverts commit e7150102ea.
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
* Support post merge forks at genesis for hive tests (#5019)
Signed-off-by: Jason Frame <jason.frame@consensys.net>
* Fix manifest docker not skipping interim builds for RCs (#5068)
Signed-off-by: Jason Frame <jason.frame@consensys.net>
* Fix PoS checkpoint validation (#5081)
* change validation to lessThan
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
* Change exception message to PoS instead of Near head
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
* Add unit test and fix message of existing unit test
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
---------
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
* moves check for init code length before balance check (#5077)
Signed-off-by: Justin Florentine <justin+github@florentine.us>
* bump revision for 23.1.x release branch
Signed-off-by: garyschulte <garyschulte@gmail.com>
* Burn in build of 23.1.0 (#5093)
* rebase off of burn-in release, remove unreleased 23.1.0-RC2 from CHANGELOG
Signed-off-by: garyschulte <garyschulte@gmail.com>
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
Signed-off-by: Ameziane H <ameziane.hamlat@consensys.net>
Signed-off-by: Karim TAAM <karim.t2am@gmail.com>
* re-default global max rpc batch size to 1k (#5104) (#5105)
* default global max rpc batch size to 1000 for now
Signed-off-by: garyschulte <garyschulte@gmail.com>
* Fix Layered World State issue (#5076)
* Use the copy during prepareTrieLog instead of saveTrieLog
* add final flag on BonsaiWorldStateUpdater
* Use a copy of BonsaiInMemoryWorldState inside prepareTrieLog
* add link to persisted worldstate storage
* fix tests
* Make a copy of the worldstate after committing changes to the trielog
* spotless + remove maybeUnSubscribe in setNextWorldView
* subscribe storage on layered worldstate
* fix null issue
* not close layered worldstate during getAccount
* clean code
* Add changelog entry
---------
Signed-off-by: ahamlat <ameziane.hamlat@consensys.net>
Signed-off-by: Karim TAAM <karim.t2am@gmail.com>
Co-authored-by: Karim TAAM <karim.t2am@gmail.com>
* Add shanghaiTime to sepolia (#5088)
Update and fix forkId tests
Move timestamp forks from getForkBlockNumbers to getForkBlockTimestamps in JsonGenesisConfigOptions - this ultimately gets used to popoulate the ForkIdManager which handles lists of blocks and timestamps the same way so this hasn't changed any actual behaviour, but rather supports the test fixes.
Implement TransitionProtocolSchedule.streamMilestoneBlocks as a concatenation of blockNumbers++blockTimestamps. This may have been a latent bug since it's used to update the node record when a fork transition occurs.
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
* If a PoS block creation repetition takes less than a configurable dur… (#5048)
* If a PoS block creation repetition takes less than a configurable duration, then waits before next repetition
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
* Update CHANGELOG
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
* Add unit test
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
* Update besu/src/main/java/org/hyperledger/besu/cli/BesuCommand.java
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
* Update besu/src/main/java/org/hyperledger/besu/cli/options/unstable/MiningOptions.java
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>
* Allow dashes in ethstats password (#5090)
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
* reintroduce checking of block height for certain tasks when we are not PoS (Revert PR#3911) (#5083)
* reintroduce checking of block height for certain tasks when we are not PoS (Revert PR#3911)
Signed-off-by: Stefan Pingel <16143240+pinges@users.noreply.github.com>
* Allow other users to read the /opt/besu dir when using docker (#5092)
Signed-off-by: Rafael Matias <rafael@skyle.net>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
* Only use MAINNET version of KZG (#5095)
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
* add more context to exception messages and debug logging (#5066)
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
* Fix block value calculation (#5100)
* Add gasUsed calculation
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
* Fix unit test
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
* Fix typo
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
---------
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
* Add 23.1.1-RC1 changelog
Signed-off-by: Jason Frame <jason.frame@consensys.net>
* Change version to 23.1.1-RC1
Signed-off-by: Jason Frame <jason.frame@consensys.net>
---------
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
Signed-off-by: Zhenyang Shi <wcgcyx@gmail.com>
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
Signed-off-by: Danno Ferrin <danno.ferrin@swirldslabs.com>
Signed-off-by: Jason Frame <jason.frame@consensys.net>
Signed-off-by: Justin Florentine <justin+github@florentine.us>
Signed-off-by: garyschulte <garyschulte@gmail.com>
Signed-off-by: Ameziane H <ameziane.hamlat@consensys.net>
Signed-off-by: Karim TAAM <karim.t2am@gmail.com>
Signed-off-by: ahamlat <ameziane.hamlat@consensys.net>
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Signed-off-by: Stefan Pingel <16143240+pinges@users.noreply.github.com>
Signed-off-by: Rafael Matias <rafael@skyle.net>
Co-authored-by: Simon Dudley <simon.dudley@consensys.net>
Co-authored-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
Co-authored-by: Zhenyang Shi <wcgcyx@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Daniel Lehrner <daniel.lehrner@consensys.net>
Co-authored-by: Danno Ferrin <danno.ferrin@swirldslabs.com>
Co-authored-by: Justin Florentine <justin+github@florentine.us>
Co-authored-by: garyschulte <garyschulte@gmail.com>
Co-authored-by: ahamlat <ameziane.hamlat@consensys.net>
Co-authored-by: Karim TAAM <karim.t2am@gmail.com>
Co-authored-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Co-authored-by: Stefan Pingel <16143240+pinges@users.noreply.github.com>
Co-authored-by: Rafael Matias <rafael@skyle.net>
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>
* Gradle 7.2 upgrade / Java 17 Build Support
* Upgrade to Gradle 7.2, which supports Java 17
* Regenerate gradlew script and wrapper (as recommended)
* Suppress the removal warning for `AccessController` for now
* Update the JMH version to get rid of Gradle deprecation warning
* Add spotless `targetExcludes` so it won't re-format submodules
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
* Less Spotless Gradle Warnings
Spotless and Gradle 7.x does not play nicely with using a fileTree as a
target and should be using plain strings. This should get rid of the
`Execution optimizations have been disabled`... warnings.
* Move Generated Reference Tests into the `build` dir
Generated reference test are currently generated into `src`, which is in
violation of the standard maven layouts. They should be in the `build`
directory as they are artifacts not maintained in source control.
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
Upgrade Gradle to 7.1.1.
Add Gradle configs to allow Java 16 compilation.
Upgrade most dependencies to current versions.
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
Update spotless to 5.14.2 and java-google-format to 1.10.0.
Both of these are needed to support Java 16 and Gradle 7.x.
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
Update ErrorProne to 2.7.1 (needed for Gradle 7.x upgrade).
All new rules are fairly benign and easy to fix.
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
* change enr sequence field to be a long scalar instead of open ended byte array
* removed utility method for creating packets
* made ping/pong parsing backwards compatible with older besu clients
Signed-off-by: Justin Florentine <justin.florentine@consensys.net>