Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4844] Add encodingContext to TransactionEncoder and TransactionDecoder #5820

Conversation

Gabriel-Trintinalia
Copy link
Contributor

@Gabriel-Trintinalia Gabriel-Trintinalia commented Aug 29, 2023

PR description

Introduces a refactoring of TransactionDecoder and TransactionEncoder classes, incorporating an EncodingContext. This context specifies the decoding destination of the transaction, either the transaction pool or the block body.

This refactoring is required due to 4844, which presents BlobTransactiona that requires broadcasting to the network using a different encoding than the one used within a block body.

Main changes:

  • Inclusion of EncodingContext parameter in relevant methods.
  • Creation of dedicated classes for the Frontier, Access List, and 1559 transaction types, moving them out of the TransactionEncoder/Decoder classes.
  • Revisions to internal logic to leverage EncodingContext for decoding.
  • Renaming of decodeForWire method to decodeRLP for better clarity.
  • Adjustments to unit tests to consider the new context.

Fixed Issue(s)

Fixes #5818

Fixes hive tests:

  • blob_txs_full/reject_valid_full_blob_in_block_rlp/000-fork=Cancun-one_full_blob_one_tx
  • blob_txs_full/reject_valid_full_blob_in_block_rlp/001-fork=Cancun-one_full_blob_max_txs
  • blob_txs_full/reject_valid_full_blob_in_block_rlp/002-fork=Cancun-one_full_blob_at_the_end_max_txs

Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
@github-actions
Copy link

  • I thought about documentation and added the doc-change-required label to this PR if updates are required.
  • I thought about the changelog and included a changelog update if required.
  • If my PR includes database changes (e.g. KeyValueSegmentIdentifier) I have thought about compatibility and performed forwards and backwards compatibility tests

Copy link
Contributor

@jflo jflo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we've stepped backwards a bit on the readability front, perhaps we should rethink/refactor what TransactionDecoders are and how they should be interacted with.

@jflo
Copy link
Contributor

jflo commented Aug 29, 2023

We should also look at the encoding flow to make sure it is covered. Judging by this test:

https://hivecancun.ethdevops.io/suite.html?suiteid=1693318274-e8392753d17fdfc054e6216e11ef2a81.json&suitename=engine-cancun#test-44

It is probably not. The size mismatch suggests that we didn't gossip out the blobs/commitments/proofs etc.

@Gabriel-Trintinalia Gabriel-Trintinalia changed the title [4844] BlobTransactions - Add decodeType to TransactionDecoder WIP [4844] BlobTransactions - Add decodeType to TransactionDecoder Aug 30, 2023
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
@Gabriel-Trintinalia Gabriel-Trintinalia changed the title WIP [4844] BlobTransactions - Add decodeType to TransactionDecoder WIP [4844] Add encodingContext to TransactionEncoder and TransactionDecoder Sep 4, 2023
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
final BytesValueRLPOutput txRlp = new BytesValueRLPOutput();
maybeTx.get().writeTo(txRlp);
TransactionEncoder.encodeRLP(maybeTx.get(), txRlp, EncodingContext.POOLED_TRANSACTION);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this line fixes the Versioned hashes from blob transactions do not match expected values error

import org.slf4j.Logger;

