Skip to content

feat: add DERIVATION_VERSION_1 protocol constant#3612

Merged
patnir merged 1 commit into
l3from
rahulpatni/priv-1972-1-derivation-v1
Jun 18, 2026
Merged

feat: add DERIVATION_VERSION_1 protocol constant#3612
patnir merged 1 commit into
l3from
rahulpatni/priv-1972-1-derivation-v1

Conversation

@patnir

@patnir patnir commented Jun 18, 2026

Copy link
Copy Markdown

wire up alt-DA derivation version constant for privacy L3 dual-write:

Summary

  • Add DERIVATION_VERSION_1 (0x01) next to existing DERIVATION_VERSION_0 (0x00) in base-protocol

Context: what is derivation version?

L2 nodes derive history by reading batcher txs on L1. Each batch-related L1 tx starts with a 1-byte tag so the node knows how to interpret the rest of the calldata:

Byte Constant Meaning
0x00 DERIVATION_VERSION_0 Inline data. Payload is the batch (compressed frames). Nodes parse it directly. This is today's calldata path.
0x01 DERIVATION_VERSION_1 Alt-DA pointer. Payload is a 34-byte commitment, not batch data. Nodes fetch the real bytes (0x00 ++ frames) from the DA server (S3).

Dual-write (PRIV-1972) posts both per batch: a v0 calldata tx (primary, nodes use today) and a v1 commitment tx (shadow, points to the same bytes in S3). This PR only names the v1 byte; the batcher and derivation resolver wire it up in follow-on PRs.

Test plan

  • cargo check -p base-protocol

type=routine
risk=low
impact=sev5

Alt-DA commitment batcher txs prefix calldata with version byte 0x01 per OP Stack alt-DA.
@linear

linear Bot commented Jun 18, 2026

Copy link
Copy Markdown

PRIV-1972

@github-actions

Copy link
Copy Markdown
Contributor

❌ base-std fork tests did not run

The build or setup step failed before any tests could execute. Check the workflow logs for details.

@robriks robriks left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM !

@patnir patnir merged commit 7f14611 into l3 Jun 18, 2026
19 of 21 checks passed
@patnir patnir deleted the rahulpatni/priv-1972-1-derivation-v1 branch June 18, 2026 06:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants