Summary
agglayer_interop_types::aggchain_proof::Proof should carry SP1 proof public_values in addition to proof bytes, verifying key, and version.
Agglayer is moving toward proto::Proof as the canonical persisted proof envelope. That envelope already includes a public_values field, but the current typed proof model in interop has nowhere to store it. As a result, conversions that go through the typed proof boundary can silently drop SP1 public_values on a store/load roundtrip.
Why It Matters
Agglayer runtime code uses SP1 proof public_values after loading persisted proofs. For example:
agglayer-rpc derives settled_pp_root from sp1_proof.public_values
- settlement / notifier code deserializes proof output from
proof.public_values
If the canonical storage representation preserves public_values but the typed interop proof does not, then:
- a proof can be persisted through the canonical envelope
- converted into the interop typed proof
- converted back later
- and lose its
public_values
That makes the proof conversion boundary lossy and can break consumers that expect SP1 proof outputs to remain available after reload.
Current Gap
Today the typed aggchain proof model carries aggchain-level public_values in higher-level structures, but the lower-level typed proof (agglayer_interop_types::aggchain_proof::Proof) does not appear to carry proof-level SP1 public_values.
Proposed Change
Extend the interop typed proof model so an SP1 proof includes its public_values as first-class data, alongside:
- proof bytes
- verifying key
- version
This should be reflected in:
- the typed proof structure(s)
- conversions to/from any canonical wire or storage envelopes
- regression tests that prove SP1 proof
public_values survive roundtrips
Acceptance Criteria
agglayer_interop_types::aggchain_proof::Proof can represent SP1 public_values
- roundtrip conversions preserve
public_values without loss
- tests cover store/load or wire roundtrips with non-empty SP1
public_values
- downstream consumers can rely on reloaded SP1 proofs exposing the same
public_values they had before persistence
Related Context
This was identified while reviewing Agglayer storage proof conversion, where proto::Proof already includes public_values and is intended to become the base proof representation.
Summary
agglayer_interop_types::aggchain_proof::Proofshould carry SP1 proofpublic_valuesin addition to proof bytes, verifying key, and version.Agglayer is moving toward
proto::Proofas the canonical persisted proof envelope. That envelope already includes apublic_valuesfield, but the current typed proof model in interop has nowhere to store it. As a result, conversions that go through the typed proof boundary can silently drop SP1public_valueson a store/load roundtrip.Why It Matters
Agglayer runtime code uses SP1 proof
public_valuesafter loading persisted proofs. For example:agglayer-rpcderivessettled_pp_rootfromsp1_proof.public_valuesproof.public_valuesIf the canonical storage representation preserves
public_valuesbut the typed interop proof does not, then:public_valuesThat makes the proof conversion boundary lossy and can break consumers that expect SP1 proof outputs to remain available after reload.
Current Gap
Today the typed aggchain proof model carries aggchain-level
public_valuesin higher-level structures, but the lower-level typed proof (agglayer_interop_types::aggchain_proof::Proof) does not appear to carry proof-level SP1public_values.Proposed Change
Extend the interop typed proof model so an SP1 proof includes its
public_valuesas first-class data, alongside:This should be reflected in:
public_valuessurvive roundtripsAcceptance Criteria
agglayer_interop_types::aggchain_proof::Proofcan represent SP1public_valuespublic_valueswithout losspublic_valuespublic_valuesthey had before persistenceRelated Context
This was identified while reviewing Agglayer storage proof conversion, where
proto::Proofalready includespublic_valuesand is intended to become the base proof representation.