Skip to content

Update to geth v1.11.5 (erszbat)#74

Merged
ajsutton merged 26 commits intooptimismfrom
aj/update-geth-erszbat
Mar 26, 2023
Merged

Update to geth v1.11.5 (erszbat)#74
ajsutton merged 26 commits intooptimismfrom
aj/update-geth-erszbat

Conversation

@ajsutton
Copy link
Contributor

Description

Merges in changes from latest geth release (v1.11.5 - erszbat).

Metadata

fjl and others added 25 commits March 10, 2023 20:00
it should be constantinople rather than contantinople
* core: refactor code

* core: drop it from this anonymous goroutine func
Minor refactor to use the 'intended' accessor
Co-authored-by: Martin Holst Swende <martin@swende.se>
Co-authored-by: Felix Lange <fjl@twurst.com>
This makes it possible to run another protocol alongside discv5, by reading 
unhandled packets from the channel.
Co-authored-by: Stephen Flynn <stephen.flynn@gapac.com>
Not sure why this was removed, it's pretty useful to see the version
also in --help.
When a database failure occurs, bubble it up a into statedb, and report it in suitable places, such as during a 'bad block' report.
Makes clear the distinction between Finalize and FinalizedAndAssemble:

- In Finalize function, a series of state operations are applied according to consensus rules. The statedb is mutated and the root hash can be checked and compared afterwards.

This function should be used in block processing(receive afrom network and apply it locally) but not block generation.

- In FinalizeAndAssemble function, after applying state mutations, the block is also to be assembled with the latest
  state root computed, updating the header. 

 This function should be used in block generation only.
 Increases the time between consensus updates that we give the CL before we start warning the user.
This adds built-in support in package rlp for encoding, decoding and generating code dealing with uint256.Int.

---------

Co-authored-by: Felix Lange <fjl@twurst.com>
* api: Use 0700 file permissions for ExportChain

* change perm to 0644

* Update api.go

---------

Co-authored-by: Felix Lange <fjl@twurst.com>
Makes use of atomic.Uint64 instead of atomic by pointer
Schedules the shanghai hardfork on timestamp 1681338455 as discussed on ACDE 157: ethereum/execution-specs#727
Local transactions should not be subject to the "future shouldn't churn pending txs" rule
@ajsutton
Copy link
Contributor Author

Have confirmed op-e2e tests all pass using this new version and it can successfully sync part of the Goerli chain.

@ajsutton ajsutton marked this pull request as ready for review March 22, 2023 01:52
@ajsutton ajsutton requested a review from protolambda March 22, 2023 01:52
@ajsutton ajsutton force-pushed the aj/update-geth-erszbat branch from 27cb65b to 876919e Compare March 22, 2023 01:53
@ajsutton
Copy link
Contributor Author

Worth noting this op-geth specific commit: 876919e

It maintains a fix from the upgrade to v1.11.4 - upstream geth no longer supports safe or finalised tags if there hasn't yet been a call to engine_forkChoiceUpdated which it uses as the signal that TTD is reached. That causes issues in our e2e test setup at minimum and is generally not a great option given all bedrock networks are post-merge.

@protolambda
Copy link
Contributor

Update:

  • looking into running merger.FinalizePoS() on startup if the optimism config is there, to avoid relying on a first engine API method call, so it's merged from genesis. That way we don't have to remove the merge-dependent checks elsewhere, and can revert 876919e
  • working on testing in op-e2e and goerli

@protolambda protolambda force-pushed the aj/update-geth-erszbat branch from 876919e to 555b76f Compare March 24, 2023 11:59
@protolambda
Copy link
Contributor

Bedrock is post-PoS, and needs the FinalizePoS() to function as expected on fresh networks starting from genesis.

I fixed our op-e2e test setup to use a fake Proof-of-stake block building loop instead of using Clique. We used to mock finalized/safe head changes on clique, but if upstream geth does not want to support safe/finalized labels for pre-PoS networks then I think we should just stop using Clique for testing.

Note that attaching to Clique networks outside of op-e2e would still work, but those don't have finalized data, and will never have, so the L2 won't get finalized either there.

See ethereum-optimism/optimism#5225

@protolambda
Copy link
Contributor

Reviewed changes and it LGTM now, but want @ajsutton feedback on the last change I made, and this can all wait till Monday w.r.t. timezones and not pushing possibly breaking op-geth changes through on a Friday afternoon.

@ajsutton
Copy link
Contributor Author

Yeah that's a much nicer solution and brings us much more into line with geth's design and expectations. Thanks.

@ajsutton ajsutton merged commit 014c1f0 into optimism Mar 26, 2023
@ajsutton ajsutton deleted the aj/update-geth-erszbat branch March 26, 2023 21:53
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.