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

Merge v1.13.11 #311

Merged
merged 45 commits into from
Apr 30, 2024
Merged

Merge v1.13.11 #311

merged 45 commits into from
Apr 30, 2024

Conversation

ganeshvanahalli
Copy link
Contributor

@ganeshvanahalli ganeshvanahalli commented Apr 26, 2024

Merge upstream geth's v1.13.11 release into our geth fork:https://github.com/ethereum/go-ethereum/releases/tag/v1.13.11

  • Upstream disabled logging by default, but we keep it on since the logs are very useful for tests in nitro
  • This PR in upstream geth introduces a deadlock when using simulated_beacon_api with multiple transactions being submitted simultaneously (an often situation in multiple nitro tests). We also include a fix for this
    • The api in simulator mode, eventually calls forced reset on txpool, and that calls each of the subpools to notify its subscribers (which is blocking) with transactions that were affected by the reset, and the api is one of the subscribers- thus a deadlock :)
    • The fix is to make the txEvents channel that api uses a buffered one, here we choose the capacity to be 15 (which is ample for situations handled in nitro tests)
  • On M2 mac, metrics/influxdb/ tests fail due to different floating point results

Uses Tristian's https://github.com/Tristan-Wilson/MyScripts/blob/main/bin/merge-helper

nitro PR- OffchainLabs/nitro#2259
Part of NIT-2452

Testing done

geth and nitro tests pass

karalabe and others added 30 commits January 11, 2024 19:24
* Fix broken badge in README.md

Replaced broken Github link with IPFS link for long-term storage.

* update go badge

Co-authored-by: lightclient <[email protected]>

---------

Co-authored-by: lightclient <[email protected]>
* accounts, ethclient: minor tweaks on the new simulated backend

* ethclient/simulated: add an initial batch of gas options

* accounts, ethclient: remove mandatory gasLimit constructor param