public class BlobPooledTransactionEncoder {
private static final Logger LOG = getLogger(BlobPooledTransactionEncoder.class);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we want matching trace logging in the decoder BlobPooledTransactionDecoder

@Gabriel-Trintinalia
Copy link
Contributor Author

I think we've stepped backwards a bit on the readability front, perhaps we should rethink/refactor what TransactionDecoders are and how they should be interacted with.

Thanks for the input. I have considered it when developing. This PR has changed quite a bit now. Would you be able to have a look again @jflo

@Gabriel-Trintinalia
Copy link
Contributor Author

We should also look at the encoding flow to make sure it is covered. Judging by this test:

https://hivecancun.ethdevops.io/suite.html?suiteid=1693318274-e8392753d17fdfc054e6216e11ef2a81.json&suitename=engine-cancun#test-44

It is probably not. The size mismatch suggests that we didn't gossip out the blobs/commitments/proofs etc.

This test should be fixed now I believe

Copy link
Contributor

@pinges pinges left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some comments and questions ...

@@ -27,7 +28,7 @@ public static Transaction decodeRawTransaction(final String rawTransaction)
throws InvalidJsonRpcRequestException {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we rename this method or get rid of it? It does not reflect which format to decode now that we have the two different kinds ...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any suggestions for names? It is used to handle the serialization in the RPC apis

@@ -126,7 +128,7 @@ public static Transaction readFrom(final Bytes rlpBytes) {
}

public static Transaction readFrom(final RLPInput rlpInput) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can only decode one of the two encoding formats now. Should this be renamed? Should it decode both formats? Should we remove it and only rely on the TransactionDecoder?

@@ -613,7 +615,7 @@ private Bytes32 getOrComputeSenderRecoveryHash() {
* @param out the output to write the transaction to
*/
public void writeTo(final RLPOutput out) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s.a.

@@ -676,17 +678,19 @@ public int getSize() {
}

private void memoizeHashAndSize() {
final Bytes bytes = TransactionEncoder.encodeOpaqueBytes(this);
final Bytes bytes = TransactionEncoder.encodeOpaqueBytes(this, EncodingContext.BLOCK_BODY);
hash = Hash.hash(bytes);

if (transactionType.supportsBlob()) {
if (getBlobsWithCommitments().isPresent()) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we sure that we always want the size including the blobs when they are available? Or should we have a size and a size method that takes the encoding context as an argument?
It looks like size is only used in the TransactionAnnouncement. Should we rename it to announcementSize?

*/
public static Transaction decodeOpaqueBytes(
final Bytes opaqueBytes, final EncodingContext context) {
var transactionType = getTransactionType(opaqueBytes);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this now doing the same as the decodeRLP, just a RLPInput instead of the bytes?

Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
@Gabriel-Trintinalia Gabriel-Trintinalia changed the title WIP [4844] Add encodingContext to TransactionEncoder and TransactionDecoder [4844] Add encodingContext to TransactionEncoder and TransactionDecoder Sep 8, 2023
@Gabriel-Trintinalia Gabriel-Trintinalia marked this pull request as ready for review September 12, 2023 03:34
Copy link
Contributor

@macfarla macfarla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

} else {
throw new RuntimeException(
String.format("An unsupported encoded `v` value of %s was found", v));
// If the transaction type is not present, decode the opaque bytes as RLP
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this happen normally?

@macfarla macfarla enabled auto-merge (squash) September 13, 2023 05:05
@macfarla macfarla merged commit 1fa21e2 into hyperledger:main Sep 13, 2023
18 of 19 checks passed
siladu pushed a commit to siladu/besu that referenced this pull request Sep 20, 2023
---

Drop Kotti Network support (ETC) (hyperledger#5816)

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

fix ForkId if there are no Forks and the starting timestamp is not 0 (hyperledger#5819)

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

enforce that BlobTransactions have at least one blob (hyperledger#5826)

* enforce that BlobTransactions have at least one blob

Signed-off-by: Stefan <stefan.pingel@consensys.net>
Signed-off-by: Stefan Pingel <16143240+pinges@users.noreply.github.com>

Do not create ignorable segments on `revert storage-variables` (hyperledger#5830)

* fix the bug that creates the ignorable chain pruner segment, add rocks exception parsing to RocksDBColumnarKeyValueStorage subclasses
* parse rocksdb error for unprintable column family id's

Signed-off-by: garyschulte <garyschulte@gmail.com>

add versioned hashes and number of blobs to toString() (hyperledger#5831)

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

add parent beacon block root to payload id calculation (hyperledger#5843)

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

bump version to 23.7.3-SNAPSHOT (hyperledger#5854)

Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>

set the beacon root address to the correct value (hyperledger#5853)

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

docs(readme): fix broken link to installation of binaries page (hyperledger#5859)

Fixes hyperledger#5858

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

Update RocksDB version from 8.0.0 to 8.3.2 (hyperledger#5832)

Signed-off-by: Ameziane H <ameziane.hamlat@consensys.net>

Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>

use non-deprecated authenticate methods (hyperledger#5852)

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

move to Hyperledger shared runners for current github actions (hyperledger#5860)

Signed-off-by: garyschulte <garyschulte@gmail.com>

Add range tracing with worldstate (hyperledger#5844)

Implement a method to trace a range of blocks and have access to the worldstate before and after the tracing

Signed-off-by: Karim TAAM <karim.t2am@gmail.com>

Layered txpool by default and txpool options hoverhaul (hyperledger#5772)

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

Fix issue 5824 - Duplicate key errors in EthScheduler-Transactions (hyperledger#5857)

Fix issue 5824 - Duplicate key errors in EthScheduler-Transactions

Signed-off-by: Ameziane H <ameziane.hamlat@consensys.net>

updated gradle verification metadata (hyperledger#5870)

* removed old artefacts [skip ci]

* works with compileTestJava

* restored metadata needed for codeQL and trusted-artifacts block for javadoc/sources

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

---------

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

[4844] Add encodingContext to TransactionEncoder and TransactionDecoder (hyperledger#5820)

* Add decode type to TransactionDecoder

* Refactoring TransactionDecoder

* Invert methods order

* Use Transaction encoder instead of writeTo

* Move enter and leave list to inner method as pr suggestion

* Size calculation should use opaque bytes instead of rlp

---------

Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>

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

payload attributes: fix wrong warning and fail if beacon root is available before cancun (hyperledger#5872)

Signed-off-by: Stefan <stefan.pingel@consensys.net>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>

Merge MutableAccount and EVMAccount (hyperledger#5863)

Merge MutableAccount and EVMAccount functionalities by removing
EVMAccount, all calls to getMutable, and the WrappedEVMAccount that was
wrapping non-EVMAccounts in a mutable fashion.  Instead, use a
MutableAccount in all cases an EVMAccount would have been used.  This
also tends to reduce a level of layering in many places.

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

Add world context to transaction tracing API (hyperledger#5836)

* Add world context to transaction tracing API

Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu>

* Update changelog with PR ID

Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu>

* Add the Transaction to traceEndTransaction

Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu>

* Rebase on main

Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu>

* Add receipt-linked information to the transaction tracer

Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu>

* added test

Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>

---------

Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu>
Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
Co-authored-by: Daniel Lehrner <daniel.lehrner@consensys.net>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>

Bonsai based reference test worldstate (hyperledger#5686)

* create a bonsai based reference test worldstate
  -> getOrCreate in BonsaiWorldStateUpdateAccumulator - do not throw if we discover an empty account in a non-null BonsaiValue<Account>
  -> add curentStateRoot to t8n
  -> storageEntriesFrom and streamAccounts implemented in BonsaiWorldStateKeyValueStorage
  -> add endKey version of streamFromKey
* bonsai fix for self-destruct and create2 at the same address and same block

Signed-off-by: garyschulte <garyschulte@gmail.com>
Signed-off-by: Karim TAAM <karim.t2am@gmail.com>
Co-authored-by: Karim TAAM <karim.t2am@gmail.com>

Don't start BFT mining coordinators until initial sync has completed (hyperledger#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>

display only peers ready for requets on ethstats (hyperledger#5880)

* display only ready for requets peers in ethstats

Signed-off-by: Karim TAAM <karim.t2am@gmail.com>

* cast to int

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

---------

Signed-off-by: Karim TAAM <karim.t2am@gmail.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Stefan Pingel <16143240+pinges@users.noreply.github.com>

[MINOR] test RLP used for encode/decode blob tx should contain to field (hyperledger#5883)

* validate to field on encode/decode for blob tx

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

* revert decode/encode checks - tis done later in tx validation

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

---------

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

Fix: correctly convert percentage options in TOML configuration file (hyperledger#5886)

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

EIP7516 - Add BlobBaseFee opcode to Cancun EVM (hyperledger#5884)

Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>

Fix snapsync heal (hyperledger#5838)

Signed-off-by: Karim TAAM <karim.t2am@gmail.com>

Upgrade besu-native (hyperledger#5893)

Upgrade besu-native to 0.8.2

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

Tune G1GC to reduce Besu memory footprint (hyperledger#5879)

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

Add updated storage to evmtool json trace (hyperledger#5892)

Add the EIP-3155 "storage" option to the standard tracer, with the
caveat only updated storage is logged.

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

Update holesky with fixed extraData, genesis time, shanghaiTime (hyperledger#5890)

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

[CHANGELOG] removed duplicated line (hyperledger#5904)

* removed duplicated line [skip ci]

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

* fixed spelling on Holesky

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

---------

Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
garyschulte pushed a commit to garyschulte/besu that referenced this pull request Sep 20, 2023
…er (hyperledger#5820)

* Add decode type to TransactionDecoder

* Refactoring TransactionDecoder

* Invert methods order

* Use Transaction encoder instead of writeTo

* Move enter and leave list to inner method as pr suggestion

* Size calculation should use opaque bytes instead of rlp

---------

Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
garyschulte pushed a commit to garyschulte/besu that referenced this pull request Sep 20, 2023
…er (hyperledger#5820)

* Add decode type to TransactionDecoder

* Refactoring TransactionDecoder

* Invert methods order

* Use Transaction encoder instead of writeTo

* Move enter and leave list to inner method as pr suggestion

* Size calculation should use opaque bytes instead of rlp

---------

Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: garyschulte <garyschulte@gmail.com>
siladu pushed a commit to siladu/besu that referenced this pull request Sep 20, 2023
…er (hyperledger#5820)

* Add decode type to TransactionDecoder

* Refactoring TransactionDecoder

* Invert methods order

* Use Transaction encoder instead of writeTo

* Move enter and leave list to inner method as pr suggestion

* Size calculation should use opaque bytes instead of rlp

---------

Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
@Gabriel-Trintinalia Gabriel-Trintinalia deleted the add-decode-type-to-transaction-decoder branch September 20, 2023 06:22
siladu pushed a commit to siladu/besu that referenced this pull request Sep 20, 2023
…er (hyperledger#5820)

* Add decode type to TransactionDecoder

* Refactoring TransactionDecoder

* Invert methods order

* Use Transaction encoder instead of writeTo

* Move enter and leave list to inner method as pr suggestion

* Size calculation should use opaque bytes instead of rlp

---------

Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
siladu added a commit that referenced this pull request Sep 20, 2023
burn-in candidate for 23.7.3 from main sha 6dc10a9..eef40bd

https://github.com/hyperledger/besu/compare/6dc10a9..eef40bd

---

* Drop Kotti Network support (ETC) (#5816)

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

* fix ForkId if there are no Forks and the starting timestamp is not 0 (#5819)

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

* enforce that BlobTransactions have at least one blob (#5826)

* enforce that BlobTransactions have at least one blob

Signed-off-by: Stefan <stefan.pingel@consensys.net>
Signed-off-by: Stefan Pingel <16143240+pinges@users.noreply.github.com>
Signed-off-by: garyschulte <garyschulte@gmail.com>

* Do not create ignorable segments on `revert storage-variables` (#5830)

* fix the bug that creates the ignorable chain pruner segment, add rocks exception parsing to RocksDBColumnarKeyValueStorage subclasses
* parse rocksdb error for unprintable column family id's

Signed-off-by: garyschulte <garyschulte@gmail.com>

* add versioned hashes and number of blobs to toString() (#5831)

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

* add parent beacon block root to payload id calculation (#5843)

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

* bump version to 23.7.3-SNAPSHOT (#5854)

Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
Signed-off-by: garyschulte <garyschulte@gmail.com>

* set the beacon root address to the correct value (#5853)

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

* docs(readme): fix broken link to installation of binaries page (#5859)

Fixes #5858

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
Signed-off-by: garyschulte <garyschulte@gmail.com>

* Update RocksDB version from 8.0.0 to 8.3.2 (#5832)

Signed-off-by: Ameziane H <ameziane.hamlat@consensys.net>

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

* use non-deprecated authenticate methods (#5852)

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

* move to Hyperledger shared runners for current github actions (#5860)

Signed-off-by: garyschulte <garyschulte@gmail.com>

* Add range tracing with worldstate (#5844)

Implement a method to trace a range of blocks and have access to the worldstate before and after the tracing

Signed-off-by: Karim TAAM <karim.t2am@gmail.com>
Signed-off-by: garyschulte <garyschulte@gmail.com>

* Layered txpool by default and txpool options hoverhaul (#5772)

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

* Fix issue 5824 - Duplicate key errors in EthScheduler-Transactions (#5857)

Fix issue 5824 - Duplicate key errors in EthScheduler-Transactions

Signed-off-by: Ameziane H <ameziane.hamlat@consensys.net>
Signed-off-by: garyschulte <garyschulte@gmail.com>

* updated gradle verification metadata (#5870)

* removed old artefacts [skip ci]

* works with compileTestJava

* restored metadata needed for codeQL and trusted-artifacts block for javadoc/sources

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

---------

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

* [4844] Add encodingContext to TransactionEncoder and TransactionDecoder (#5820)

* Add decode type to TransactionDecoder

* Refactoring TransactionDecoder

* Invert methods order

* Use Transaction encoder instead of writeTo

* Move enter and leave list to inner method as pr suggestion

* Size calculation should use opaque bytes instead of rlp

---------

Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: garyschulte <garyschulte@gmail.com>

* #5868: fix beacon root address and modulus for devnet 9 (#5871)

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

* payload attributes: fix wrong warning and fail if beacon root is available before cancun (#5872)

Signed-off-by: Stefan <stefan.pingel@consensys.net>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: garyschulte <garyschulte@gmail.com>

* Merge MutableAccount and EVMAccount (#5863)

Merge MutableAccount and EVMAccount functionalities by removing
EVMAccount, all calls to getMutable, and the WrappedEVMAccount that was
wrapping non-EVMAccounts in a mutable fashion.  Instead, use a
MutableAccount in all cases an EVMAccount would have been used.  This
also tends to reduce a level of layering in many places.

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

* Add world context to transaction tracing API (#5836)

* Add world context to transaction tracing API

Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu>

* Update changelog with PR ID

Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu>

* Add the Transaction to traceEndTransaction

Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu>

* Rebase on main

Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu>

* Add receipt-linked information to the transaction tracer

Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu>

* added test

Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>

---------

Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu>
Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
Co-authored-by: Daniel Lehrner <daniel.lehrner@consensys.net>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: garyschulte <garyschulte@gmail.com>

* Bonsai based reference test worldstate (#5686)

* create a bonsai based reference test worldstate
  -> getOrCreate in BonsaiWorldStateUpdateAccumulator - do not throw if we discover an empty account in a non-null BonsaiValue<Account>
  -> add curentStateRoot to t8n
  -> storageEntriesFrom and streamAccounts implemented in BonsaiWorldStateKeyValueStorage
  -> add endKey version of streamFromKey
* bonsai fix for self-destruct and create2 at the same address and same block

Signed-off-by: garyschulte <garyschulte@gmail.com>
Signed-off-by: Karim TAAM <karim.t2am@gmail.com>
Co-authored-by: Karim TAAM <karim.t2am@gmail.com>
Signed-off-by: garyschulte <garyschulte@gmail.com>

* 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>
Signed-off-by: garyschulte <garyschulte@gmail.com>

* display only peers ready for requets on ethstats (#5880)

* display only ready for requets peers in ethstats

Signed-off-by: Karim TAAM <karim.t2am@gmail.com>

* cast to int

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

---------

Signed-off-by: Karim TAAM <karim.t2am@gmail.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Stefan Pingel <16143240+pinges@users.noreply.github.com>
Signed-off-by: garyschulte <garyschulte@gmail.com>

* [MINOR] test RLP used for encode/decode blob tx should contain to field (#5883)

* validate to field on encode/decode for blob tx

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

* revert decode/encode checks - tis done later in tx validation

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

---------

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

* Fix: correctly convert percentage options in TOML configuration file (#5886)

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

* EIP7516 - Add BlobBaseFee opcode to Cancun EVM (#5884)

Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
Signed-off-by: garyschulte <garyschulte@gmail.com>

* Fix snapsync heal (#5838)

Signed-off-by: Karim TAAM <karim.t2am@gmail.com>
Signed-off-by: garyschulte <garyschulte@gmail.com>

* Upgrade besu-native (#5893)

Upgrade besu-native to 0.8.2

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

* Tune G1GC to reduce Besu memory footprint (#5879)

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

* Add updated storage to evmtool json trace (#5892)

Add the EIP-3155 "storage" option to the standard tracer, with the
caveat only updated storage is logged.

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

* Update holesky with fixed extraData, genesis time, shanghaiTime (#5890)

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

* [CHANGELOG] removed duplicated line (#5904)

* removed duplicated line [skip ci]

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

* fixed spelling on Holesky

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

---------

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

* add 23.7.2 release SHAs and bump to 23.7.3-23.7.3-23.7.3-23.7.3-23.7.3-23.7.3-23.7.3-23.7.3-23.7.3-23.7.3-23.7.3-23.7.3-23.7.3-23.7.3-23.7.3-23.7.3-23.7.3-23.7.3-23.7.3-23.7.3-23.7.3-23.7.3-23.7.3-RC version

Signed-off-by: garyschulte <garyschulte@gmail.com>

---------

Signed-off-by: Diego López León <dieguitoll@gmail.com>
Signed-off-by: garyschulte <garyschulte@gmail.com>
Signed-off-by: Stefan <stefan.pingel@consensys.net>
Signed-off-by: Stefan Pingel <16143240+pinges@users.noreply.github.com>
Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: Karim TAAM <karim.t2am@gmail.com>
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Signed-off-by: Ameziane H <ameziane.hamlat@consensys.net>
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
Signed-off-by: Danno Ferrin <danno.ferrin@swirldslabs.com>
Signed-off-by: Franklin Delehelle <franklin.delehelle@odena.eu>
Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
Co-authored-by: Diego López León <dieguitoll@gmail.com>
Co-authored-by: Stefan Pingel <16143240+pinges@users.noreply.github.com>
Co-authored-by: Daniel Lehrner <daniel.lehrner@consensys.net>
Co-authored-by: Peter Somogyvari <petermetz@users.noreply.github.com>
Co-authored-by: ahamlat <ameziane.hamlat@consensys.net>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: matkt <karim.t2am@gmail.com>
Co-authored-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Co-authored-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
Co-authored-by: Danno Ferrin <danno.ferrin@swirldslabs.com>
Co-authored-by: delehef <franklin.delehelle@odena.eu>
Co-authored-by: Matt Whitehead <matthew1001@gmail.com>
Co-authored-by: Simon Dudley <simon.dudley@consensys.net>
eum602 pushed a commit to lacchain/besu that referenced this pull request Nov 3, 2023
…er (hyperledger#5820)

* Add decode type to TransactionDecoder

* Refactoring TransactionDecoder

* Invert methods order

* Use Transaction encoder instead of writeTo

* Move enter and leave list to inner method as pr suggestion

* Size calculation should use opaque bytes instead of rlp

---------

Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
NickSneo pushed a commit to NickSneo/besu that referenced this pull request Nov 12, 2023
…er (hyperledger#5820)

* Add decode type to TransactionDecoder

* Refactoring TransactionDecoder

* Invert methods order

* Use Transaction encoder instead of writeTo

* Move enter and leave list to inner method as pr suggestion

* Size calculation should use opaque bytes instead of rlp

---------

Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

don't allow full blobs in engine_newPayload
4 participants