711 Commits

Author SHA1 Message Date
Simon Dudley
f8a7d87ea3 Unified protocol schedule - combine TimestampSchedule and MutableProtocolSchedule (#5310)
- Combine MutableProtocolSchedule and DefaultTimestampSchedule into UnifiedProtocolSchedule.
- Implement getByBlockHeader taking into account both timestamp-based and blockNumber-based forks
- Unstitch timestampSchedule from TransitionProtocolSchedule
- BftProtocolSchedule extends UnifiedProtocolSchedule (instead of MutableProtocolSchedule)
- In MergeProtocolSchedule, unapply mergeSpecificModifications from Shanghai onwards
- Migrate getByBlockNumber modifications into getByBlockHeader for retesteth NoReward
- Temporarily fix reference tests by artificially increasing shanghaiTime

Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
2023-04-20 18:23:53 +10:00
Stefan Pingel
534a369574 Move connect decision into protocol layer (#4759)
Move the decision making for connecting or not connecting to peers into the eth layer. Future changes will take advantage if this to improve peering.

Signed-off-by: Stefan <stefan.pingel@consensys.net>

---------

Signed-off-by: Stefan <stefan.pingel@consensys.net>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
2023-04-14 09:28:29 +10:00
Sally MacFarlane
067a263374 [23.4] Remove GoQuorum privacy (#5303)
* removed separate decoding logic

* run non-mainnet ATs to make sure

* remove goQuorum flag from everywhere

* remove GOQUORUM api group

* remove GoQuorum enclave, privacy params, RPCs and other related config

* removed Goquorum related error codes, rpcMethod codes, privateBloom

* removed v from transaction

* removed private GoQuorum storage provider

---------

Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
2023-04-14 06:41:57 +10:00
Sally MacFarlane
795b7c4dfb [23.4] Remove IBFT1 consensus mechanism (#5302)
* remove controller and config

* remove ibftlegacy module

* remove further config options

* run non-mainnet ATs just to be sure

* remove temp change to circle config

---------

Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
2023-04-11 14:55:50 +10:00
Simon Dudley
ef54beeb6c Add withdrawals to PayloadIdentifier to avoid collisions (#5321)
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
2023-04-11 10:42:55 +10:00
Simon Dudley
a55e824eaa For PoS, use extraData that was configured in the miner-extra-data cli option (#5291)
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
2023-04-05 06:32:21 +10:00
Danno Ferrin
ebbc0df773 Reduce EVM module dependencies (#5285)
Refactor crypto, datatypes, and plugin-api to reduce plugin APIs in the EVM.

Split crypto into crypto services and crypto algorithms
Reverse the dependency between datatyps and plugin-api.
Remove plugin Hash and Address types (use datatypes)
Move PublicKey and Quantity into datatypes.

Lots of changes to imports and build files, and some fromPlugin calls removed.

Signed-off-by: Danno Ferrin <danno.ferrin@swirldslabs.com>
Signed-off-by: Danno Ferrin <danno.ferrin@shemnon.com>
Co-authored-by: Justin Florentine <justin+github@florentine.us>
2023-03-30 18:34:37 -05:00
Simon Dudley
1b29f686e9 Make QBFT validator smart contract mode work with london fork (#5277)
Override the transactionSimulator's default TransactionValidationParams with one that allows for exceeding the account balance (which effectively zeros the baseFee).
This mimics the way that eth_estimateGas and eth_call are implemented.

Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
2023-03-30 15:25:22 +10:00
Fabio Di Fabio
323e1c1a13 Cancel older block creation tasks upon receiving a new one (#5263)
* Cancel older block creation tasks upon receiving a new one

Signed-off-by: Simon Dudley <simon.dudley@consensys.net>

* Use only one thread for building blocks so there is no risk of overlapping

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>

* Fix tests that fail when debug log is enabled

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>

---------

Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Co-authored-by: Simon Dudley <simon.dudley@consensys.net>
2023-03-28 21:34:07 +02:00
naviechan
3aef587e78 EIP-6110: Add deposits in EL (Part 1) (#5055)
Add deposits to the Execution Layer block structure: EIP-6110. The scope of this commit is to add Deposit related info into BlockHeader and BlockBody. The rest of the EIP including RPC API and validating Deposit with be included in future PRs.

---------

Signed-off-by: Navie Chan <naviechan@gmail.com>
Signed-off-by: navie <naviechan@gmail.com>
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
2023-03-28 17:30:23 +10:00
Gabriel Fukushima
0e36f661e8 getByBlockNumber replaced by getByBlockHeader on tests (#5259)
* Replace getByBlockNumber by getByBlockHeader

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

* Replace getByBlockNumber by getByBlockHeader

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

* Replace BlockDataGenerator by BlockHeaderTestFixture

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

* Replace BlockDataGenerator by BlockHeaderTestFixture

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

* Add final to method param

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

* Replace BlockDataGEnerator by BlockHeaderTestFixture

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

* Replace BlockDataGenerator by BlockHeaderTestFixture

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

* Remove BlockDataGenerator

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

---------

Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
2023-03-23 17:17:42 +11:00
Simon Dudley
c955eb290a Isolate getByBlockNumber for BFT use cases (#5254)
Introduce BftProtocolSchedule with a copy of MutableProtocolSchedule.getByBlockNumber.
This method will be deleted from the ProtocolSchedule interfaces and so will only exist in BftProtocolSchedule.

Use BftProtocolSchedule in CombinedProtocolScheduleFactory.
Move getScheduledProtocolSpecs into BftProtocolSchedule since it is only used by CombinedProtocolScheduleFactory.
Rename existing BftProtocolSchedule classes to append Builder for clarity.

Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
2023-03-22 14:42:25 +10:00
Simon Dudley
013d1e4ad4 Move protocol schedule streamMilestoneBlocks into test scope (#5240)
It's now only used by the tests following removal of production code paths in 08b822a860
A simple decorator pattern would have been a nicer implementation but I didn't want to expose the protocolSpecs from within the schedule hence why I've used inheritance.

ForksIdsNetworkConfigTest has a particularly hairy construction since it relies on TransitionProtocolSchedule but I've isolated this as an inner class.
I am hopeful that we can refactor ForksIdsNetworkConfigTest out of existence eventually and avoid using streamMilestoneBlocks at the same time.

Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
2023-03-22 11:12:43 +10:00
Simon Dudley
08b822a860 Replace production usages of ProtocolSchedule.streamMilestoneBlocks (#5198)
Replace usages of streamMilestoneBlocks on production code paths: RunnerBuilder and TransactionPoolFactory.
These usages were also using getBlockByNumber which is ultimately what we're trying to remove.

Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
2023-03-17 18:21:26 -07:00
Danno Ferrin
3e35dba092 Reduce Log4J API Exposures (#5189)
Reduce the number of places that expose Log4J classes as a part of the
interfaces for methods and classes. While Log4j remains the default we
still need to be able to function when the Log4J jars are removed from
the classpath.

Signed-off-by: Danno Ferrin <danno.ferrin@swirldslabs.com>
2023-03-11 15:12:10 -06:00
Gabriel Fukushima
bf0198103f Replace getByBlockNumber by getByBlockHeader (#5127)
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
Signed-off-by: Jason Frame <jason.frame@consensys.net>
2023-03-03 15:19:11 +10:00
Diego López León
66c757dfa3 Update SLF4J version (#4587)
* Bump SLF4J version and replace helper for lambdas

Signed-off-by: Diego López León <dieguitoll@gmail.com>

* Remove unnecessary toString calls

Signed-off-by: Diego López León <dieguitoll@gmail.com>

* Replace unnecessaryy lambdas for constant references

Signed-off-by: Diego López León <dieguitoll@gmail.com>

---------

Signed-off-by: Diego López León <dieguitoll@gmail.com>
2023-02-28 08:10:09 -03:00
Fabio Di Fabio
28f2bd4a1a Gas accounting for EIP-4844 (#4992)
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
2023-02-23 12:01:33 +01:00
Simon Dudley
28d5702c57 In forkchoiceUpdated, log VALID instead of INVALID when ignoring update for old head (#5101)
This is misleading when debugging because we return VALID in the API and there's not actually an INVALID issue to debug despite what the logs were saying.

Also rename and flip the isValid boolean to be shouldNotProceedToPayloadBuildProcess for clarity.

Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
2023-02-22 18:52:22 +10:00
Gabriel Fukushima
66521cb3f2 Stop adding bad proposed block to bad block manager (#5082)
* Add flag to distinguish when bad block is a proposed block

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

* Add flag to distinguish when bad block is a proposed block

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

* javadoc

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

* Add shouldRecordBadBlock flag to stop adding proposed bad blocks to the bad block manager

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

* Add overload to validateAndProcessBlock with shouldRecordBadBlock flag

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

* Add unit test to ensure flag is being used to add blocks to bad block manager

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

* Add unit test to ensure we don't add our own proposed bad block to the bad block manager

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

* Add debug log when badBlock is not added

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

* Undo change done in the first approach

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

* Improve log

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

* Improve test names

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

* Improve javadoc of validateProposedBlock method

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

* Remove method from interface

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

* Change validateProposedBlock access modifier to private

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

---------

Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
2023-02-22 11:15:12 +11: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
Stefan Pingel
08e2f87306 reintroduce checking of block height for certain tasks when we are not PoS (Revert PR#3911) (#5083)
* reintroduce checking of block height for certain tasks when we are not PoS (Revert PR#3911)

Signed-off-by: Stefan <stefan.pingel@consensys.net>
2023-02-15 11:36:58 +10:00
Fabio Di Fabio
97edc67c30 If a PoS block creation repetition takes less than a configurable dur… (#5048)
* If a PoS block creation repetition takes less than a configurable duration, then waits before next repetition

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>

* Update CHANGELOG

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>

* Add unit test

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>

* Update besu/src/main/java/org/hyperledger/besu/cli/BesuCommand.java

Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>

* Update besu/src/main/java/org/hyperledger/besu/cli/options/unstable/MiningOptions.java

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>
2023-02-14 12:26:48 +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
Jason Frame
b2d378e174 Support post merge forks at genesis for hive tests (#5019)
Signed-off-by: Jason Frame <jason.frame@consensys.net>
2023-02-09 14:05:27 +10:00
Jason Frame
38d666d8b1 Revert "Replace getByBlockNumber by getByBlockHeader (#5020)" (#5063)
This reverts commit 9ceebc4a57.

Signed-off-by: Jason Frame <jason.frame@consensys.net>
2023-02-08 12:16:34 +10:00
Gabriel Fukushima
9ceebc4a57 Replace getByBlockNumber by getByBlockHeader (#5020)
* Replace getByBlockNumber by getByBlockHeader where trivial

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

* Fix tests

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

* Fix tests

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

* Rolledback change since tests will need non trivial changes

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

* Rollback replace

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

* Change other 2 trivial tests

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

* spotless

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

* Pass ProcessableBlockHeader to the mocks

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

* Replace getByBlockNumber by getByBlockHeader

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

* Add mock of blockHeader

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

* Use any() for the tests

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

* Add unit test for headBlockHeader()

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

---------

Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
2023-02-06 07:37:58 +11:00
Sally MacFarlane
c9de473a3c kubernetes and errorprone - update versions (#5013)
* update errorprone and kubernetes versions
* fixed errorprone issues in prod cod
* fixed errorprone issues in test code

---------

Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
2023-02-01 10:42:36 +10:00
Sally MacFarlane
1a39e38315 [MINOR] move Clique tests to junit5 (#4975)
* easy ones

* parameterized test

* refactor to avoid unnecessary stubbings

* migrate abstract class and subclasses to junit 5

Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
2023-01-24 11:10:31 +10:00
Danno Ferrin
9034d31a05 Don't cache protocol spec in block creator (#4982)
* Don't cache protocol spec in block creator

Don't cache the protocol spec in the block creator.  With the new
shanghaiTimestamp the correct spec may be a function of the timestamp
not just the block number.  So every time we are asked to build a block
re-query the spec.

Signed-off-by: Danno Ferrin <danno.ferrin@swirldslabs.com>
2023-01-23 07:01:20 -06: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
Jason Frame
8f32c5dc48 Change BlockBody to use an overloaded constructor with withdrawals (#4955)
Signed-off-by: Jason Frame <jason.frame@consensys.net>
2023-01-18 16:50:56 +10:00
Fabio Di Fabio
aa53f22004 Introduce transaction pool interface (#4939)
* Introduce transaction pool interface

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>

* Fix spotless

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>

* Apply suggestiong from code review

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>

* Update consensus/merge/src/test/java/org/hyperledger/besu/consensus/merge/blockcreation/MergeReorgTest.java

Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>

* Update consensus/merge/src/test/java/org/hyperledger/besu/consensus/merge/blockcreation/MergeReorgTest.java

Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
2023-01-18 11:59:30 +10:00
matkt
b2ff02d950 Improve get protocol schedule (only get header and not the entire block) (#4938)
There is a performance regression in the RC version 23.1.0-RC1 compared to 22.10.3 in both engine_getPayloadV1 and engine_forkchoiceUpdatedV1 calls. This regression is related to recent changes in the way we get the protocol specifications. We get the whole block by decoding each single transaction to use only the block header.

Signed-off-by: Karim TAAM <karim.t2am@gmail.com>
Signed-off-by: Ameziane H <ameziane.hamlat@consensys.net>
2023-01-17 11:18:45 +01:00
Jason Frame
009508dfe2 Add optional list of withdrawals to block body (#4944)
Signed-off-by: Jason Frame <jason.frame@consensys.net>
2023-01-17 14:29:02 +10:00
Jason Frame
e89b773ec5 Withdrawals processor (#4917)
Signed-off-by: Jason Frame <jason.frame@consensys.net>
2023-01-17 07:18:50 +10:00
Zhenyang Shi
524e1a2b3c Calculate block value (#4883)
* Calculate block value & optimise block building

* Use block with receipts & keep block validation

* Add test on zero block value

* Use non-static method

* Update copyright

Signed-off-by: Zhenyang Shi <wcgcyx@gmail.com>

Signed-off-by: Zhenyang Shi <wcgcyx@gmail.com>
2023-01-16 13:50:02 +10:00
Simon Dudley
515ddad5e6 Implement engine_forkchoiceUpdated Withdrawals validation (#4890)
In order to avoid maintaining two versions of forkchoiceUpdated as much as possible, the validation works for both V1 and V2.

The JSON deserialization allows for withdrawals to be omitted which supports V1 requests, however if shanghai is enabled then we will expect withdrawals in a V1 request.
It would be a bug for a CL to send V1 with a post-shanghai timestamp but null withdrawals.

Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
2023-01-16 10:59:53 +10:00
Simon Dudley
57f01106b6 For TimestampSchedule (Shanghai) remove evmBuilder override but leave other mods in (#4895)
The previous evmBuilder override would mean that Shanghai evm configuration is reverted back to Paris

Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
2023-01-10 12:33:24 +10:00
Jason Frame
173da2a15d Remove qbft reference tests (#4893)
* Remove qbft reference tests submodule

* Remove snakeyml dependency

Signed-off-by: Jason Frame <jason.frame@consensys.net>

* Revert "Remove snakeyml dependency"

This reverts commit 4ae0dcd8e520e3674d56fb955f50fcdff0929d5f.

Signed-off-by: Jason Frame <jason.frame@consensys.net>

Signed-off-by: Jason Frame <jason.frame@consensys.net>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
2023-01-10 08:52:33 +10:00
garyschulte
642d477867 Bugfix potential chain head and worldstate inconsistency (#4862)
* bugfix, ensure setNewHead does not move the chain head forward if the worldstate forward fails

Signed-off-by: garyschulte <garyschulte@gmail.com>
2022-12-23 10:22:18 -08:00
Gabriel Fukushima
7d5988d4b5 PoS checkpoint sync (#4844)
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
2022-12-21 15:04:08 +11:00
Danno Ferrin
47545373b4 EIP-4750 EOF Functions (#4781)
Implement CALLF, RETF, and JUMPF operations. This introduces the
notion of "code sections" into the code. For legacy code section zero
consists of all of the code and is the only code section. Also
implements EIP specified code validation to ensure validated EOF code
won't use CALLF or JUMPF to a non-existent section.

Signed-off-by: Danno Ferrin <danno.ferrin@swirldslabs.com>
2022-12-20 10:31:26 -06: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
Zhenyang Shi
97588ae744 Add chain data pruning experimental feature (#4686)
* Add chain pruner
* Increase minimum blocks to retain
* Skip ancestor check in pruning mode
* Separate class for pruning storage
* Move pruning to separate thread
* Limit total pruning threads

Signed-off-by: wcgcyx <wcgcyx@gmail.com>
Signed-off-by: Zhenyang Shi <wcgcyx@gmail.com>
Co-authored-by: Simon Dudley <simon.l.dudley@hotmail.com>
Co-authored-by: Jason Frame <jason.frame@consensys.net>
2022-12-13 08:05:37 +10:00
Gabriel-Trintinalia
f83d7e1a40 Fix attempt to send unsupported message (13) via cap eth/67 (#4732) 2022-11-26 13:43:18 +11:00
Fabio Di Fabio
2ee204cb77 Do not send new payloads to backward sync if initial sync is in progress (#4720)
* Do not involve backward sync until initial sync is done

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
2022-11-25 11:56:38 +10:00
Fabio Di Fabio
9d4ec3bca4 Restore updating chain head and finalized block during backward sync (#4718)
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
2022-11-24 12:19:08 +01:00
Sally MacFarlane
e5d73e0cca retry block processing (#4600)
* aggresively seeking out other places to defend from this

Signed-off-by: Justin Florentine <justin+github@florentine.us>
Co-authored-by: Justin Florentine <justin+github@florentine.us>
2022-11-18 14:45:04 -05:00
Fabio Di Fabio
098558a274 Remove log statements that are keeping references to objects for too long (#4705)
* Remove log statements that are keeping references to objects for too much time

Improvement in terms of reducing java heap used,
since the logs were keeping reference to blocks sent by newPayload,
that causes high memory consumption during initial sync,
and could be one of the causes that prevent to complete snap sync on low spec machines.
Exceptions are also logged by the backward sync, so there is no loss of information.

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
2022-11-18 19:54:21 +01:00