Repository navigation
Conversation
A node must not derive its own key: circuit_specific_setup leaves one party able to forge any statement, which spec 18.2's multiparty Phase 2 exists to prevent. load_proving_key reads a ceremony's output instead, kept as a separate function so the unsound path cannot be reached by omitting an argument, and validating point encodings once at load rather than trusting them per proof. verifying_key_constants derives the flat field elements the generated Solidity verifier compiles in. A node holds only the proving half but the escrow embeds the verifying half, so this lets it confirm the two came from the same setup before proving rather than discovering the mismatch as a rejected proof after fronting a transfer. A test pins the derivation against contracts/Verifier.sol. Tests share one key: setup is ~8.7 GiB, and four of them in parallel exhausted memory before reaching an assertion.
The statement carried a 180-block lease and a witness 100 blocks after bonding. EscrowBase sets executionDeadline = block.number + 25, so no caller that bonded through the contract could ever hold that state: the proof was only spendable by forging bond storage directly. Narrows the lease to 25 blocks and moves the witness inside it, so a fund/bond/collect chain reproduces the statement. The header's encoded number moves with it, since the relation binds the two. Regenerates proof.json and calldata.txt. Verifier.sol is unchanged: the constraint system did not move, only the witness.
The statement committed to 0x22..22, which no deployment produces. A consumer could only get the contract there by relocating it after construction, and that breaks bond(): the escrow caches its EIP-712 domain separator over address(this) at construction, so a moved copy rejects every signature written against its new address. Uses the address a CREATE from 0x01..01 at nonce 0 yields, so the escrow can be deployed where the proof expects it and the whole fund/bond/ collect chain runs. The intent commitment moves with it, since spec 8.3 binds the escrow.
load_proving_key had no inverse, so a caller that generated a key could not persist it. save_proving_key mirrors it, sharing the compressed flag the two must agree on, and serialize_verifying_key exposes the canonical bytes that identify a setup: hashing them gives a caller a fingerprint to check an untrusted proving key against without reproducing the setup. The key types are aliased so a consumer can name what Keys holds without depending on the arkworks crates directly.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Prepares the circuit for use from the enclave, and records the step-2 relation as complete.
What changed
mirage_proveris a library, not just binaries.setup,prove,check_bounds, andload_proving_keyfor reading a ceremony's output.provetakes an RNG rather than seeding internally, since reusing proof randomness across settlements would defeat zero-knowledge;prove_seededkeeps exported artifacts byte-reproducible.mirage_fixtures::chainpromotes the JSON-RPC header/receipt encoders out of the collector binary, withinclusion_proofrebuilding the receipt trie. One implementation of consensus encoding rather than two.ureqtransport move behind features;rustls/ringdo not build for Fortanix EDP. Verified: the whole stack compiles forx86_64-fortanix-unknown-sgx.verifying_key_constantsderives the flat field elements the generated verifier compiles in, pinned by a test againstcontracts/Verifier.sol.Fixed along the way
crates/relation/tests/mainnet.rshardcodedwitness_block_hash: [0x66; 32], which the header-binding constraints added inead0999can never satisfy. All 100 mainnet fixtures were failing at one constraint. Now derived from the header each fixture carries — 100/100 pass.Measured
Note EDP is not a blocker for arkworks.
FINDINGS.mdrecorded that as an incompatibility; that judgment was about gnark (Go), and was never tested for arkworks. It builds, rayon included.Not done
The multiparty Phase 2 ceremony (spec 18.2).
setupremainscircuit_specific_setup, a toy.