711 Commits

Author SHA1 Message Date
Matt Whitehead
0f91a674ca Write a DEBUG log entry to make it clear of a BFT node is a validator or not (#6470)
Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
2024-01-29 14:51:42 +10:00
Karim TAAM
ccab8571e5 create trie package for bonsai and forest (#6300)
Signed-off-by: Karim Taam <karim.t2am@gmail.com>
Signed-off-by: matkt <karim.t2am@gmail.com>
2023-12-14 14:59:29 +01:00
Sally MacFarlane
0c122732c6 removed vintage junit dependency (#6296)
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
2023-12-14 11:53:37 +01:00
Karim TAAM
ba05f24d71 move forest class to a specific package (#6293)
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>
2023-12-14 09:48:28 +01:00
Sally MacFarlane
b6e73ae080 junit 5 ftw (#6253)
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
2023-12-07 12:57:06 +10:00
Gabriel-Trintinalia
9d57927572 New cli options to limit rewards return by eth_feeHistory (#6202)
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
2023-12-04 15:12:51 +11:00
Gabriel-Trintinalia
31a57e01e0 Refactor: Move rpcGasCap and rpcMaxLogsRange to apiConfiguration (#6195)
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
2023-11-22 14:39:08 +11:00
Gabriel Fukushima
a5d5af0d32 Add rpc-gas-cap via transaction simulator (#6156)
* 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>
2023-11-22 01:15:52 +11:00
Fabio Di Fabio
eaf56820f5 New option tx-pool-min-gas-price to set a lower bound when accepting txs to the pool (#6098)
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
2023-11-20 12:49:17 +01:00
Simon Dudley
8c35ce18d0 Add experimental trie log pruning feature (#6026)
- 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>
2023-11-17 10:47:46 +10:00
Fabio Di Fabio
8319fae725 Time limited block creation (#6044)
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
2023-11-08 21:27:31 +01:00
Jason Frame
6a2d41fccc Add config option to clique to allow not creating empty blocks (#6082)
Signed-off-by: Jason Frame <jason.frame@consensys.net>
2023-11-03 07:00:18 +10:00
Fabio Di Fabio
20a82d4548 Mining options refactor (#6027)
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
2023-10-24 11:38:05 +02:00
Justin Florentine
a90ea056f1 Unsigned timestamps and blob gas used (#6046)
* 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>
2023-10-19 09:54:39 +11:00
Fabio Di Fabio
6d100f30b7 Priority senders (#5959)
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
2023-10-17 13:19:09 +02:00
Stefan Pingel
1c293fed97 Transaction Validation and Selection Plugin API update (#6020)
change Transaction Validation and Selection Plugin to make them more useful

Signed-off-by: Stefan <stefan.pingel@consensys.net>
Signed-off-by: Stefan Pingel <16143240+pinges@users.noreply.github.com>
Co-authored-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
2023-10-12 17:52:32 +10:00
Gabriel-Trintinalia
c4f66c4758 BlockTransactionSelector refactoring (#5931)
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
2023-09-28 10:33:44 +10:00
Sally MacFarlane
77b34f5d4f renamed PayloadTuple and made a separate class (#5916)
* renamed PayloadTuple and made a separate class 

* made a record

* refactor tests to use PayloadWrapper

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

---------

Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
2023-09-26 10:35:14 +10:00
Stefan Pingel
1c261db30f add plugin API to enable plugins to validate transaction before they are added to the transaction pool (#5891)
* add plugin API to enable plugins to validate transaction before they are added to the transaction pool

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

* updated plugin version

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

---------

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-09-25 10:13:07 +10:00
Matt Whitehead
dfcd960d8b Don't start BFT mining coordinators until initial sync has completed (#5861)
* Don't start BFT mining coordinators until initial sync has completed

Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>

* Fix unit tests

Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>

* Fix 'enable' logic

Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>

---------

Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>
2023-09-15 14:47:15 +10:00
Fabio Di Fabio
25c2065434 Layered txpool by default and txpool options hoverhaul (#5772)
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
2023-09-11 12:16:18 +02:00
Stefan Pingel
d8406f0d20 add parent beacon block root to payload id calculation (#5843)
Signed-off-by: Stefan <stefan.pingel@consensys.net>
2023-09-05 18:41:46 +10:00
Fabio Di Fabio
6bd3135713 Post Merge cleanup: remove latestValidAncestorDescendsFromTerminal (#4703)
* Post Merge cleanup: remove latestValidAncestorDescendsFromTerminal

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

* fixed tests

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-08-24 11:09:41 +10:00
Stefan Pingel
47285a48f6 Eip4788 parentBeaconBlockRoot (#5758)
Implement EIP 4788
Unit tests need to be added
Implementation is working for test net 8, address of the contract will probably change
EIP 4788 is still not finalized. Some changes might be necessary.
 
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-08-22 12:10:12 +10:00
matkt
9706bd7329 Update worldstate state change behavior in case of FCU (#5699)
Update the worldstate in the same way as the blockchain in order to avoid having inconsistencies between the two and later trigger a big rollforward

Signed-off-by: Karim TAAM <karim.t2am@gmail.com>
Co-authored-by: Ameziane H <ameziane.hamlat@consensys.net>
2023-08-18 10:28:49 +02:00
garyschulte
56768060de Promote segmented storage (#5700)
promote segmented storage to plugin-api, implement SegmentedInMemoryKeyValueStorage
Signed-off-by: garyschulte <garyschulte@gmail.com>
2023-07-27 12:51:37 -07:00
Justin Florentine
1c099e8970 Consolidated EIP-4844 (#5724)
* Implements EIP-4844.

* introduces a Hardfork class to the protocol schedule system
* new Engine APIs required for CL to work on 4844
* new DataGas type for tracking block cost for 4844 data
* new VersionedHash type to reflect that a versioned hash is not quite a pure sha256
* incorporates wrapped jc-kzg library for KZG point evaluations
* New transaction type, and domain objects for constituent parts to represent the Blobs, KZGCommitments, and Proofs used for 4844
* RLP encoders and decoders to support new transaction type
* gas pricing calculators for the new type of gas
* plugin-api version was changed

Signed-off-by: Justin Florentine <justin+github@florentine.us>
Co-authored-by: Jiri Peinlich <jiri.peinlich@gmail.com>
Co-authored-by: Jason Frame <jason.frame@consensys.net>
Co-authored-by: garyschulte <garyschulte@gmail.com>
Co-authored-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
Co-authored-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
Co-authored-by: Stefan <stefan.pingel@consensys.net>
Co-authored-by: spencer-tb <spencer@spencertaylorbrown.uk>

* junit5 updates

Signed-off-by: Justin Florentine <justin+github@florentine.us>

* update t8n test

Cancun gas claculator was inheriting from london, should have been shanghai.

Signed-off-by: Danno Ferrin <danno.ferrin@swirldslabs.com>

---------

Signed-off-by: Justin Florentine <justin+github@florentine.us>
Signed-off-by: Danno Ferrin <danno.ferrin@swirldslabs.com>
Co-authored-by: Jiri Peinlich <jiri.peinlich@gmail.com>
Co-authored-by: Jason Frame <jason.frame@consensys.net>
Co-authored-by: garyschulte <garyschulte@gmail.com>
Co-authored-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
Co-authored-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
Co-authored-by: Stefan <stefan.pingel@consensys.net>
Co-authored-by: spencer-tb <spencer@spencertaylorbrown.uk>
Co-authored-by: Danno Ferrin <danno.ferrin@swirldslabs.com>
2023-07-26 12:44:01 -04:00
Fabio Di Fabio
6603ebb716 Introduce transaction validator interface (phase 2) (#5682)
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
2023-07-25 12:17:24 +02:00
George Tebrean
47a61ddb11 Decouple JsonRpcError enum from the data field (#5629)
Signed-off-by: George Tebrean <george@web3labs.com>
Co-authored-by: Simon Dudley <simon.dudley@consensys.net>
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
2023-07-24 10:22:46 +10:00
Fabio Di Fabio
86b2b600a0 Do not leak references to PendingTransactions (#5693)
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
2023-07-13 13:39:52 +02:00
Antoine Toulme
901661cb4f Update tuweni2.4.2 (#5684)
* Revert "Revert "Update Tuweni to 2.4.1 (#5513)" (#5585)"

This reverts commit 6111e1bbc3.

Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>

* update Tuweni to 2.4.2

Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>

---------

Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
2023-07-11 22:26:32 -07:00
Fabio Di Fabio
6ac03af19b Introduce transaction validator interface (phase 1) (#5673)
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
2023-07-07 09:57:53 +02:00
Sally MacFarlane
ac449dd8d5 consensus/merge junit5 (#5632)
* junit5

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

---------

Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
2023-06-23 08:13:47 +10:00
Sally MacFarlane
2dcac7be5c consensus/ibft junit5 (#5633)
* junit5

* lenience

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

---------

Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
2023-06-23 07:20:17 +10:00
naviechan
0ceeaf3180 EIP-6110: Add deposit validation and apis (#5295)
Completes the implementation of EIP-6110

* Decode and extract deposit from transaction receipt log
* Introduce depositContractAddress field in genesis file
* Validate deposits in a block against the transaction receipt logs
* Update engine_newPayloadV2 and engine_getPayloadV2 according to the spec. Some of the non-functional components were partially implemented in the previous PR

Signed-off-by: naviechan <naviechan@gmail.com>
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
Co-authored-by: Simon Dudley <simon.dudley@consensys.net>
2023-06-21 16:57:45 +10:00
Simon Dudley
da16402162 Remove maybeHead from BackwardSyncContext (#5497)
Its usage is not clear and it's causing besu to rewind the head to it (a large reorg) when combined with nimbus backwards sync.

Add more backwards sync logging.

Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
Co-authored-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
2023-06-15 08:27:41 +10:00
Sally MacFarlane
6111e1bbc3 Revert "Update Tuweni to 2.4.1 (#5513)" (#5585)
This reverts commit b96418143c.

Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
2023-06-13 13:12:23 +10:00
Antoine Toulme
b96418143c Update Tuweni to 2.4.1 (#5513)
* update to 2.4.1

* update use of DNS daemon with Vertx

* fix issue with Bytes.repeat

* update antlr version

* fix dns tests

Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>

---------

Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
2023-06-09 12:31:20 +10:00
Fabio Di Fabio
c1cfaf462a Remove deprecated Rinkeby network (#5540)
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
2023-06-08 10:59:02 +02:00
Stefan Pingel
b97c9350b4 Revert the revert of the tx selection commit (#5507)
* Revert "Revert "Add plugin API to select Transactions (#5396)" (#5499)"

This reverts commit a0c6052778.

* fix receipt root bug

Signed-off-by: Stefan <stefan.pingel@consensys.net>
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
Signed-off-by: Usman Saleem <usman@usmans.info>
Signed-off-by: Stefan Pingel <16143240+pinges@users.noreply.github.com>
Co-authored-by: Simon Dudley <simon.dudley@consensys.net>
Co-authored-by: Usman Saleem <usman@usmans.info>
2023-06-02 15:06:03 +10:00
Sally MacFarlane
186d38b81d [MINOR] switch QBFT tests to Junit5 (#5525)
* junit5

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

* lenient mocking

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

* remove junit4

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

---------

Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
2023-06-02 10:34:04 +10:00
Fabio Di Fabio
610812c841 Ignore min-block-occupancy-ratio option when on PoS (#5491)
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
2023-05-26 10:25:19 +02:00
Simon Dudley
a0c6052778 Revert "Add plugin API to select Transactions (#5396)" (#5499)
* Revert "Add plugin API to select Transactions (#5396)"

This reverts commit 65bcc557e4.

Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
2023-05-26 10:21:44 +10:00
Stefan Pingel
65bcc557e4 Add plugin API to select Transactions (#5396)
This API fulfils the basic requirements, but will probably be extended in the near future. 

Signed-off-by: Stefan <stefan.pingel@consensys.net>
Signed-off-by: Stefan Pingel <16143240+pinges@users.noreply.github.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
2023-05-23 13:24:22 +10:00
Fabio Di Fabio
6a2a1ea0b8 Log more info about proposed blocks (#5469)
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
2023-05-18 11:06:54 +02:00
Simon Dudley
4f5dcaa571 Remove block creation task map entries when cancelling (#5423)
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
2023-05-04 19:19:48 +10:00
Simon Dudley
b084d80878 Ensure parisSpecificModifications are unapplied for all subsequent forks (#5406)
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
2023-04-28 16:43:03 +10:00
Simon Dudley
423a826fa1 Decompose putMilestone into putBlockNumberMilestone and putTimestampMilestone (#5405)
For readability and clarity

Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
2023-04-28 15:09:51 +10:00
Simon Dudley
c34139c18c Unified protocol schedule tidy up (#5375)
* Fold AbstractProtocolScheduleBuilder into ProtocolScheduleBuilder
* Tidy up WithdrawalsValidatorProvider
* Remove unnecessary createSchedule in JsonRpcMethodsFactory now timestamps are in the main protocolschedule
* Fold BlockNumberStreamingProtocolSchedule into MilestoneStreamingProtocolSchedule
* Rename UnifiedProtocolSchedule to DefaultProtocolSchedule
* inline ProtocolScheduleBuilder.postBuildStep

Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
2023-04-21 11:49:02 -07:00
Jason Frame
b137432c25 Remove merge block processor as block rewards are already disabled for Paris and above in the protocol schedule (#5357)
Signed-off-by: Jason Frame <jason.frame@consensys.net>
2023-04-21 15:07:27 +10:00