Skip to content

Update Proof of absence for 2 or more missing stems and serialize DepthExtensionPresent accordingly to match implementation in rust-verkle#6

Draft
eclairss17 wants to merge 2 commits into
masterfrom
PoA-for-2-or-more-missing-stems
Draft

Update Proof of absence for 2 or more missing stems and serialize DepthExtensionPresent accordingly to match implementation in rust-verkle#6
eclairss17 wants to merge 2 commits into
masterfrom
PoA-for-2-or-more-missing-stems

Conversation

@eclairss17

Copy link
Copy Markdown
Owner

Summary

go-verkle was sending only 1 OtherStem in the wire format regardless of how many missing stems shared the same PoA stem. Compact, but this made the proof unverifiable by rust-verkle, which expects one OtherStem entry per missing stem to know which PoA stem proves absence for which missing key.

go-verkle now sends N OtherStems (one per missing stem) in the wire format, matching the rust-verkle expectation.

Metric Before Change After Code Change Delta
Internal PoaStems 1 (31 bytes) 1 (31 bytes) 0
Wire OtherStems 1 (31 bytes) 8 (248 bytes) +217 bytes
Commitments 1 (32 bytes) 1 (32 bytes) 0
IPA proof 576 bytes 576 bytes 0
Total proof size 647 bytes 864 bytes +33.5%

Discussion

  1. The code change is a correctness fix, not a size optimization.
    Before the change, go-verkle was silently dropping OtherStems from the wire format when multiple missing stems shared the same PoA stem. In order to use rust-verkle, if it would receive a proof it cannot correctly map back to the queried keys.

  2. The internal representation was already correct and deduplicated in both versions.
    proof.PoaStems is always 1 for N missing stems sharing the same PoA. This is unchanged. The optimization lives here, only one proof-of-absence path is computed cryptographically regardless of how many missing keys reference it.

  3. The wire format now increases with the number of missing stems.
    The OtherStems list grows linearly: N missing stems → N wire entries × 31 bytes each. The cryptographic proof (commitments, IPA) does not grow, those stay constant.

  4. The actual tradeoff is correctness vs. wire size.
    Verified cross-implementation proofs cost 31 bytes per additional missing stem that shares a PoA. For the mainnet 8-slot scenario, that is 217 extra bytes (33.5% total proof overhead) to gain rust-verkle compatibility.

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.

Update go-verkle serialize proof to match rust-verkle's implementation where each proof of absence contains multiple missing stem.

1 participant