Skip to content

docs: document mini-block sequencer signatures#54

Merged
Troublor merged 4 commits into
mainfrom
william/doc/mini-block-signatures
Jun 11, 2026
Merged

docs: document mini-block sequencer signatures#54
Troublor merged 4 commits into
mainfrom
william/doc/mini-block-signatures

Conversation

@Troublor

@Troublor Troublor commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator

Summary

Documents mini-block sequencer signatures, which back the preconfirmation guarantee the docs previously asserted without explanation:

  • docs/mini-block.md: new "Sequencer Signatures" section — the sequencer signs every mini-block header (keccak256(rlp(header)), raw secp256k1 ECDSA, no EIP-191 prefix, ecrecover-compatible), the key is registered and rotatable on-chain via the SequencerRegistry system contract (0x6342...0006, since Rex5). Includes the 8-field RLP layout table and a "Verifying a Mini-Block Signature" guide with a TypeScript (viem) example, plus rotation guidance (sequencerAt vs currentSequencer) and a finality caveat. Also fixes the stale "no Merkle roots" header description (mini-block headers carry transaction/receipt roots).
  • docs/dev/read/rpc/eth_subscribe.md: adds the three miniBlocks payload fields the node serializes but the table omitted: transaction_root, receipt_root, signature (r/s/yParity object).
  • docs/dev/read/realtime-api.md and docs/dev/faq.md: one-line tie-ins linking the preconfirmation claims to the new section.

Test plan

  • TypeScript example validated end-to-end against live endpoints: captured miniBlocks payloads on Mainnet and Testnet, recomputed the header hash, recovered the signer, and matched SequencerRegistry.currentSequencer() / sequencerAt(blockNumber) on both networks.
  • Facts cross-checked against mega-reth origin/develop (crates/megaeth/realtime/src/mini_block/mini_block.rs, crates/megaeth/utils/src/crypto.rs, crates/megaeth/rpc/src/pubsub.rs) and the SequencerRegistry spec in mega-evm.
  • prettier run on all touched files.

This PR was generated by an automated agent.

@Troublor Troublor added the agent label Jun 11, 2026
Comment thread docs/mini-block.md Outdated
Comment thread docs/mini-block.md Outdated
Comment thread docs/mini-block.md Outdated
@github-actions

Copy link
Copy Markdown
Contributor

Good PR overall — the new section is accurate, well-structured, and the code examples are clearly validated against live endpoints. Two convention issues to fix before merging:

  1. Heading case (×2): ## Sequencer Signatures and ### Verifying a Mini-Block Signature should be sentence case per the docs-wide rule. See inline comments.
  2. Terminology (×7): on-chain / off-chain should be onchain / offchain throughout — this is explicitly listed in the terminology table in docs/AGENTS.md. Flagged on the first occurrence with a full list of lines.

Comment thread docs/dev/read/realtime-api.md Outdated
Comment thread docs/dev/read/rpc/eth_subscribe.md Outdated
@github-actions

Copy link
Copy Markdown
Contributor

Review

Previous threads: All three prior comments (heading sentence case ×2, on-chainonchain ×7) have been addressed in the latest push. (Thread resolution isn't available to this integration, but they can be resolved manually.)

New content looks good overall: the Sequencer Signatures section is accurate, well-structured, and follows the narrative tone expected of a top-level page. The RLP field table, TypeScript/Solidity examples, and sequencerAt vs currentSequencer guidance are all solid.

One remaining issue: link text in two files uses Sequencer Signatures (title case) while the target heading is ## Sequencer signatures (sentence case). Inline suggestions posted.

@github-actions

Copy link
Copy Markdown
Contributor

All five previous threads are addressed in the latest push:

  • Both heading-case threads (## Sequencer signatures, ### Verifying a mini-block signature) — sentence case ✓
  • The on-chainonchain thread — verified clean across the full file (no remaining hyphenated instances) ✓
  • Both link-text case threads in realtime-api.md and eth_subscribe.md

(Unable to resolve threads programmatically due to token permissions — please resolve manually.)

The new content looks correct:

  • RLP field order and types match the spec reference.
  • TypeScript int() helper correctly handles the zero-as-empty-bytestring RLP edge case.
  • Solidity ecrecover uses yParity + 27 correctly; signer != address(0) guard is present.
  • sequencerAt(blockNumber) used for historical verification, currentSequencer() for live — guidance is accurate.
  • All GitBook blocks ({% hint %}, {% tabs %}) are properly closed.
  • Frontmatter, relative links, and SUMMARY.md are unaffected (no new pages added).

LGTM.

@github-actions

Copy link
Copy Markdown
Contributor

All five prior review threads have been addressed:

  • Heading case fixed: ## Sequencer signatures, ### Verifying a mini-block signature
  • All on-chain / off-chain instances replaced with onchain / offchain throughout
  • Link text casing in realtime-api.md and eth_subscribe.md corrected to sentence case

The new content looks good:

  • Technical accuracy: the 8-field RLP layout, signing algorithm (keccak256(rlp(header)), raw secp256k1, no EIP-191), and sequencerAt vs currentSequencer guidance all match what was cross-checked against the source.
  • TypeScript example is sound — the int() helper correctly produces minimal big-endian byte strings for RLP (zero → empty bytes 0x80), hash fields are passed through directly, and recoverAddress applies no EIP-191 prefix.
  • Pre-Rex5 caveat is handled with a hint block adjacent to the code, not buried in a footnote.
  • Header-size table fix ("no state root" instead of "no Merkle roots") is accurate.
  • Relative link paths are correct from all four changed files.

LGTM.

@Troublor Troublor merged commit 826aae1 into main Jun 11, 2026
5 checks passed
@Troublor Troublor deleted the william/doc/mini-block-signatures branch June 11, 2026 03:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant