Address pre-audit findings F-1..F-5#14
Merged
Merged
Conversation
3 tasks
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
Closes the five pre-EIP findings from the zk-x-ray report (
zk-x-ray/x-ray.md).F-1 (Medium) -- UAE jurisdiction missing from spec
@param jurisdictionIdenumerations in interface NatSpec to include4=UAE.F-2 (Low) -- requireSignedSignals / minMultiProviderThreshold not normative
threshold_m" values per jurisdiction and binds them with MUST language.F-3 (Low) -- pattern.settlement_root binding depended on consumer discipline
SHOULD mark each consumed pattern proof->MUST mark.keccak256(abi.encode(uint8 subTradeCount, bytes32[] subProofHashes)) mod BN254_FR_MODULUSso consumers do not roll their own and drift from the prover side.F-4 (Informational) -- proof-hash binding documented only as struct encoding
proofHashstruct field comment to point at the existing normative "Proof replay prevention" subsection, which already mandateskeccak256(proof, proofType, chainId, oracleAddr).F-5 (Informational) -- compactConfigHistory gas at the 256 cap
docs/THREAT_MODEL.md's admin capability matrix, plus operational guidance to schedule it standalone rather than bundled into another tx.Out of scope
There is significant drift between this repo's
ERC-8262.mdand the upstream../ERCs/ERCS/erc-8262.mdsubmitted to ethereum/ERCs#1747. The upstream has Proof System Requirements, Circuit Conventions, Commitment Layouts, and per-circuit specifications that this repo's copy is missing; this repo's copy now has F-2/F-3 which upstream is missing. A follow-up PR will sync both files to a single source of truth.Manual testing
forge test-- 505/505 pass (spec text changes don't touch contract behaviour)forge fmt --check-- cleanpython3 scripts/eip-interface-drift.py-- clean (no interface drift introduced)