* Add Shandong network and fork
Add the transient Shandong fork and network definitions. For Shanghai
fork testing. Besu doesn't sync, but it does connect.
Signed-off-by: Danno Ferrin <danno.ferrin@swirldslabs.com>
* use optimistictransactiondb for mutable isolated snapshots
* plumbing necessary to have a snapshot specific updater.
* snapshot rolling working
* implement AutoCloseable on BonsaiSnapshotWorldState to ensure we can correctly dispose of snapshots
* add snapshot transaction cloning, change snapshot based worldstate to extend persisted worldstate rather than in-memory worldstate
Signed-off-by: garyschulte <garyschulte@gmail.com>
* Add zeroBaseFee config for all consensus types
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
* Use ZeroBaseFeeMarket when zeroBaseFee is set
Introduce ZeroBaseFeeMarket overriding computeBaseFee with 0
Wire ZeroBaseFeeMarket into MainnetProtocolSpecs.londonDefinition when zeroBaseFee set
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
* Fix BaseFeeMarketBlockHeaderGasPriceValidationRule to allow syncing to work
Without this, rule would fail if syncing a chain with a non-zero baseFee
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
* Fix fast sync invalid block error
Occurred while testing clique in scenario where londonFork had a non-zero base fee, but zeroBaseFee flag was used to sync
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
* Update changelog
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
* Address review comments: Remove startup log
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
* Address review comments: replace isForkBlock with validationMode
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
* Address review comments: replace ZeroBaseFeeMarket instance check with validationMode
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
* Fix changelog
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
* Split validationMode into baseFeeValidationMode and gasLimitValidationMode
Since behaviour needs to differ between BaseFeeMarketBlockHeaderGasPriceValidationRule and GasLimitRangeAndDeltaValidationRule
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
* Update changelog
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
* add sepolia paris / mergeNetSplit block
* fix test looking for old premerge fork alias, add sepolia terminal conditions test
* rename to mergeNetSplit, ditch the terminalBlockHash and terminalBlockNumber configs for sepolia
Signed-off-by: garyschulte <garyschulte@gmail.com>
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
* If terminal block is present in the genesis, then peers must have it
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
* Update unit test
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
* address review comments
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Add a new way to synchronize which is X_CHECKPOINT. This mode is experimental so use it at your own risk. This mode allows you to do like a snapsync but starting from a specific checkpoint instead of starting from the genesis.
This checkpoint will be in the genesis configuration of each network. To add the checkpoint mechanism in a network you just have to add the checkpoint section in the genesis.
Currently there is a checkpoint for ropten, goerli and mainnet.
Mainnet on i3.2xlarge <6 hours
Goerli on i3.2xlarge <1 hours
Signed-off-by: Karim TAAM <karim.t2am@gmail.com>
* 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>
* Ensure port clash is reported when engine-rpc-http-port clashes with default websocket port 8551
* Remove one-way aspect of MergeConfigOptions.setMergeEnabled to enable switching feature off between unit tests
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
Co-authored-by: Sally MacFarlane <sally.macfarlane@consensys.net>
Change the unit test execution to use the Junit5 JUnitPlatform. This
allows for a mix of junit 4 and junit 5 tests and for a gradual
migration to junit 5 instead of a big bang. One class depended on
junit 4 exceptions and was updated. Two tests depending on
native libraries fail gracefully on mac (and only mac).
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
* update ef bootnodes
Signed-off-by: Frank Li <b439988l@gmail.com>
* fix typo in bootnode
Signed-off-by: Frank Li <b439988l@gmail.com>
* update mainnet config
Signed-off-by: Frank Li <b439988l@gmail.com>
* Bump SLF4J version
Signed-off-by: Diego López León <dieguitoll@gmail.com>
* Replace log4j2 API with SLF4j API
Signed-off-by: Diego López León <dieguitoll@gmail.com>
* Replace usage of LogManager#getFormatterLogger
This is for keeping compatibility with SLF4J. If neccesary, a specific formatter can be created for the RlpBlockImporter class
Signed-off-by: Diego López León <dieguitoll@gmail.com>
* Unset the default logging value for the retesteth
This is because it's not possible to resolve the root logger level into a Log4J2 field
Signed-off-by: Diego López León <dieguitoll@gmail.com>
* Prevent creation of Logger context outside SLF4J
org.hyperledger.besu.cli.BesuCommand#setAllLevels was taken from
https://github.com/apache/logging-log4j2/blob/rel%2F2.17.1/log4j-core/src/main/java/org/apache/logging/log4j/core/config/Configurator.java#L309
Signed-off-by: Diego López León <dieguitoll@gmail.com>
* Add FATAL level deprecation message
Signed-off-by: Diego López León <dieguitoll@gmail.com>
* [Sonar] Fix java:S2139
Exceptions should be either logged or rethrown but not both
Signed-off-by: Diego López León <dieguitoll@gmail.com>
* [Sonar] Fix java:S3457
Printf-style format strings should be used correctly
Signed-off-by: Diego López León <dieguitoll@gmail.com>
* Add changelog
Signed-off-by: Diego López León <dieguitoll@gmail.com>
* Add missing Magneto ETC hard fork entry in test
This corresponds to 61bf0d9ca
Signed-off-by: Diego López León <dieguitoll@gmail.com>
* Change ETC bootnode public keys
Signed-off-by: Diego López León <dieguitoll@gmail.com>
* Add ETC Mystique hard fork spec (ECIP-1104)
Signed-off-by: Diego López León <dieguitoll@gmail.com>
Implemented getPositiveInt function in JsonUtil to validate a JSON positive number value. Using this function, the blockperiodseconds should now be validated whenever retrieved from the genesis config, including transitions.
Signed-off-by: George Patterson <g-patt@outlook.com>
* Move discovery options to genesis definition (#3113)
Signed-off-by: Diego López León <dieguitoll@gmail.com>
* Set default network through PicoCLI
Signed-off-by: Diego López León <dieguitoll@gmail.com>
* Change implementation to use native JDK instead of Guava
Signed-off-by: Diego López León <dieguitoll@gmail.com>
Co-authored-by: Sally MacFarlane <sally.macfarlane@consensys.net>
* Minimal cleanup: deleting rendundant code from ForkingValidatorProvider and associated tests
TODO refactor
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
* Refactor: Remove now redundant lambdas and helper method in ForkingValidatorProvider
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
* Refactor: Inline variables
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
* Only add --bootnodes if there are some nodes set (#1632)
Signed-off-by: Diego López León <dieguitoll@gmail.com>
* Allow to configure P2P port (#1632)
Signed-off-by: Diego López León <dieguitoll@gmail.com>
* Add discovery options to genesis file (#1632)
Signed-off-by: Diego López León <dieguitoll@gmail.com>
* reduce use of global quorum config
The use of the org.hyperledger.besu.config.GoQuorumOptions static
variable is ugly. In particular does changing its value during tests
cause flaky tests. To ameliorate the issue this commit
- removes unused code that did rely on GoQuorumOptions
- removes access to GoQuorumOptions deep in the call stack by looking
it up in the transaction validator instead
- change the TransactionDecoder to explicitly take the
goQuorumCompatbility flag as an argument where access to the
transaction validator is not easy
- rewriting all tests that did change the GoQuorumOptions by mocking
the option change instead.
Signed-off-by: Taccat Isid <taccatisid@protonmail.com>
* protect access to GoQuorum flag by getter and write once setter
Signed-off-by: Taccat Isid <taccatisid@protonmail.com>
* deduce goQuorum flag from privacyOptions
Signed-off-by: Taccat Isid <taccatisid@protonmail.com>
* remove unnecessary mocks from TransactionPoolTest
Signed-off-by: Taccat Isid <taccatisid@protonmail.com>
Co-authored-by: Sally MacFarlane <sally.macfarlane@consensys.net>