* accounts, ethclient: minor option naming tweaks
This test was failling consistently on the github 32-bit build probably due to slow IO. Skipping it for that green check.
Given the discussions around deprecating pending (see #28623 or ethereum/execution-apis#495), we can move away from using the pending block internally, and use latest instead
Updates the reference tests to the latest version
This should fix a rare hang in waitSnapExtension during shutdown.
 In the tracing tests, the base fee was generally set to nil. This commit changes this to pass the proper base instead, and fixes the few tests which become broken by the change.
EIP-4844 adds a new transaction type for blobs. Users can submit such transactions via `eth_sendRawTransaction`. In this PR we refrain from adding support to `eth_sendTransaction` and in fact it will fail if the user passes in a blob hash.

However since the chain can handle such transactions it makes sense to allow simulating them. E.g. an L2 operator should be able to simulate submitting a rollup blob and updating the L2 state. Most methods that take in a transaction object should recognize blobs. The change boils down to adding `blobVersionedHashes` and `maxFeePerBlobGas` to `TransactionArgs`. In summary:

- `eth_sendTransaction`: will fail for blob txes
- `eth_signTransaction`: will fail for blob txes

The methods that sign txes does not, as of this PR, add support the for new EIP-4844 transaction types. Resuming the summary:

- `eth_sendRawTransaction`: can send blob txes
- `eth_fillTransaction`: will fill in a blob tx. Note: here we simply fill in normal transaction fields + possibly `maxFeePerBlobGas` when blobs are present. One can imagine a more elaborate set-up where users can submit blobs themselves and we fill in proofs and commitments and such. Left for future PRs if desired.
- `eth_call`: can simulate blob messages
- `eth_estimateGas`: blobs have no effect here. They have a separate unit of gas which is not tunable in the transaction.
The code to compute a versioned hash was duplicated a couple times, and also had a small
issue: if we ever change params.BlobTxHashVersion, it will most likely also cause changes
to the actual hash computation. So it's a bit useless to have this constant in params.
This change enables Cancun 

- Sepolia at 1706655072 (Jan 31st, 2024)
- Holesky at 1707305664 (Feb 7th, 2024)

Specification: ethereum/execution-specs#860
This change simplifies the logic for indexing transactions and enhances the UX when transaction is not found by returning more information to users.

Transaction indexing is now considered as a part of the initial sync, and `eth.syncing` will thus be `true` if transaction indexing is not yet finished. API consumers can use the syncing status to determine if the node is ready to serve users.
This change makes use of uin256 to represent balance in state. It touches primarily upon statedb, stateobject and state processing, trying to avoid changes in transaction pools, core types, rpc and tracers.
sandakersmann and others added 13 commits January 23, 2024 15:02
…ace (#28849)

This change switches from using the `Hasher` interface to add/query the bloomfilter to implementing it as methods.
This significantly reduces the allocations for Search and Rebloom.
… param checks (#28230)

 This PR introduces a few changes with respect to payload verification in fcu and new payload requests:

* First of all, it undoes the `verifyPayloadAttributes(..)` simplification I attempted in #27872. 
* Adds timestamp validation to fcu payload attributes [as required](https://github.com/ethereum/execution-apis/blob/main/src/engine/cancun.md#specification-1) (section 2) by the Engine API spec. 
* For the new payload methods, I also update the verification of the executable data. For `newPayloadV2`, it does not currently ensure that cancun values are `nil`. Which could make it possible to submit cancun payloads through it. 
* On `newPayloadV3` the same types of checks are added. All shanghai and cancun related fields in the executable data must be non-nil, with the addition that the timestamp is _only_ with cancun.
* Finally it updates a newly failing catalyst test to call the correct fcu and new payload methods depending on the fork.
…d reset (#28837)

This PR fixes an issues in the new simulated backend. The root cause is the fact that the transaction pool has an internal reset operation that runs on a background thread.

When a new transaction is added to the pool via the RPC, the transaction is added to a non-executable queue and will be moved to its final location on a background thread. If the machine is overloaded (or simply due to timing issues), it can happen that the simulated backend will try to produce the next block, whilst the pool has not yet marked the newly added transaction executable. This will cause the block to not contain the transaction. This is an issue because we want determinism from the simulator: add a tx, mine a block. It should be in there.

The PR fixes it by adding a Sync function to the txpool, which waits for the current reset operation (if any) to finish, and then runs an entire round of reset on top. The new round is needed because resets are only triggered by new head events, so newly added transactions will not trigger the outer resets that we can wait on. The transaction pool would eventually internally do a reset even on transaction addition, but there's no easy way to wait on that and there's no meaningful reason to bubble that across everything. A clean outer reset will at worse be a small noop goroutine.
This change moves all the transaction indexing functions to a separate txindexer.go file and defines a txIndexer structure as a refactoring.
GetPayloadVX should only return payloads which match its version. GetPayloadV2 is a special snowflake that supports v1 and v2 payloads. This change uses a a version-specific prefix within in the payload id, basically a namespace for the version number.
Fix flaky test due to incomplete transaction indexing
…e value field in beforeEVMTransfers and afterEVMTransfers of call_tracer inner_revert_reason.json to match correct values
…f capacity 15, to prevent it from deadlocking on nitro-tests
Copy link

cla-bot bot commented Apr 26, 2024

We require contributors to sign our Contributor License Agreement. In order for us to review and merge your code, please sign the linked documents below to get yourself added. https://na3.docusign.net/Member/PowerFormSigning.aspx?PowerFormId=b15c81cc-b5ea-42a6-9107-3992526f2898&env=na3&acct=6e152afc-6284-44af-a4c1-d8ef291db402&v=2

Copy link

cla-bot bot commented Apr 26, 2024

We require contributors to sign our Contributor License Agreement. In order for us to review and merge your code, please sign the linked documents below to get yourself added. https://na3.docusign.net/Member/PowerFormSigning.aspx?PowerFormId=b15c81cc-b5ea-42a6-9107-3992526f2898&env=na3&acct=6e152afc-6284-44af-a4c1-d8ef291db402&v=2

@ganeshvanahalli ganeshvanahalli marked this pull request as ready for review April 26, 2024 23:16
Base automatically changed from merge-v1.13.10 to master April 29, 2024 14:34
Copy link

cla-bot bot commented Apr 29, 2024

We require contributors to sign our Contributor License Agreement. In order for us to review and merge your code, please sign the linked documents below to get yourself added. https://na3.docusign.net/Member/PowerFormSigning.aspx?PowerFormId=b15c81cc-b5ea-42a6-9107-3992526f2898&env=na3&acct=6e152afc-6284-44af-a4c1-d8ef291db402&v=2

Copy link
Member

@Tristan-Wilson Tristan-Wilson left a comment

Choose a reason for hiding this comment

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

LGTM

@Tristan-Wilson Tristan-Wilson merged commit 39a2d17 into master Apr 30, 2024
2 of 4 checks passed
@Tristan-Wilson Tristan-Wilson deleted the merge-v1.13.11 branch April 30, 2024 12:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.