Repository navigation
EIP-8369 Profile 2 on current master, with a claim replay payer fix - #16470
AnkushinDaniil wants to merge 4 commits into
Conversation
|
Claude finished @AnkushinDaniil's task in 2m 2s —— View job Review complete
No Critical, High or Medium findings, so I'd call this mergeable. I did not build the PR or run its tests. The full review is in this comment.
|
Review summary: EIP-8369 Profile 2 on master (#16470)Scope: Most of this diff is #13590 merged onto master, and that content was reviewed there. Here I looked hardest at what is new in this PR: the claim replay payer fix, Payer bound fix (
|
|
Claude finished @AnkushinDaniil's task in 1m 25s —— View job Review of PR #16470
Scope: #13590 was already reviewed, so I didn't re-review the merged diff (121 files, +4978/−3135). This review covers the three changes this PR adds on top of it. There were no earlier inline comments on this PR. Claim replay payer bound (
|
Stateless guest cost
Variable cost by bucket, summed over shared blocks (excludes BASE)
Compared against |
EVM Opcode Benchmark DiffAggregated runs: base=3, pr=3 Regressions (1)
|
|
@claude review |
|
Claude finished @AnkushinDaniil's task in 1m 8s —— View job Review of PR #16470: the three new commits
Scope: the earlier reviews covered the merged diff and Result: one Medium finding, so not mergeable yet. Most of the work is in place: the three commits correctly address benaadams' points for
|
| Severity | Count |
|---|---|
| Critical | 0 |
| High | 0 |
| Medium | 1 |
| Low | 0 |
I did not build the PR or run its tests in this job.
🤖 AI agent (Claude Code / Opus 5.5) review
| blockToProduce.Transactions = inclusionList; | ||
| } | ||
| } | ||
| blockToProduce.InclusionListCandidates = inclusionListTxSource?.GetProfile2Candidates(payloadAttributes, _blocksConfig.FocilProfile2MaxVerifyGas); |
There was a problem hiding this comment.
Medium: after 56c481f, newPayload judges with Eip8369Constants.MaxVerifyGasPerTx, but block production still uses the local FocilProfile2MaxVerifyGas. It is used here for the claimable set, and in InclusionListTxSource.GetTransactions (_maxVerifyGasPerTx, line 48) to filter which frame txs are offered at all.
If an operator sets a different cap, this node builds blocks that its own and other validators judge as not satisfying the inclusion lists:
- Local cap < fork cap: a frame tx whose VERIFY cost falls between the two caps is filtered out of the offered txs and never claimed. Validators count it as a candidate, so the unclaimed omission condemns the block.
- Local cap > fork cap, or
0: the per-IL budget fill admits costlier entries first, which can use up budget the fork's fill gives to a later entry. That entry is then filtered out and omitted without a claim.
The new config description ("It does not affect block validity … this node lists when building an inclusion list") only holds for GetInclusionListTransactionsHandler. Pass Eip8369Constants.MaxVerifyGasPerTx here and in InclusionListTxSource, and keep the config only for IL building. The remark on Eip8369Constants calling the config "the operator-facing mirror" is now stale too. A regression test could build a block with FocilProfile2MaxVerifyGas below a candidate's VERIFY cost and assert that newPayload still reports the lists as satisfied.
🤖 AI agent (Claude Code / Opus 5.5) review
Co-authored-by: Marc Harvey-Hill <10379486+Marchhill@users.noreply.github.com> Co-authored-by: Stavros Vlachakis <89769224+svlachakis@users.noreply.github.com> Co-authored-by: Manuel Arto <43347768+manusw7@users.noreply.github.com> Co-authored-by: Alexey Osipov <me@flcl.me> Co-authored-by: Ruben Buniatyan <rubo@users.noreply.github.com>
e151a2e to
d2c4569
Compare
svlachakis
left a comment
There was a problem hiding this comment.
I checked the new gas-dimension guard and the retry path for missing replay state. The remaining cap mismatch also affects locally built blocks. A lower configured cap can remove a candidate from both transaction selection and the omission-claim set. Use the fork cap for both payload build paths and keep the config for building inclusion lists. Existing thread
…_PER_TX in block production
|
@claude review |
|
Claude finished @AnkushinDaniil's task in 50s —— View job Review of PR #16470: new commit
|
| Severity | Count |
|---|---|
| Critical | 0 |
| High | 0 |
| Medium | 0 |
| Low | 2 |
I did not build the PR or run its tests in this job.
🤖 AI agent (Claude Code / Opus 5.5) review
|
|
||
| /// <summary>The build's Profile 2 candidates that some committee position's VERIFY budget fill admits, so the | ||
| /// build answers each it fails to append with an omission claim; <c>null</c> when there are none.</summary> | ||
| IReadOnlySet<Hash256AsKey>? GetProfile2Candidates(PayloadAttributes? payloadAttributes, ulong maxVerifyGasPerTx); |
There was a problem hiding this comment.
Low: after 82cb885, both production callers (PostMergeBlockProducer.cs:58 and InclusionListTxSource.GetTransactions) pass Eip8369Constants.MaxVerifyGasPerTx, and only the test wrapper in EngineModuleTests.V7.cs:1160 forwards the parameter. So maxVerifyGasPerTx is now always the fork constant. The cap-keyed cache check (cached.MaxVerifyGasPerTx == maxVerifyGasPerTx, InclusionListTxSource.cs:62) and the tuple field exist only to support it.
This interface method is added in this PR, so dropping the parameter costs no compatibility. It would also make it impossible for a future caller to build with the local cap again, which is the bug fixed here. AGENTS.md says: "If a change makes existing code unused, remove it."
🤖 AI agent (Claude Code / Opus 5.5) review
| Assert.That(newPayload.Data.Status, Is.EqualTo(PayloadStatus.Valid), newPayload.Result.Error); | ||
| } | ||
|
|
||
| /// <summary>Claims change the verdict, so the same block and lists under other claims are another check.</summary> |
There was a problem hiding this comment.
Low (nit): this <summary> belongs to NewPayloadV6_does_not_reuse_a_verdict_checked_under_other_claims, a few tests below. It ended up above ..._classifies_candidates_by_the_forks_verify_gas_cap_... when that test was inserted. Move it down, or drop it.
🤖 AI agent (Claude Code / Opus 5.5) review
| if (transaction.SenderAddress is not { } sender) return false; | ||
| if (!IsNonceValid(state, transaction, sender)) return false; | ||
|
|
||
| FrameTxValidationTracer tracer = new(sender, Eip8141Constants.ExpiryVerifierAddress, state, spec, |
There was a problem hiding this comment.
Profile 2 replay inherits the public-mempool HasMutableCode check, so EXTCODEHASH on an undelegated contract containing SETCODEFROM can wrongly excuse an omission. Disable the bytecode-presence check for replay while keeping the restriction on executing SETCODEFROM.
There was a problem hiding this comment.
good catch, replay now skips the bytecode scan and only bans actually running SETCODEFROM, added a test for EXTCODEHASH on such a contract (520f3c7)
…rget's code holds it The public-mempool HasMutableCode check refuses any target whose bytecode contains SETCODEFROM, because a mempool must not admit a tx whose validity another tx can flip. EIP-8369 replay judges one fixed state, so that check let EXTCODEHASH on an undelegated contract holding SETCODEFROM wrongly excuse an omission. Replay now skips the bytecode-presence check and still refuses executing SETCODEFROM in the prefix.
…and move a misplaced test summary Every caller passed the fork cap, so the candidate fill always runs under MAX_VERIFY_GAS_PER_TX.
svlachakis
left a comment
There was a problem hiding this comment.
The local block builder now uses the fork cap for transaction selection and omission claims. The new replay tests distinguish code containing SETCODEFROM from a frame that executes it. The CI change guard still needs an independent workflow code-owner approval for this head. CI
#13590 merged with current master, plus fixes so it builds and passes tests there. Opened separately so #13590 stays as is.
On top of the merge:
Payer_is_bounded_by_the_escrow_at_the_blocks_base_fee.InclusionCheckIdported to the RlpWriter.EngineModuleTests.Eip8369: emptyNonceKeysselect the account nonce, 8 tests were failing.Merge.Plugin.Test passes. Tried it on a local devnet with Lodestar.