-
Notifications
You must be signed in to change notification settings - Fork 8
merge with upstream #34
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
Conversation
Co-authored-by: Sebastian Stammler <[email protected]>
…-compat-edge core: make isForkTimestampIncompatible return false when either fork is post genesis
This PR modifies how the metrics library handles `Enabled`: previously, the package `init` decided whether to serve real metrics or just dummy-types. This has several drawbacks: - During pkg init, we need to determine whether metrics are enabled or not. So we first hacked in a check if certain geth-specific commandline-flags were enabled. Then we added a similar check for geth-env-vars. Then we almost added a very elaborate check for toml-config-file, plus toml parsing. - Using "real" types and dummy types interchangeably means that everything is hidden behind interfaces. This has a performance penalty, and also it just adds a lot of code. This PR removes the interface stuff, uses concrete types, and allows for the setting of Enabled to happen later. It is still assumed that `metrics.Enable()` is invoked early on. The somewhat 'heavy' operations, such as ticking meters and exp-decay, now checks the enable-flag to prevent resource leak. The change may be large, but it's mostly pretty trivial, and from the last time I gutted the metrics, I ensured that we have fairly good test coverage. --------- Co-authored-by: Felix Lange <[email protected]>
This PR adds the error fragments to `func (abi ABI) getArguments` which allows typed decoding of errors.
…thdrawals storage root
…orage root * update checks for l2 withdrawal root to be gated on Isthmus * core: pass chainConfig to NewBlock for withdrawalRoot checks and fix usage this is so that we can check whether Isthmus is active within NewBlock() * genesis: read and set withdrawalsRoot to storageRoot of L2toL1MP contract * prioritize supplied withdrawalsRoot in beacon engine header check
…thdrawals-root Isthmus: withdrawals root in block header
…ethereum-optimism#446) * core: Move blockchain head verification after possible rewind If the blockchain needs a rewind due to a config change, it makes more sense to first perform that rewind and only then check the chain head's validity. The change in config might cause the loaded chain's head to be invalid before the rewind. * log configs at startup * fix logging
This fixes an issue where the disconnect message was not wrapped in a list. The specification requires it to be a list like any other message. In order to remain compatible with legacy geth versions, we now accept both encodings when parsing a disconnect message. --------- Co-authored-by: Felix Lange <[email protected]>
Add block overrides to `eth_estimateGas` to align consistency with `eth_call`. ethereum/go-ethereum#27800 (comment) Fixes ethereum/go-ethereum#28175 --------- Co-authored-by: Sina Mahmoodi <[email protected]>
Brings in minato sepolia Holocene activation time
Closes #23210 # Context When deploying Geth in Kubernetes with ReplicaSets, we encountered two DNS-related issues affecting node connectivity. First, during startup, Geth tries to resolve DNS names for static nodes too early in the config unmarshaling phase. If peer nodes aren't ready yet (which is common in Kubernetes rolling deployments), this causes an immediate failure: ``` INFO [11-26|10:03:42.816] Starting Geth on Ethereum mainnet... INFO [11-26|10:03:42.817] Bumping default cache on mainnet provided=1024 updated=4096 Fatal: config.toml, line 81: (p2p.Config.StaticNodes) lookup idontexist.geth.node: no such host ``` The second issue comes up when pods get rescheduled to different nodes - their IPs change but peers keep using the initially resolved IP, never updating the DNS mapping. This PR adds proper DNS support for enode:// URLs by deferring resolution to connection time. It also handles DNS failures gracefully instead of failing fatally during startup, making it work better in container environments where IPs are dynamic and peers come and go during rollouts. --------- Co-authored-by: Felix Lange <[email protected]>
Co-authored-by: Roberto Bayardo <[email protected]>
This PR implements EIP-7702: "Set EOA account code". Specification: https://eips.ethereum.org/EIPS/eip-7702 > Add a new transaction type that adds a list of `[chain_id, address, nonce, y_parity, r, s]` authorization tuples. For each tuple, write a delegation designator `(0xef0100 ++ address)` to the signing account’s code. All code reading operations must load the code pointed to by the designator. --------- Co-authored-by: Mario Vega <[email protected]> Co-authored-by: Martin Holst Swende <[email protected]> Co-authored-by: Felix Lange <[email protected]>
In this pull request, the state iterator is implemented. It's mostly a copy-paste from the original state snapshot package, but still has some important changes to highlight here: (a) The iterator for the disk layer consists of a diff iterator and a disk iterator. Originally, the disk layer in the state snapshot was a wrapper around the disk, and its corresponding iterator was also a wrapper around the disk iterator. However, due to structural differences, the disk layer iterator is divided into two parts: - The disk iterator, which traverses the content stored on disk. - The diff iterator, which traverses the aggregated state buffer. Checkout `BinaryIterator` and `FastIterator` for more details. (b) The staleness management is improved in the diffAccountIterator and diffStorageIterator Originally, in the `diffAccountIterator`, the layer’s staleness had to be checked within the Next function to ensure the iterator remained usable. Additionally, a read lock on the associated diff layer was required to first retrieve the account blob. This read lock protection is essential to prevent concurrent map read/write. Afterward, a staleness check was performed to ensure the retrieved data was not outdated. The entire logic can be simplified as follows: a loadAccount callback is provided to retrieve account data. If the corresponding state is immutable (e.g., diff layers in the path database), the staleness check can be skipped, and a single account data retrieval is sufficient. However, if the corresponding state is mutable (e.g., the disk layer in the path database), the callback can operate as follows: ```go func(hash common.Hash) ([]byte, error) { dl.lock.RLock() defer dl.lock.RUnlock() if dl.stale { return nil, errSnapshotStale } return dl.buffer.states.mustAccount(hash) } ``` The callback solution can eliminate the complexity for managing concurrency with the read lock for atomic operation.
* Adds a `BlockType` interface with a method to check if the header has a CustomWithdrawalsRoot, to be used when Isthmus fork is active. * `ChainConfig` implements the interface and is passed to NewBlock() api. * `BlockConfig` implements the interface as well and is used for invocation from tests.
…ot in block header Isthmus: re-introduce optimism withdrawals root in block header
…ory (#30868) Updates geth to use the latest uint256, and use faster memory-writer
…thereum-optimism#556) The superchain-configs.zip is still built-in and used as the default source, but callers can now supply alternate zip file data to read config from. Will be used as part of comparing the configs used by fault proof prestates.
…thereum-optimism#558) * core/txpool: Take total rollup cost into account (L1 + operator fee) * add total rollup cost unit test * check optimism config * revert upstream formatting diffs * start testing txpool accounting with rollup costs * revert TestBlockRlpEncodeDecode to use OptimismCliqueTest config * fix txpool rollup cost accounting and add test * use total tx cost in list.Filter * properly handle nil pointer rollupCostFn * tweak test to use later-+1 * replace function ptr by interface * test rollup cost parameter changes
Unlike the regular transaction cost, the rollup cost can change from block to block. So we need to cache transaction costs in the pool's lists when adding them, so we later subtract the exact same cost.
* rpc: RPC recording functions * fork.yaml: update fork.yaml with note about RPC recording functionality * rpc: improve MsgError to return JsonError to avoid interface around typed nil
…ain (ethereum-optimism#577) * sr: update to 84838da8305c55bdd28c0eea1fd4fd65c097e296 to fix Worldchain * exclude Boba * exclude files from archive for excluded chains
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK
Dockerfile
Outdated
@@ -4,7 +4,7 @@ ARG VERSION="" | |||
ARG BUILDNUM="" | |||
|
|||
# Build Geth in a stock Go builder container | |||
FROM golang:1.23.4-alpine@sha256:20c0c5ccf7c851ecde9f0664404213adabe2b47f34e5292bfbeaca203241836c as builder | |||
FROM golang:1.24-alpine AS builder |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was this an upstream change? - If possible, it would be nice to keep this pinned to a SHA256 digest (and for the other Docker images).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah good catch @joshuasing , I'll update this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
101284 +
i am shook
pull in changes up to commit
e666543dc5500428ee7c940e54263fe4968c5efd
this includes changes for "isthmus" hard fork, which adds pectra features
https://docs.optimism.io/notices/upgrade-15