OpenZeppelin / OpenZeppelin/compact-contracts

dev: extract a shared nonce module for the multisig presets

Open
#915 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
TypeScript
Stars
55
Forks
29
Avg merge
5d 7h
Merged PRs (30d)
25

Description

Every multisig preset declares its own signature replay counter:
NativeShieldedTokenIssuer has export ledger _counter: Counter,
ShieldedMultiSigV2 has ledger _nonce: Counter. Same pattern, same
read-into-digest-then-increment usage, two declarations.

Low priority. Duplication, not a defect.

Extract a shared utils/Nonces module the presets import instead. It must
stay a distinct counter from NativeShieldedTokenDerivedNonce's coin-nonce
counter: the two advance independently and binding them together would make
every burn consume a coin nonce.

Context: #887 carried this as a code TODO, now removed under #904.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate the NativeShieldedTokenIssuer and ShieldedMultiSigV2 preset definitions, plus the existing NativeShieldedTokenDerivedNonce coin-nonce counter. Read how _counter and _nonce are consumed, then trace the intended utils/Nonces import; done means both presets share it while the coin-nonce counter remains independent.

Written by the indexing model from the issue text.

Assessment

Domain
blockchain
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.