forked from ethereum-optimism/op-geth
-
Notifications
You must be signed in to change notification settings - Fork 1
Merge upstream for op-es #36
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
We need at least one prefetch goroutine. SetLimit(0) would block prefetch. Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
Previously, PathDB used a single buffer to aggregate database writes, which needed to be flushed atomically. However, flushing large amounts of data (e.g., 256MB) caused significant overhead, often blocking the system for around 3 seconds during the flush. To mitigate this overhead and reduce performance spikes, a double-buffer mechanism is introduced. When the active buffer fills up, it is marked as frozen and a background flushing process is triggered. Meanwhile, a new buffer is allocated for incoming writes, allowing operations to continue uninterrupted. This approach reduces system blocking times and provides flexibility in adjusting buffer parameters for improved performance.
…32067) If Geth is engaged in a long-run block synchronization, such as a full syncing over a large number of blocks, invoking `debug_setHead` will cause `downloader.Cancel` to wait for all fetchers to stop first. This can be time-consuming, particularly for the block processing thread. To address this, we manually call `blockchain.StopInsert` to interrupt the blocking processing thread and allow it to exit immediately, and after that call `blockchain.ResumeInsert` to resume the block downloading process. Additionally, we add a sanity check for the input block number of `debug_setHead` to ensure its validity. --------- Signed-off-by: jsvisa <delweng@gmail.com> Co-authored-by: Gary Rong <garyrong0905@gmail.com>
Replaced the outdated and broken link to the Web3 Secret Storage Definition with the current official URL from ethereum.org in the Clef README. This ensures users have access to up-to-date and accurate documentation for the keystore file format.
Implement ethereum/go-ethereum#32078 Parse and lookup the delegation account if EIP7702 is enabled. --------- Signed-off-by: jsvisa <delweng@gmail.com>
Downloading from a range was failing because it would return and error early with an error misinterpreting "start-end". --------- Co-authored-by: shantichanal <158101918+shantichanal@users.noreply.github.com> Co-authored-by: Gary Rong <garyrong0905@gmail.com>
We believe it is safe to raise the gaslimit to 45M before the Fusaka fork. So this PR changes the default to 45M.
This pull request is part-1 for shipping the core part of archive node in PBSS mode.
This pull request ports the snapshot iteration logic from the legacy implementation.
Previously, the account trie for a given state root was resolved immediately when the stateDB was created, implying that the trie was always required by the stateDB. However, this assumption no longer holds, especially for path archive nodes, where historical states can be accessed even if the corresponding trie data does not exist.
…#32090) Noticed that the errors for the blsync flags were not formatted correctly for `Fatalf(..)`.
…e (#32091) This pull request fixes a flaw in PBSS archive mode that significantly degrades performance when the mode is enabled. Originally, in hash mode, the dirty trie cache is completely disabled when archive mode is active, in order to disable the in-memory garbage collection mechanism. However, the internal logic in path mode differs significantly, and the dirty trie node cache is essential for maintaining chain insertion performance. Therefore, the cache is now retained in path mode.
This is the part-2 for archive node over path mode, which ultimately ships the functionality to serve the historical states
This pull request fixes a flaw in the PBSS state iterator, which
could return empty account or storage data.
In PBSS, multiple in-memory diff layers and a write buffer are
maintained. These layers are persisted to the database and reloaded after
node restarts. However, since the state data is encoded using RLP, the
distinction between nil and an empty byte slice is lost during the encode/decode
process. As a result, invalid state values such as `[]byte{}` can appear in PBSS
and ultimately be returned by the state iterator.
Checkout
https://github.com/ethereum/go-ethereum/blob/master/triedb/pathdb/iterator_fast.go#L270
for more iterator details.
It's a long-term existent issue and now be activated since the snapshot
integration.
The error `err="range contains deletion"` will occur when Geth tries to
serve other
peers with SNAP protocol request.
---------
Co-authored-by: Felix Lange <fjl@twurst.com>
…nse (#32099) This pull request tracks the state indexing progress in eth_syncing RPC response, i.e. we will return non-null syncing status until indexing has finished.
replace `--override.prague` with `--override.osaka` Signed-off-by: jsvisa <delweng@gmail.com>
For no apparent reason, KV stores were getting wrapped in `nofreezedb` first and then in `freezerdb`.
core.BlockChainConfig.VmConfig is not a pointer, so setting the Tracer on the `vmConfig` object after it was passed to options does *not* apply it to options.VmConfig This fixes the issue by setting the value directly inside the `options` object and removing the confusing `vmConfig` variable to prevent further mistakes.
This is to avoid compatibility issues with mismatched glibc versions between the builder and deployment target. Fixes #32102
Fix the issue after initial snap sync with `gcmode=archive` enabled. ``` NewPayload: inserting block failed error="history indexing is out of order, last: null, requested: 1" ``` --------- Signed-off-by: Delweng <delweng@gmail.com> Co-authored-by: Gary Rong <garyrong0905@gmail.com>
The address filter was never checked against a maximum limit, which can be somewhat abusive for API nodes. This PR adds a limit similar to topics ## Description (AI generated) This pull request introduces a new validation to enforce a maximum limit on the number of addresses allowed in filter criteria for Ethereum logs. It includes updates to the `FilterAPI` and `EventSystem` logic, as well as corresponding test cases to ensure the new constraint is properly enforced. ### Core functionality changes: * **Validation for maximum addresses in filter criteria**: - Added a new constant, `maxAddresses`, set to 100, to define the maximum allowable addresses in a filter. - Introduced a new error, `errExceedMaxAddresses`, to handle cases where the number of addresses exceeds the limit. - Updated the `GetLogs` method in `FilterAPI` to validate the number of addresses against `maxAddresses`. - Modified the `UnmarshalJSON` method to return an error if the number of addresses in the input JSON exceeds `maxAddresses`. - Added similar validation to the `SubscribeLogs` method in `EventSystem`. ### Test updates: * **New test cases for address limit validation**: - Added a test in `TestUnmarshalJSONNewFilterArgs` to verify that exceeding the maximum number of addresses triggers the `errExceedMaxAddresses` error. - Updated `TestInvalidLogFilterCreation` to include a test case for an invalid filter with more than `maxAddresses` addresses. - Updated `TestInvalidGetLogsRequest` to test for invalid log requests with excessive addresses. These changes ensure that the system enforces a reasonable limit on the number of addresses in filter criteria, improving robustness and preventing potential performance issues. --------- Co-authored-by: zsfelfoldi <zsfelfoldi@gmail.com>
## Summary
This PR resolves Issue #31929 by reducing log noise generated by the log
indexer after `debug_setHead` operations.
## Problem Description
When `debug_setHead` is called to rewind the blockchain, blocks are
removed from the database. However, the log indexer's `ChainView`
objects may still hold references to these deleted blocks. When
`extendNonCanonical()` attempts to access these missing headers, it
results in:
1. **Repeated ERROR logs**: `Header not found number=X hash=0x...`
2. **Log noise** that can mask other important errors
3. **User confusion** about whether this indicates a real problem
## Root Cause Analysis
The issue occurs because:
- `debug_setHead` removes blocks from the blockchain database
- Log indexer's `ChainView` may still reference deleted block hashes
- `extendNonCanonical()` in `core/filtermaps/chain_view.go` tries to
fetch these missing headers
- The existing `return false` logic properly handles the error, but logs
at ERROR level
## Solution
This is a **logging improvement only** - no functional logic changes:
### Changes Made
1. **Log level**: Changed from `ERROR` to `DEBUG`
2. **Log message**: Enhanced with descriptive context about chain view
extension
3. **Comments**: Added explanation for when this situation occurs
4. **Behavior**: Maintains existing error handling (`return false` was
already present)
### Code Changes
```go
// Before
log.Error("Header not found", "number", number, "hash", hash)
return false
// After
// Header not found - this can happen after debug_setHead operations
// where blocks have been deleted. Return false to indicate the chain view
// is no longer valid rather than logging repeated errors.
log.Debug("Header not found during chain view extension", "number", number, "hash", hash)
return false
```
## Testing
### Automated Tests
- ✅ All existing filtermaps tests pass: `go test ./core/filtermaps -v`
- ✅ No regressions in related functionality
### Manual Verification
1. **Before fix**: Started geth in dev mode, generated blocks, called
`debug_setHead(3)` → **5 repeated ERROR logs**
2. **After fix**: Same scenario → **4 DEBUG logs, no ERROR noise**
### Test Environment
```bash
# Setup test environment
rm -rf ./dev-test-data
./build/bin/geth --dev --datadir ./dev-test-data --http --http.api debug,eth,net,web3 --verbosity 4
# Generate test blocks and trigger issue
curl -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"debug_setHead","params":["0x3"],"id":1}' http://localhost:8545
```
## Related Issues
- Fixes #31929
## Additional Context
This issue was reported as spurious error messages appearing after
`debug_setHead` operations. The investigation revealed that while the
error handling was functionally correct, the ERROR log level was
inappropriate for this expected scenario in development/debugging
workflows.
The fix maintains full compatibility while significantly improving the
debugging experience for developers using `debug_setHead`.
---------
Co-authored-by: Sun Tae, Kim <38067691+humblefirm@users.noreply.github.com>
Co-authored-by: zsfelfoldi <zsfelfoldi@gmail.com>
Sorry for not fully fixed in ethereum/go-ethereum#31761, now the log format of unindexing message is cleaned up, to make it consistent with the indexing message.
It should be `newPayloadV4 must only be called for prague payloads` for the V4 payload error
* add minBaseFee to superchain/types and Jovian to params/config * extend extraData header field * validate/encode eip1559 * spike add jovian 1559 tests * update calcBaseFee test and fix logic for calcBaseFee * update comment * validate params should be 9 not 10 * dont leave out version byte in extraData * 0 minbasefee is valid * dont need default minBaseFee * add test that fails for curr impl * do one check at the end to enforce minBaseFee * 9 bytes not 10 in validate err msg * extend coverage * nits * fix test * use feature naming and assume eip1559params 8bytes still * best effort decode * feature flag * nits * handle FCU and payload building args properly * have payload building test support holocene still * nits + fix api payload fcu * use option A of feature flag + nits * Switch from log2 to significand + exponent for min base fee * Clear out the higher 4 bits of the significand * Add encode/decode helpers for min base fee factors * Remove the check for a blank min base fee * bit manipulation change * eth/catalyst: fix ExtraData validation for Jovian min base fee; add tests * use u64 approach * feedback + add specs link * use more compact syntax * move expectation to end of struct * combine tests * rename feature flag * add new optimism-specific file with general validation and decoding functions * move optimism specific code to new file * remove validation and add comments validation is done in catalyst/api * remove feature flags altogether * remove validation from decoding fn * fix and use generic extradata validation fn * add comments * finish removing feature flag * fix tests * Apply suggestions from code review * add spec link * use inline fn to clean up diff to upstream * add test cases and factor into subtests with require statement * tidy up jovianConfig() helper and rename a test * Introduce Holocene/JovianExtraDataVersionByte * tweak * consistency * rename minbasefee to jovian in validation fn error msg * assert holocene params in payload_building_test.go * fix regression * use ptr for MinBaseFee in PayloadAttributes * eip1559_optimism: have Validate/DecodeOptimismExtraData take a ForkChecker interface and return a *uint64 for MinBaseFee * introduce EncodeOptimismExtraData * lint (whitespace only) * fix pointer comparison in assertion * add test for determinism of payload id * dereference pointer when computing ID This is not strictly necessary, but it is clearer. * use eip1559.DecodeOptimismExtraData in test and extend coverage to missing minbasefee * Update consensus/misc/eip1559/eip1559_optimism.go Co-authored-by: Sebastian Stammler <seb@oplabs.co> * use isOptimismHolocene in CalcBaseFee and document assumption about extraData validity * TestBuildPatload: use nil minBaseFee expectation preJovian * rework closure to reduce diff to upstream * remove empty line --------- Co-authored-by: William Law <williamlaw.wtl@gmail.com> Co-authored-by: Niran Babalola <niran@niran.org> Co-authored-by: Sebastian Stammler <seb@oplabs.co>
* introduce IsMinBaseFee feature toggle Allows feature to be easily removed from Jovian hardfork. When the hardfork scope is locked, this commit can be reverted. * decouple features * add isOperatorFeeFix toggle
Removed approval hold job from release process in CircleCI config.
…stream-merge/v1.16.3-rewrite all: Merge go-ethereum v1.16.3
BPO forks should also be included in eth_config response.
Timestamps taken from: - Holesky: https://github.com/eth-clients/holesky/blob/main/metadata/genesis.json - Sepolia: https://github.com/eth-clients/sepolia/blob/main/metadata/genesis.json - Hoodi: https://github.com/eth-clients/hoodi/blob/main/metadata/genesis.json
Conflicts: consensus/misc/eip4844/eip4844.go eth/backend.go miner/worker.go
This was referenced Oct 17, 2025
qzhodl
approved these changes
Oct 22, 2025
add InboxContractConfig to superchain for op-es
syntrust
approved these changes
Oct 23, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR merges
op-esbranch with latest Fusaka Readiness Release.