op-core,op-node: move the PostExec payload decoder, share the per-tx batch checks - #22101
Draft
nonsense wants to merge 2 commits into
Draft
op-core,op-node: move the PostExec payload decoder, share the per-tx batch checks#22101nonsense wants to merge 2 commits into
nonsense wants to merge 2 commits into
Conversation
nonsense
marked this pull request as ready for review
July 29, 2026 15:20
einar-oplabs
self-requested a review
July 30, 2026 05:28
einar-oplabs
approved these changes
Jul 30, 2026
nonsense
marked this pull request as draft
July 30, 2026 18:11
The PostExec (0x7D) payload is a consensus wire format, but its only Go definition lived in op-chain-ops/pkg/sdm, a chain-ops tooling package, while the envelope carrying it (PostExecTx, PostExecTxType) lives in op-core/types. Move PostExecPayload, SDMGasEntry, PostExecPayloadVersion and the decoder next to the envelope and point the consumers at them, so the format lives in the package that owns it rather than in the tooling that happened to need it first. This is a move, not a de-duplication: one Go definition before, one after. What is new is coverage. The decoder's strict framing (a single RLP value, no trailing bytes, no short list) and its version check are now pinned by tests, matching what op-alloy's PostExecPayload rejects at decode time. No behaviour change. The decoder body is unchanged, and its consumers (op-acceptance-tests, cmd/sdm-devnet) only read payload fields. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
checkSingularBatch delegated to checkSequencerTxData; checkSpanBatch carried its own inline copy of the same rules. The copy had drifted: it never rejected PostExec (0x7D) transactions before SDM activation, which checkSequencerTxData has done since the type was introduced. It also shadowed the span's block index with the transaction index inside the loop. Extract checkSequencerTxs so both paths iterate a single implementation and drop the inline copy. The span path now applies the PostExec activation gate too, so the two batch types agree on which transaction types a sequencer may embed. That behaviour change is unreachable in production, and it closes a divergence rather than adding a rule. checkSpanBatch only runs pre-Holocene -- post-Holocene BatchStage validates each span block through checkSingularBatch -- and SDM activates at Lagoon, four forks after Holocene, so isSDM is always false here. DeriveSpanBatch already rejects pre-SDM PostExec transactions when the span batch is decoded. Adds span-batch coverage for both activation-gated types. The pre-SDM PostExec row fails without this change. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
nonsense
force-pushed
the
ae/sdm/fm6-derivation-postexec-gate
branch
from
July 30, 2026 18:27
d072ef9 to
d23e8a7
Compare
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
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.
Summary
PostExecpayload types and decoder fromop-chain-ops/pkg/sdmtoop-core/types, alongside the transaction envelope. Update consumers and add strict decoding tests. No behavior change.Tests