* Replace getByBlockNumber by getByBlockHeader where trivial
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
* Fix tests
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
* Fix tests
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
* Rolledback change since tests will need non trivial changes
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
* Rollback replace
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
* Change other 2 trivial tests
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
* spotless
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
* Pass ProcessableBlockHeader to the mocks
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
* Replace getByBlockNumber by getByBlockHeader
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
* Add mock of blockHeader
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
* Use any() for the tests
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
* Add unit test for headBlockHeader()
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
---------
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
* bonsai layered worldstate subscription
* unsubscribe from worldstatestorage on close of BonsaiLayeredWorldState
* minor txpool logging improvements
Signed-off-by: garyschulte <garyschulte@gmail.com>
Speedup initcode validation by
- optimizing the jumpdest loop
- not caching initcode in the code cache
(but keep codecache for normal contracts).
Signed-off-by: Danno Ferrin <danno.ferrin@swirldslabs.com>
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>
* Improve withdrawals processing performance
* Add a changelog entry
* refactoring + remove the changelog entry as we have not change logs for the withdrawals
Signed-off-by: Ameziane H <ameziane.hamlat@consensys.net>
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>
* Do not check state on failed TXes
* Exclude EIPTests from test set
* Include withdrawals in block for blockchain reference test cases
* remove outdated test exclusions.
Signed-off-by: Danno Ferrin <danno.ferrin@swirldslabs.com>
Signed-off-by: Jason Frame <jason.frame@consensys.net>
Co-authored-by: Jason Frame <jason.frame@consensys.net>
Fix do not evaluate second expression if the value is present.
Signed-off-by: ħþ <12281088+helderjnpinto@users.noreply.github.com>
Signed-off-by: ħþ <12281088+helderjnpinto@users.noreply.github.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Associate block number and hash with the various invalid block warnings
Print a less obscure message when there's no error message.
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
* Don't cache protocol spec in block creator
Don't cache the protocol spec in the block creator. With the new
shanghaiTimestamp the correct spec may be a function of the timestamp
not just the block number. So every time we are asked to build a block
re-query the spec.
Signed-off-by: Danno Ferrin <danno.ferrin@swirldslabs.com>
* add withdrawalRoot computation
Signed-off-by: Jason Frame <jason.frame@consensys.net>
* include withdrawalsRoot and withdrawals when creating block
Signed-off-by: Jason Frame <jason.frame@consensys.net>
* validate withdrawals when validation mainnet blocks
Signed-off-by: Jason Frame <jason.frame@consensys.net>
* Fix invalid withdrawals root during backwards sync
Add withdrawalsRoot as part of BodyIdentifier
Add comment to avoid new issues when adding new fields to BlockBody
Signed-off-by: Jason Frame <jason.frame@consensys.net>
* Include withdrawalsRoot when creating new header in EngineNewPayload
Signed-off-by: Jason Frame <jason.frame@consensys.net>
* Use empty trie hash in genesis for withdrawalsRoot if shanghai is enabled at genesis
Signed-off-by: Jason Frame <jason.frame@consensys.net>
* Revert testing changes to AbstractEngineNewPayload
Signed-off-by: Jason Frame <jason.frame@consensys.net>
* Fix BesuController tests failing after GenesisState change
Signed-off-by: Jason Frame <jason.frame@consensys.net>
* Missing withdrawals wiring in BlockProcessor
Add empty withdrawals in GenesisState for shanghai at genesis
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
Signed-off-by: Jason Frame <jason.frame@consensys.net>
Co-authored-by: Simon Dudley <simon.dudley@consensys.net>
* Add option to limit requests in a single batch
Signed-off-by: Gabriel Trintinalia <gabriel.trintinalia@gmail.com>
* Change changelog
Signed-off-by: Gabriel Trintinalia <gabriel.trintinalia@gmail.com>
* Set default max batch size to one
Signed-off-by: Gabriel Trintinalia <gabriel.trintinalia@gmail.com>
* Update changelog
Signed-off-by: Gabriel Trintinalia <gabriel.trintinalia@gmail.com>
* Fix max rpc batch size for unit tests
Signed-off-by: Gabriel Trintinalia <gabriel.trintinalia@gmail.com>
* Change variable name
Signed-off-by: Gabriel Trintinalia <gabriel.trintinalia@gmail.com>
Signed-off-by: Gabriel Trintinalia <gabriel.trintinalia@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>
Add enforcement of the rule that EOF cannot create prior versions or
legacy EVM code contracts in create opcodes and create transactions.
Signed-off-by: Danno Ferrin <danno.ferrin@swirldslabs.com>
Use WorldStateBonsaiUpdater accounts cache each time we try to get an account from storage. Currently, we use this cache only in some code paths.
Signed-off-by: Karim TAAM <karim.t2am@gmail.com>
Co-authored-by: Ameziane H <ameziane.hamlat@consensys.net>
- 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>
* Swap lines order to ensure we commit FCU even if payload timestamp is before head timestamp
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
* spotless
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
* new type and fix for BesuEventsImplTest
* replace iteration over tx type enums with explicit lists, fixes BesuEventsImplTest
* fixes more tests
* fixes BlockchainQueriesTest by changing the ORDER of transaction types, wtf
Signed-off-by: Justin Florentine <justin+github@florentine.us>
Add withdrawals validation to EngineNewPayload and dry up tests
Refactor ForkChoiceUpdated as validation is shared
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>