* Remove uses of org.jetbrains annotations
We have a mix of org.jetbrains.annotations.NotNull and
javax.annotations.Nonnull. Change all to the latter. Add an errorprone
check to enforce this.
Signed-off-by: Danno Ferrin <danno.ferrin@swirldslabs.com>
* spotless
Signed-off-by: Danno Ferrin <danno.ferrin@swirldslabs.com>
* spdx
Signed-off-by: Danno Ferrin <danno.ferrin@swirldslabs.com>
---------
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>
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>
* 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>
use reference tests to validate trielog generation. Like that we will validate besu trielog generation for all of the tests we have in the references tests suite for past and future EIPs
---------
Signed-off-by: Karim Taam <karim.t2am@gmail.com>
* Change TrieLogPruner to implement a trieLogObserver
* Remove TrieLogPruner from TrieLogManager
* Remove NoOpTrieLogPruner now it is conditionally added as an observer
* Prune async using EthScheduler.servicesExecutor
---------
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
Co-authored-by: Simon Dudley <simon.dudley@consensys.net>
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>
* fallback to simple name when canonical name is null
* use getName instead of getSimpleName to include the package name
Signed-off-by: Manoj P R <manojpramesh@gmail.com>
---------
Signed-off-by: Manoj P R <manojpramesh@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
* fix: call OperationTracer.traceEndTx for failing transactions
Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu>
Co-authored-by: Daniel Lehrner <daniel.lehrner@consensys.net>
cleaning up the worldstate section, moving and renaming everything that is forest into a specific package in order to clarify the difference between Bonsai and Forest in the code.
---------
Signed-off-by: Karim Taam <karim.t2am@gmail.com>
Signed-off-by: matkt <karim.t2am@gmail.com>
revert some modification that was made to pass tests #5686 and fix this tests by loading the storage with EMPTY_TRIE_HASH if we detect that it has been cleared before pushing the new slots after recreation.
---------
Signed-off-by: Karim TAAM <karim.t2am@gmail.com>
Signed-off-by: matkt <karim.t2am@gmail.com>
Refactor some transaction calculations, including moving upfront
overflow checks from the constructor to the validator and optimizing
some RLP calculations. Also fix all lint errors.
Signed-off-by: Danno Ferrin <danno.ferrin@swirldslabs.com>
* Add `rpc-gas-cap` to enable user to cap gasLimit of certain RPC methods
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
---------
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
* modifications to log messages for simplification
* for debug logs, only use the short ID not the full peer
* log timeouts and useless counts
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
- Toggled with --Xbonsai-trie-log-pruning-enabled
- Introduces TrieLogPruner which loads a limited number of trie logs on startup to preload the pruner queue, based on loadingLimit with a default value of 30,000 blocks (configured with --Xbonsai-trie-log-pruning-limit).
- Each time a trie log is persisted it is added to the pruner queue and then the pruner is run against the queue, which will prune trie logs associated with block numbers below the --Xbonsai-trie-log-retention-threshold (default 512).
- Once the retention threshold is reached, each prune run should just be a single trie log.
- Prune any orphaned trielogs that were created during block creation.
- Don't prune non-finalized blocks for PoS chains.
---------
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
* basic test coverage
* blob caching on tx removal in legacy pool
* blob caching on tx removal in layered pool
* blob restoral in both legacy and layered implementations and test coverage of tx copy in builder
* refactors into reusable BlobCache, and rekeys on versioned hash
---------
Signed-off-by: Justin Florentine <justin+github@florentine.us>
Co-authored-by: Fabio Di Fabio <fabio.difabio@consensys.net>
* updates static integration test so txs are committed to using mainnet trusted setup
* new static vectors for precompile checks
* moves trusted setup to main
---------
Signed-off-by: Justin Florentine <justin+github@florentine.us>
* Synchronize access to block header
Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>
* Add 'safe' version of getBlockHeader
Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>
* Move retry with lock into getChainHeadBlockHeader()
Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>
* Reinstate 'final' modifier
Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>
---------
Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>
Fix the flakeiness in EthGetTransactionByHashTest as well as some other
sonar identified cleanup.
Signed-off-by: Danno Ferrin <danno.ferrin@swirldslabs.com>
* Delete leftPad when capturing the stack before and after the execution
* Still use leftPad when displaying the stack in the output (ex. for debug_traceTransaction)
* Fix integration test
* Use StringBuilder to left pad the hex representation of a 32 bytes
Signed-off-by: Ameziane H <ameziane.hamlat@consensys.net>