feat: add configurable forward-tolerance buffer for future attestation check#32
Merged
mikhaildobs merged 2 commits intodevfrom Feb 23, 2026
Merged
feat: add configurable forward-tolerance buffer for future attestation check#32mikhaildobs merged 2 commits intodevfrom
mikhaildobs merged 2 commits intodevfrom
Conversation
…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>
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
futureAttestationBufferstate variable (default 10 minutes) toRegistryStorageto tolerate attestationissuedAttimestamps that are slightly ahead ofblock.timestamp— a common scenario on L2s like Base where the sequencer's timestamp can lag behind real-world time.FutureAttestationcheck inAttestationVerifierfromissuedAt > block.timestamptoissuedAt > block.timestamp + futureAttestationBuffer.setFutureAttestationBuffer()setter inRegistryAdmin(with corresponding event and interface entry).Test plan
testRegisterCredentialFutureAttestationstill passes (1 hour ahead > 10 min buffer → reverts)testRegisterCredentialFutureAttestationWithinBuffer— attestation 5 min ahead acceptedtestRegisterCredentialFutureAttestationBufferZero— buffer=0 reverts on any future timestamptestSetFutureAttestationBuffer— setter updates value and emits eventtestSetFutureAttestationBufferOnlyOwner— non-owner revertsforge fmt --checkclean🤖 Generated with Claude Code