350 Commits

Author SHA1 Message Date
Simon Dudley
e6395c3af3 Schedule shanghaiTime for Mainnet and configure forkId for tests (#5230)
🦉
2023-03-17 00:38:41 +00:00
Rafael Matias
7afc035edc Remove deprecated EF bootnodes (#5194)
* Remove deprecated EF bootnodes

Signed-off-by: Rafael Matias <rafael@skyle.net>

* Remove unnecessary bootnode data from checkpoint json test

* Remove ef deprecated bootnodes from genesis

Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>

---------

Signed-off-by: Rafael Matias <rafael@skyle.net>
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
Co-authored-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
2023-03-13 13:39:53 +10:00
Simon Dudley
d48403d185 Schedule Goerli shanghaiTime and configure forkId for tests (#5151)
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
2023-03-04 05:08:31 +10:00
Danno Ferrin
532797fc17 Add needed tooling support for execution-spec-tests (#5030)
Adding the t8n and b11r tool allows Hyperledger besu to produce reference 
tests from the https://github.com/ethereum/execution-spec-tests repository.

* Add t8n tool, or transition tool. Calculates the state changes from a set 
  of transactions against a given parent context
* Add b11r tool, or block-builder tool. Given block parts it can generate a 
  RLP block.
* Change some tracing CLI flags to work better with retesteth

Signed-off-by: Danno Ferrin <danno.ferrin@swirldslabs.com>
2023-02-20 22:10:41 -07:00
Fabio Di Fabio
53b4afce82 Initialize KZG native lib at startup if Cancun is enabled (#5084)
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
2023-02-20 11:54:34 +01:00
Simon Dudley
54521591f4 Add shanghaiTime to sepolia (#5088)
Update and fix forkId tests

Move timestamp forks from getForkBlockNumbers to getForkBlockTimestamps in JsonGenesisConfigOptions - this ultimately gets used to popoulate the ForkIdManager which handles lists of blocks and timestamps the same way so this hasn't changed any actual behaviour, but rather supports the test fixes.

Implement TransitionProtocolSchedule.streamMilestoneBlocks as a concatenation of blockNumbers++blockTimestamps. This may have been a latent bug since it's used to update the node record when a fork transition occurs.

Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
2023-02-14 16:32:33 +10:00
Usman Saleem
9eb32836b7 Fix javadocs to allow build to pass in JDK 17 (#4834)
- Added missing javadocs so that javadoc doclint passes against JDK 17 (invoke by Besu gradle build).
- Exclude following packages from javadoc lint:
org.hyperledger.besu.privacy.contracts.generated
org.hyperledger.besu.tests.acceptance.*
- Temporarily exclude ethereum and evm submodule for doc lint checks.
- Run the javadoc task using GitHub actions (use Java 17) to report any javadoc errors during the PR builds
- Updating plugin-api build.gradle with new hash as javadoc comments caused it to change

Signed-off-by: Usman Saleem <usman@usmans.info>
2023-01-18 22:51:00 +10:00
Danno Ferrin
1cd15a86f6 Add '--fork=' to EvmTool (#4913)
* Add '--fork=' to EvmTool

Add a CLI '--fork' option to allow code to be evaluated in specific
forks.

Signed-off-by: Danno Ferrin <danno.ferrin@swirldslabs.com>
2023-01-13 14:37:02 -07:00
Danno Ferrin
4159b0dd8b Add FutureEips and ExperimentalEips forks and networks (#4873)
Add two new development networks and forks, `FutureEips` for EIPs not yet
scheduled for a fork and `ExperimentalEips` for EIPs and other work not yet
accepted to a public network.  Two new fork-named networks are added
like the `dev` network to facilitate easy local development.
These replace the deprecated `Shandong` network and fork.

Signed-off-by: Danno Ferrin <danno.ferrin@swirldslabs.com>
2023-01-05 09:37:00 -06:00
Danno Ferrin
4508174ef2 Remove Deprecated Networks (#4869)
Remove the Ropsten, Kiln, Shandong, and Astor network definitions from
the built-in network list.  Includes tendrils depending on and testing
such configurations.

Signed-off-by: Danno Ferrin <danno.ferrin@swirldslabs.com>
2023-01-02 12:12:39 -06:00
Jason Frame
38316ef188 EIP-6122 Timestamp based fork IDs (#4841)
Signed-off-by: Jason Frame <jason.frame@consensys.net>
Co-authored-by: Jiri Peinlich <jiri.peinlich@gmail.com>
Co-authored-by: Simon Dudley <simon.dudley@consensys.net>
2022-12-21 17:13:22 +10:00
Jiri Peinlich
3fd0681e3d Support timestamp forks and implement shanghaiTime (#4743)
Implement shanghaiTime including TimestampSchedule and associated infrastructure code.
TimestampSchedule sits alongside the pre and post ProtocolSchedules in TransitionProtocolSchedule.

Introduces getByTimestamp, wrapped inside getByBlockHeader (to also support getByBlockNumber).
General call pattern followed is that if a given timestamp precedes the first timestamp in the schedule, i.e. a pre-shanghai block, then delegate to the appropriate pre or post merge ProtocolSchedule to get by block instead.

cancunTime and a placeholder cancunDefinition has also been implemented in order to effectively test fork order logic.

Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
Co-authored-by: Jiri Peinlich <jiri.peinlich@gmail.com>
Co-authored-by: Simon Dudley <simon.dudley@consensys.net>
Co-authored-by: Jason Frame <jason.frame@consensys.net>
2022-12-16 12:39:39 +10:00
Diego López León
54294fe132 Update Shandong bootnodes (#4728)
Signed-off-by: Diego López León <dieguitoll@gmail.com>
2022-11-24 11:15:34 +10:00
Diego López León
22fbd5fe0c Adjust Shandong genesis after Nov 5th restart (#4680)
Signed-off-by: Diego López León <dieguitoll@gmail.com>
Signed-off-by: Diego López León <dieguitoll@gmail.com>
2022-11-15 16:00:50 -03:00
Danno Ferrin
1c143f167e Add Shandong network and fork (#4599)
* 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>
2022-11-07 10:10:57 -06:00
garyschulte
d73ce2116c Bonsai snapshot worldstate (#4409)
* 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>
2022-10-13 09:42:27 -07:00
Simon Dudley
fd666dfd61 Add ZeroBaseFeeMarket to support post-London free gas networks (#4174)
* 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>
2022-08-31 00:52:43 +01:00
garyschulte
ded02391a7 implement tentative mainnet TTD (#4260)
* implement tentative mainnet TTD
* fix unit test breakage
* add to change log

Signed-off-by: garyschulte <garyschulte@gmail.com>
2022-08-18 21:17:56 +02:00
garyschulte
01d077bd65 add sepolia mergeNetSplit block (#4158)
* 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>
2022-07-26 10:25:05 -07:00
garyschulte
e0b4d88786 add goerli ttd (#4160)
Signed-off-by: garyschulte <garyschulte@gmail.com>
2022-07-26 09:18:08 -07:00
matkt
f885c46713 Update checkpoint sync for merge (#4085)
Signed-off-by: Karim TAAM <karim.t2am@gmail.com>
2022-07-15 14:16:14 -03:00
Fabio Di Fabio
b85b39d307 Revert "Add terminal block hash and number to Ropsten genesis file (#4026)" (#4093)
This reverts commit 27fc468624.

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
2022-07-13 12:43:00 +02:00
Fabio Di Fabio
27fc468624 Add terminal block hash and number to Ropsten genesis file (#4026)
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>
2022-07-05 17:32:07 +02:00
Daniel Lehrner
5024c07884 Add Sepolia TTD and DNS (#4024)
* added TTD and DNS to sepolia config file

Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
2022-06-28 19:30:14 +10:00
Justin Florentine
5e32b05037 adds ttd block to sepolia config (#3976)
* adds ttd block to sepolia config
* Adds a second bootnode.

Signed-off-by: Justin Florentine <justin+github@florentine.us>
2022-06-16 13:19:59 -04:00
Daniel Lehrner
4996a8731a Gray glacier hard fork (#3962)
* preparation for the gray glacier hard fork

Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
2022-06-15 09:56:33 -07:00
Justin Florentine
9704be1036 ropsten ttd selected by ef (#3941)
* ropsten ttd selected by ef

Signed-off-by: Justin Florentine <justin+github@florentine.us>
2022-06-07 09:48:11 +12:00
matkt
6f85e1f83b Add checkpoint sync (#3849)
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>
2022-06-04 05:22:40 +10:00
Afr Schoe
501ba644e6 config: update goerli bootnodes (#3857)
* config: update goerli bootnodes

Signed-off-by: Afr Schoe <58883403+q9f@users.noreply.github.com>

* Test resource updates.

Signed-off-by: mark-terry <mark.terry@consensys.net>

Co-authored-by: Danno Ferrin <danno.ferrin@gmail.com>
Co-authored-by: mark-terry <36909937+mark-terry@users.noreply.github.com>
Co-authored-by: mark-terry <mark.terry@consensys.net>
2022-05-30 09:41:13 +10:00
Justin Florentine
ed979fa524 new ropsten ttd (#3903)
Signed-off-by: Justin Florentine <justin+github@florentine.us>
2022-05-26 13:09:29 -04:00
garyschulte
20daaf40a9 Feature/remove experimental merge flag (#3875)
* deprecate Xmerge-support and engine-rpc-enabled cli params

Signed-off-by: garyschulte <garyschulte@gmail.com>
2022-05-21 09:27:45 +10:00
garyschulte
40a6ca2c08 ropsten TTD config (#3871)
* ropsten TTD config

Signed-off-by: garyschulte <garyschulte@gmail.com>
2022-05-19 13:45:31 -07:00
Danno Ferrin
bdb00b299e Upgrade Errorprone (#3851)
* 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>
2022-05-18 23:15:33 -04:00
Simon Dudley
cacb8376ac Ensure port clash is reported when engine-rpc-http-port clashes with default websocket port 8551 (#3750)
* 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>
2022-05-03 12:16:32 +02:00
garyschulte
89100a0824 rename premerge fork to paris, keep premerge as an alias (#3615)
* rename premerge fork to paris, keep premerge as an alias

Signed-off-by: garyschulte <garyschulte@gmail.com>
2022-04-07 02:42:09 +10:00
Danno Ferrin
b4027d6e39 Use JUnit 5 for unit test execution (#3620)
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>
2022-04-02 00:34:48 +10:00
Daniel Lehrner
a91d9bbdd3 updated TTD for Kiln (#3573)
Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
2022-03-11 17:42:00 +01:00
garyschulte
de432ce32e add kiln network, add network option for fast-sync capable (#3547)
* add kiln network, add network option for fast-sync capable

Signed-off-by: garyschulte <garyschulte@gmail.com>
2022-03-10 05:24:49 +10:00
mbaxter
6efdd94a69 [Issue 3115] Support mining beneficiary transitions (#3505)
Signed-off-by: Meredith Baxter <meredith.baxter@palm.io>
2022-03-07 16:09:31 -08:00
Frank Li
941f5ee201 Update ef bootnodes (#3502)
* 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>
2022-03-01 13:55:09 +10:00
Fabio Di Fabio
435c9e388c Engine RPC endpoint (#3470)
Code originally written by jflo on the merge branch.
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
2022-02-21 18:49:00 +01:00
Fabio Di Fabio
8fc7cdf4dc Rename MergeOptions to MergeConfigOptions to follow the standard (#3451)
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
2022-02-17 03:34:28 -08:00
fab-10
e61329623f Merge: add terminal block number and hash to genesis config options (#3392)
Ported from the merge branch.

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
2022-02-10 14:47:12 +01:00
Diego López León
ed1329cf84 Introduce SLF4J for logging (#3285)
* 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>
2022-01-25 20:14:54 -03:00
Diego López León
b964e9098f ETC Mystique hard fork (#3256)
* 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>
2022-01-09 08:46:28 -03:00
George Patterson
c25483c29f Validate that blockperiodseconds is set to a positive integer (#3186)
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>
2022-01-05 01:28:46 +00:00
Diego López León
8bf078cd61 Move discovery options constants to genesis files of predefined networks (#3123)
* 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>
2021-12-20 10:42:57 +10:00
garyschulte
42eb2501cc merge kintsugi-v3 changes back to main (#3152)
* merge kintsugi-v3 changes back to main

Signed-off-by: garyschulte <garyschulte@gmail.com>
2021-12-10 05:03:13 -08:00
Justin Florentine
83e783d7ca Eip 4399 (#3111)
Signed-off-by: Justin Florentine <justin+github@florentine.us>
2021-12-09 23:38:37 -08:00
fab-10
43e67e0be2 baseFee as Wei instead of long (#3065)
* [Config] convert baseFee from long to wei

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
2021-12-07 15:01:55 -08:00