ethereum-optimism / ethereum-optimism/optimism

SDM: ecosystem integration - non-open source partners

Open
#21,110 2 comments 0 reactions 0 assignees Claimed by @nonsense View on GitHub
Dominant language
Go
Stars
6.5k
Forks
4k
Avg merge
2d 15h
Merged PRs (30d)
145

Description

## Context

Sequencer Defined Metering (SDM) introduces a synthetic trailing transaction of type `0x7d` (`PostExec`). It is exposed through standard Ethereum RPC rather than filtered out.

Before SDM activation, explorers, indexers, RPC libraries, tracing tools, and analytics platforms must be able to process blocks containing `0x7d` without rejecting the transaction or failing the entire block.

SDM also changes the gas-accounting surface for refunded user transactions:

- receipt `gasUsed` reflects canonical post-refund gas usage;
- `opGasRefund` exposes the gas refunded by SDM;
- tooling that needs pre-refund execution gas should use `gasUsed + opGasRefund`.

The synthetic `0x7d` transaction is protocol-generated. Users do not sign or submit it.

## Integration contract to publish

The public integration guide must document:

- transaction type: `0x7d`;
- the transaction is synthetic and always trails the user transactions;
- RPC serialization and required/omitted fields;
- `from`, `gas`, and `value` behavior;
- `input` contains the encoded `PostExecPayload`;
- affected user receipts expose `opGasRefund`;
- how to calculate pre-refund and post-refund gas usage;
- how explorers should display the transaction;
- how consumers should handle an unknown typed transaction without rejecting the containing block.

The schema is not considered frozen until the engineering-readiness checklist below is complete.

## Engineering readiness

- [ ] Publish and unhide the [SDM/`0x7d` RPC documentation](https://github.com/ethereum-optimism/optimism/blob/develop/docs/public-docs/chain-operators/guides/features/sequencer-defined-metering.mdx).
- [ ] Add an end-to-end test for `eth_getBlockByNumber(..., true)` returning the documented `0x7d` shape.
- [ ] Add an end-to-end test for `eth_getTransactionByHash`.
- [ ] Verify transaction and receipt cross-linking by block index.
- [ ] Add a backward-compatibility test using a stock `alloy_rpc_types_eth` decoder.
- [ ] Check representative viem/ethers decoders for unknown-transaction tolerance.
- [ ] Decide whether `l1Fee` and `l1GasUsed` on the `0x7d` receipt should be zero when `blobGasUsed` is zero, or document the current behavior.
- [ ] If standard decoders require signature fields, decide whether to flatten a zero signature similarly to deposit transactions.
- [ ] Produce example JSON responses and a real sample SDM block that can be shared with integration partners.

## Launch-critical outreach

### ✅ : Blockscout

- [x] Finalize the Blockscout backend changes. Starting point: https://github.com/nonsense/blockscout/pull/1
- [x] Open the corresponding Blockscout frontend change.
- [x] Share the integration contract and sample block with Blockscout.
- [x] Track review and merge status.
- [x] Verify an SDM block in a Blockscout deployment.

### Hosted explorers and developer tooling

- [ ] Contact Etherscan.
- [ ] Contact Tenderly.
- [ ] Contact OKLink.
- [ ] Contact Routescan/Superscan.
- [ ] Confirm whether each system:
- accepts blocks containing `0x7d`;
- indexes and displays the synthetic transaction;
- exposes `opGasRefund`;
- handles the adjusted `gasUsed` semantics;
- supports block and transaction tracing.

Internal communication tracker: https://github.com/ethereum-optimism/solutions/issues/769

## Secondary outreach

These are useful follow-ups but should not block closing the launch-critical portion of this issue:

- [ ] Phalcon Explorer / BlockSec
- [ ] Arkham
- [ ] Ethernal
- [ ] Otterscan, if support is still relevant

## Acceptance criteria

- [ ] A stable public `0x7d` integration guide is published.
- [ ] RPC and backward-compatibility tests enforce the documented schema.
- [ ] Example RPC responses and a sample SDM block are available.
- [ ] Blockscout backend and frontend work has been handed off upstream.
- [ ] Launch-critical hosted providers have been contacted.
- [ ] Responses, blockers, owners, and expected support dates are tracked.
- [ ] Any provider that will not support SDM before activation has a documented user impact and communication plan.
- [ ] Completion does not require every third party to merge support; it requires the contract, handoff, tracking, and explicit disposition.

## Related

- [SDM FMA](https://gist.github.com/nonsense/29013a36fbfd8b12ecd14276961402c8)
- [SDM external audit scope](https://gist.github.com/nonsense/10177901f413dd92aa71f271dc27dc58)
- [Ecosystem communication tracker](https://github.com/ethereum-optimism/solutions/issues/769)

Contributor guide

Open the contributing guide

Research direction

Start with docs/public-docs/chain-operators/guides/features/sequencer-defined-metering.mdx and the SDM RPC implementation and integration-test entry points. Review the documented 0x7d shape, receipt fields, and decoder behavior before adding the listed end-to-end and compatibility coverage. Done means the guide, example responses, sample block, tests, and provider dispositions satisfy the acceptance criteria.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
api, backend-api-design, documentation, testing-qa
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.