* 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>
* split ATs into privacy/permissioning/etc and the rest
* don't run non-mainnet ATs on PR builds
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
* Handle INVALID_PARAMS with a 200 http status code
* Change tests to expect INVALID_PARAMS with a 200 http status code
* Add change log entry
* Change test to handle jsonRPC result rather than raised exception
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
* override port conflict check
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
* add enum for special test type
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
* Revert "Revert "Upgrade OpenTelemetry (#3675)" (#4031)"
This reverts commit 17de636fe2.
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
* Make sure we don't initialize the OpenTelemetry global singleton by mistake
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
* disable global otel singleton explicitly
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
* make sure to set GlobalOpenTelemetry at most once to avoid test failures
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
* reset for tests
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
* fix changelog
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
Due to subtle differences between Bytes32 and UInt256 the changes failed
burn-in testing and are being reverted.
Signed-off-by: Danno Ferrin <danno.ferrin@swirldslabs.com>
Signed-off-by: Danno Ferrin <danno.ferrin@swirldslabs.com>
The current internal storage APIs implement UInt256 rather than Bytes32,
which is an accident of prior EVM design. This migrates all internal
handling of storage addresses and values to Bytes32.
The main performance gain is reduced GC pressure, in that UInt256
stores the data as an array of ints, whereas Bytes32 keeps a sliced or
wrapped array of bytes. Since database APIs are all byte array based
this should remove unneeded conversions when going to/from the DB.
Signed-off-by: Danno Ferrin <danno.ferrin@swirldslabs.com>
modified flexibleutil so it works with dynamic byte arrays, some logs to remove
smart contracts adapted, changed bytecodes
solidity contracts changed so they use bytes instead of bytes32
modified flexibleutil to support ec keys
flexible privacy tests adapted
Signed-off-by: Miguel Rojo <miguelangel.rojofernandez@mastercard.com>
Signed-off-by: Miguel Angel Rojo <miguelangel.rojofernandez@mastercard.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
* Create a new flag on RocksDB (--Xplugin-rocksdb-high-spec-enabled) for high spec hardware to boost performance.
Signed-off-by: Ameziane H <ameziane.hamlat@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>
* create AbstractJsonRpcTest to enable future code reuse in similar tests
Signed-off-by: Pedro Novais <jpvnovais@gmail.com>
Co-authored-by: Antony Denyer <git@antonydenyer.co.uk>
* Revert "ignore the tests that use tessera enclave via docker (#4297)"
This reverts commit 98e214cedc.
Signed-off-by: Sally MacFarlane <sally.macfarlane@consensys.net>
* lock version of tessera and make public
Signed-off-by: Sally MacFarlane <sally.macfarlane@consensys.net>
Signed-off-by: Sally MacFarlane <sally.macfarlane@consensys.net>
* removed constraint with the length of the privacy public key
* refactor to include tessera ec encryptor
* added EC snippet to the tessera json config, still need to replace base64string from web3j
* acceptance tests working after modifying the web3j library to allow secp256r1 keys
* using NACL encryptor by default
* using web3j v4.9.4 and web3j-quorum v4.9.0
Signed-off-by: Miguel Rojo <miguelangel.rojofernandez@mastercard.com>
Co-authored-by: Antony Denyer <git@antonydenyer.co.uk>
* Upgrade OpenTelemetry
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
* remove a single sleep, poll with a for loop instead
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
* use the new approach to send trace requests
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
Co-authored-by: Sally MacFarlane <sally.macfarlane@consensys.net>
* check that the timestamp in fcu payload attributes is greater than the one of the head block
Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
* added acceptance tests
Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
* updated EngineForkchoiceUpdated to return INVALID_FORKCHOICE_STATE when finalized block hash or safe block hash are unknown
Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
* fixed tests and added new ones for invalid forkchoice state and saving safe block
Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
* Upgrade Errorprone
Upgrade errorprone to 2.13.1. Like all errorprone upgrades there are
new checks requiring code changes.
* Unused methods now cause compilation errors
* fields must be static and final
* Effectively constant booleans must now be returned as true/false.
* longs should not auto-cast to double.
* turn off errorprone javadocs
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
Co-authored-by: Sally MacFarlane <sally.macfarlane@consensys.net>
* Introduces new JsonRPCService that handles both http and websockets
* Removes websocket specific configs
* renames WebSocketRequestHandler to WebSocketMessageHandler to be more in line with websocket semantics.
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Signed-off-by: Justin Florentine <justin+github@florentine.us>
Co-authored-by: Fabio Di Fabio <fabio.difabio@consensys.net>
* Fix two operand stack tests
Signed-off-by: Diego López León <dieguitoll@gmail.com>
* Remove unreachable assert
Signed-off-by: Diego López León <dieguitoll@gmail.com>
* Replace expected annotation field with assert
Signed-off-by: Diego López León <dieguitoll@gmail.com>
* Extract variables to let only a single call for assert
Signed-off-by: Diego López León <dieguitoll@gmail.com>
Co-authored-by: Sally MacFarlane <sally.macfarlane@consensys.net>
* require 3.1.15 of jnr-posix
* cover more bases with epl license
Signed-off-by: Sally MacFarlane <sally.macfarlane@consensys.net>
Co-authored-by: Stefan Pingel <16143240+pinges@users.noreply.github.com>
* avoid the edge case of long minimum value which gives a negative value when passed into abs()
* changed some Longs to long where they were statically intialized
* replace Lists.emptyList() with Collections.emptyList()
* removed unnecessary eq() invocation and resulting code smell
Signed-off-by: Sally MacFarlane <sally.macfarlane@consensys.net>
* Replace Log4j2 API with SLF4j API
* Replace explicit Log4J2 with util call
* Replace ThreadContext with Slf4J's MDC in test
* Inspect raw request parameter for admin_changeLogLevel
* Add errorprone rule to prevent the creation Log4j2 loggers
Signed-off-by: Diego López León <dieguitoll@gmail.com>
Co-authored-by: Sally MacFarlane <sally.macfarlane@consensys.net>