Repository navigation
Conversation
…, weak salt Freeze commitment preimage fields, types, encoding, chain/release/contract/round domains, and salt requirements for VerificationCommitReveal (PREWAVE-SC-085). Changes: - Add RELEASE_VERSION constant for cross-release replay protection - Add deadline field to commitment preimage for temporal binding - Update COMMITMENT_TYPEHASH to include releaseVersion and deadline (10 dimensions) - Add deadline validation (MIN_DEADLINE_BUFFER, MAX_DEADLINE_HORIZON) - Add weak salt detection (all-identical bytes, last-byte-only, small integers) - Store deadline in Record; reveal must resubmit matching deadline - All encodings use abi.encode (never abi.encodePacked) - New errors: WeakSalt, DeadlinePassed, DeadlineTooShort, DeadlineTooFar Tests added: - Cross-chain replay (chainId=10 vs 1) - Cross-release replay (canonical vs alt release version) - Cross-contract replay (same hash on different contract instance) - Cross-round replay (reveal on wrong round) - Field reordering (swapped fields produce different hash) - Packed encoding ambiguity demonstration - Zero salt (existing), weak salt (all-identical, last-byte-only, small-int) - Wrong voter (existing) - Deadline validation (past, too soon, too far, min buffer, max horizon) - Fuzz: any changed field fails and leaves state intact - Fuzz: weak salt is rejected Infrastructure fixes for build: - config/networks.ts (missing module required by hardhat.config.ts) - remappings.txt (point to node_modules instead of empty lib/ submodules) - V2OperationIds.sol, V2SubmoduleProvenance.sol (missing stubs for compilation) Closes DigiNodes#724
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Freeze commitment preimage fields, types, encoding, chain/release/contract/round domains, and salt requirements for VerificationCommitReveal (PREWAVE-SC-085).
Changes
Contract (contracts/v2/VerificationCommitReveal.sol)
eveal(),
evealWithSignature(), _reveal(), and computeCommitment() — stored in Record and must match at reveal
Tests ( est/v2/VerificationCommitReveal.t.sol)
Infrastructure (build fixes)
emappings.txt — point to node_modules instead of empty lib/ submodules
Acceptance Criteria
Security & Architecture Constraints
Dependencies
Non-Goals
Closes #719