* Don't perform validation of withdrawals in BFT chains
Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>
* Spotless
Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>
* Remove withdrawal unit test - not applicable any more
Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>
---------
Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
* New RPC methods to set and get block extra data
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
* Remove redundant methods to set the extra data
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
* miner_getExtraData unit tests
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
* Add CHANGELOG
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
* Apply suggestions from code review
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>
Upgrade spotless to 1.22.0 and reformat.
This is required for Java21 support.
Signed-off-by: Danno Ferrin <danno@numisight.com>
Co-authored-by: Danno Ferrin <danno@numisight.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
* Ensure empty withdrawal lists are set in BFT blocks when the protocol schedule is shanghai or higher
Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>
* Unit tests missing mock
Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>
* Unit tests missing mock
Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>
* Refactor and reduce code duplication
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>
Move Besu custom error-prone checks into its own repository and use it as an external dependency. This allows to move to a newer version of Google errorprone checks as well while cleaning up build.gradle file.
Key changes resulted due to this change:
* String toLowerCase and toUpperCase to use Locale.ROOT as argument
* Use interface such as List,Map or NavigatableMap instead of concrete class where appropriate.
* Simplify StringBuilder to plain String
* Suppress warnings where appropriate.
-----
Signed-off-by: Usman Saleem <usman@usmans.info>
Support clique transitions for createemptyblocks boolean
---------
Signed-off-by: Jason Frame <jason.frame@consensys.net>
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
Co-authored-by: Jason Frame <jason.frame@consensys.net>
Add BFT-style transitions to Clique, modelled with ForksSchedule<CliqueConfigOptions>
Add ability to transition the blockperiodseconds config.
---------
Signed-off-by: Jason Frame <jason.frame@consensys.net>
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
Co-authored-by: Jason Frame <jason.frame@consensys.net>
* Log changes in BFT validators
Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>
* Move the log entry to the block expiry handler, not the round change validator, and only log on round 0
Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>
* Remove unused imports
Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>
* Javadoc
Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>
* Remaining javadoc fix
Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>
* Better javadoc fix
Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>
* Spotless
Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>
* Spotless
Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>
* Merge fix
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>
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>
* 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>
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>
* 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>
- 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>
* lots of places an unsigned timestamp is a problem
* adds unchecked annotations to OptionalUnsignedLong rpc parameter type
---------
Signed-off-by: Justin Florentine <justin+github@florentine.us>