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>
* Add Besu version to DB metadata. Check for downgrades and reject if version < version recorded in DB metadata.
Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>
* Add --allow-downgrade CLI arg. If set it allows the downgrade and updates the Besu version in the metadata file to the downgraded version.
Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>
* Update gradle verification XML
Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>
* Add and update tests
Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>
* Refactoring
Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>
* Remove versioning from RocksDB, now in separate VERSION_DATADATA.json
Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>
* Tidy up and tests for the new class
Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>
* Move downgrade logic into VersionMetadata as BesuCommand is already very big
Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>
* Add more tests
Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>
* Refactor the naming of the option to version-compatibility-protection
Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>
* Remove remaining references to allow-downgrade
Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>
* Rename test
Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>
* Update comments
Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>
* Metadata verification update
Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>
* gradle fix
Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>
* Enable version downgrade protection by default for non-named networks
Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>
* Fix default logic
Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>
* Update ethereum/core/src/main/java/org/hyperledger/besu/ethereum/core/VersionMetadata.java
Co-authored-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Signed-off-by: Matt Whitehead <matthew1001@hotmail.com>
* Update ethereum/core/src/main/java/org/hyperledger/besu/ethereum/core/VersionMetadata.java
Co-authored-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Signed-off-by: Matt Whitehead <matthew1001@hotmail.com>
* mock-maker-inline no longer needed
Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>
---------
Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>
Signed-off-by: Matt Whitehead <matthew.whitehead@kaleido.io>
Signed-off-by: Matt Whitehead <matthew1001@hotmail.com>
Co-authored-by: Fabio Di Fabio <fabio.difabio@consensys.net>
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>
Add a sender cache to Transaction.java, the senders and transactions' hashes are calculated when the transactions are decoded from the newPayload.
Signed-off-by: Ameziane H <ameziane.hamlat@consensys.net>
Co-authored-by: Fabio Di Fabio <fabio.difabio@consensys.net>
* 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>
* Refactored version of QBFT/shanghai
Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>
* More refactoring
Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>
* Add equivalent IBFT fixes. Update QBFT and IBFT round tests
Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>
* Update the change log
Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>
* Remove old comments
Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>
* Add shanghai contract validator test
Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>
* Add shanghai acceptance test
Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>
* Add Shanghai to the combined protocol schedule test, update IBFT message validator creation
Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>
* Fix merge
Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>
* Update tests to use shanghai time > 0
Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>
* Address PR comments
Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>
* Refactor unit tests
Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>
* Refactor unit tests
Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>
* IbftRoundTests update
Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>
* Address PR comments
Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>
* Remove unnecessary class type check
Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>
---------
Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>
Signed-off-by: Matt Whitehead <matthew1001@gmail.com>
Signed-off-by: Matt Whitehead <matthew.whitehead@kaleido.io>
Store trielog as blobdb to improve performance.
* Store trie_log_storage as blob
* changelog
* Add gc flag for static data
* Updating plugin-api build.gradle with new hash as SegmentIdentifier interface has introduced new method
Signed-off-by: Usman Saleem <usman@usmans.info>
* not recompute hash if not needed
* Add memoize for the Supplier
* Modify hashcode to only process keccak when slotkey is not defined
* use single cache for keccak
Signed-off-by: Karim Taam <karim.t2am@gmail.com>
Signed-off-by: Ameziane H <ameziane.hamlat@consensys.net>
Signed-off-by: ahamlat <ameziane.hamlat@consensys.net>
Signed-off-by: garyschulte <garyschulte@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>
* Enable limit on range of JSON-RPC API trace_filter method (#5971)
Enable a limit on the range of blocks that can be supplied to the
JSON-RPC trace_filter method.
The limit has a default value and can be overridden with a command
line option at start up.
Signed-off-by: alyokaz <alyoshakaz@live.co.uk>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: alyokaz <alyoshakaz@live.co.uk>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
* Improve the high spec flag, limit it to few column families
* Update changelog
* spotless
* Update the plugin API hash as one of the interfaces was changed\
* Fix failing unit tests
Signed-off-by: Ameziane H <ameziane.hamlat@consensys.net>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
* make the request for the ENR the default and try to recover the DiscoveryPeer for incoming connections from the PeerTable
Signed-off-by: Stefan <stefan.pingel@consensys.net>
Signed-off-by: stefan.pingel@consensys.net <stefan.pingel@consensys.net>
* Fix changelog after incorrect merge of 6225
Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>
* Create 24.1.2-snapshot changelog entry
Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>
* Remove entry from previous version in changelog
Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>
---------
Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>
* Use P2P 'from' host when parsing incoming P2P packets, if it is present
Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>
* Use UDP source address if PING 'from' address is 127.0.0.1 and add a unit test.
Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>
* Spotless Java, address PR comment
Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>
* Refactor handleIncomingPacket to allow for specific trace logs to show how selection is being done
Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>
* Add change log entry
Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>
* Refactor handleIncomingPacket
Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>
---------
Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>
Signed-off-by: Matt Nelson <85905982+non-fungible-nelson@users.noreply.github.com>
Co-authored-by: Stefan Pingel <16143240+pinges@users.noreply.github.com>
Co-authored-by: Simon Dudley <simon.dudley@consensys.net>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>