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.
Member
Author
|
Stacked E2E integration:
The full mocked-enclave Anvil flow passes. Actual SGX timing remains the hardware gate because the development host has no SGX device or active AESM. |
The all-zero selector is how `one_hot` encodes an out-of-range index, so it is satisfiable for an in-range index too. A prover supplying it suppresses a byte or nibble read, which then returns zero and satisfies any equality against it. Range-constraining the index does not help: the suppressed read is at an in-range index. Add `one_hot_in_range` and `nibble_at_with`, which keep the definitional constraints ungated and add a gated assertion that a hit occurred. Gate the reads whose zero would otherwise satisfy something: branch child selection, the traversal nibbles, the hex-prefix flag byte, both sides of the path match, and the constructed leaf path. Speculative reads still pass a false active. Also bound `receipt_len` by the receipt buffer in the leaf gadget and `key_len` by the key buffer in the traversal, so neither depends on a sibling module for the extent it hashes, and pin `asset_kind` to ERC-20 in the relation rather than resting on address(0) being unable to emit logs. Costs 1,456 constraints: 8,095,727 to 8,097,183 direct, 4,034,927 to 4,036,383 batched.
The batched circuit is the one that would ship but only ran two mutation cases, so a deferral that dropped a binding rather than only its cost would not have been caught. Run the direct circuit's mutations through it as well. A one-permutation batch is a distinct path: log_instances is zero, the first sumcheck runs zero rounds, and the output claim reduces to a linear combination of the claimed output words. Since padded is a power of two, any caller doing a single permutation reaches it. Cover both directions. Extend the second-event rejection to Erc20FixedLayout, which is the variant the relation wires; only Erc20SingleLog was covered. Record the open security items in RESULTS.md: the receipt-identity gap is carried by an out-of-circuit nomad invariant, and the Poseidon-derived output challenge and absent transcript domain separation still need cryptographic sign-off. Update the constraint counts for b5192b4.
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.
Summary
Current measurement
On an Intel Core i9-14900HX with 16 Rayon threads:
This is a single host sample, not an SGX measurement or latency distribution.
Validation
Before merge
Stacked E2E escrow and Nomad draft PRs will be linked here.