Description
Attested transfers must include a nonce and an expiry timestamp so an attestation cannot be replayed. Nonces are per-signer and monotonically consumed.
Requirements and context
- Must be secure, tested, and documented
- Should be efficient and easy to review
- Relevant code:
src/test_transfer_with_attestation.rs
- Consumed nonces persist to reject reuse
Suggested execution
- Fork the repo and create a branch
git checkout -b feat/attestation-nonce-expiry
- Implement changes
- Extend attestation struct with
nonce, expires_at
- Persist consumed set keyed by (signer, nonce)
- Reject expired or replayed attestations
- Validate security and correctness assumptions
Test and commit
- Run tests
- Cover edge cases
- Attestation used at exact expiry second
- Include test output and security notes
Example commit message
feat: add nonce and expiry to transfer attestations
Guidelines
- Minimum 95 percent test coverage
- Clear documentation
- Timeframe: 96 hours
Description
Attested transfers must include a nonce and an expiry timestamp so an attestation cannot be replayed. Nonces are per-signer and monotonically consumed.
Requirements and context
src/test_transfer_with_attestation.rsSuggested execution
git checkout -b feat/attestation-nonce-expirynonce, expires_atTest and commit
cargo test --allExample commit message
feat: add nonce and expiry to transfer attestationsGuidelines