* 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>
* Upgrade to Apache Tuweni 2.0
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
* Remove intermediate repository
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
* Remove all occurrences of toBytes
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
* Migrate to tuweni-bytes
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
* add changelog
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
* correct reference tests
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
* Initial API changes
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
* more changes
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
* Change APIs for VM ops
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
* Use constant UInt256.ONE
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
* Optimize a bit address <> word transformation
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
* spotless
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
* address assumption that if 1559 is enabled there is a london fork block config
fixes#2192
Signed-off-by: garyschulte <garyschulte@gmail.com>
* omit null chainId from transaction json serialization, and fix merge regression
Signed-off-by: garyschulte <garyschulte@gmail.com>
* update json-rpc responses for 1559, use current feeCap and gasPremium field names
Signed-off-by: garyschulte <garyschulte@gmail.com>
* add pr number to changelog
Signed-off-by: garyschulte <garyschulte@gmail.com>
* fix transaction decoder
Signed-off-by: Gary Schulte <garyschulte@gmail.com>
* rebase and fix merge conflicts
Signed-off-by: garyschulte <garyschulte@gmail.com>
* remove null chainId from json-rpc test fixtures
Signed-off-by: garyschulte <garyschulte@gmail.com>
* the great 1559 rename
Signed-off-by: garyschulte <garyschulte@gmail.com>
* re-remove gasTarget
Signed-off-by: garyschulte <garyschulte@gmail.com>
* add serialization tests for 1559 transaction fields
Signed-off-by: garyschulte <garyschulte@gmail.com>
* add json property ordering annotations to Transaction*Result and spotless
Signed-off-by: garyschulte <garyschulte@gmail.com>
* rebase on master, update error message feedback from Karim
Signed-off-by: garyschulte <garyschulte@gmail.com>
* address assumption that if 1559 is enabled there is a london fork block config
fixes#2192
Signed-off-by: garyschulte <garyschulte@gmail.com>
* fix tests
Signed-off-by: garyschulte <garyschulte@gmail.com>
* spotless. bump
Signed-off-by: garyschulte <garyschulte@gmail.com>
Co-authored-by: Sally MacFarlane <sally.macfarlane@consensys.net>
changed the dev network chain ID to 1337 instead of 2018 so that users can connect to Metamask "localhost 8545" network preset using default chainid settings
Signed-off-by: Manoj Mamidyala <manojmamidyala36@gmail.com>