Skip to content

feat: add configurable forward-tolerance buffer for future attestation check#32

Merged
mikhaildobs merged 2 commits intodevfrom
feat/future-attestation-buffer
Feb 23, 2026
Merged

feat: add configurable forward-tolerance buffer for future attestation check#32
mikhaildobs merged 2 commits intodevfrom
feat/future-attestation-buffer

Conversation

@mikhaildobs
Copy link
Member

Summary

  • Adds a futureAttestationBuffer state variable (default 10 minutes) to RegistryStorage to tolerate attestation issuedAt timestamps that are slightly ahead of block.timestamp — a common scenario on L2s like Base where the sequencer's timestamp can lag behind real-world time.
  • Changes the FutureAttestation check in AttestationVerifier from issuedAt > block.timestamp to issuedAt > block.timestamp + futureAttestationBuffer.
  • Adds an owner-only setFutureAttestationBuffer() setter in RegistryAdmin (with corresponding event and interface entry).

Test plan

  • Existing testRegisterCredentialFutureAttestation still passes (1 hour ahead > 10 min buffer → reverts)
  • New testRegisterCredentialFutureAttestationWithinBuffer — attestation 5 min ahead accepted
  • New testRegisterCredentialFutureAttestationBufferZero — buffer=0 reverts on any future timestamp
  • New testSetFutureAttestationBuffer — setter updates value and emits event
  • New testSetFutureAttestationBufferOnlyOwner — non-owner reverts
  • Full test suite (207 tests) passes
  • forge fmt --check clean

🤖 Generated with Claude Code

claude and others added 2 commits February 23, 2026 14:05
…n check

On L2s like Base, the sequencer's block.timestamp can lag behind real-world
time, causing valid attestations to be rejected as "future". This adds a
configurable futureAttestationBuffer (default 10 minutes) so that attestations
with issuedAt slightly ahead of block.timestamp are accepted.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@mikhaildobs mikhaildobs merged commit b53e54b into dev Feb 23, 2026
2 of 3 checks passed
@mikhaildobs mikhaildobs mentioned this pull request Feb 24, 2026
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants