Skip to content

refactor(L2): tighten BaseTime NatSpec and tests - #449

Merged
0x00101010 merged 3 commits into
mainfrom
basetime-style
Oct 8, 2026
Merged

0x00101010 merged 3 commits into
mainfrom
basetime-style

Conversation

@0x00101010

@0x00101010 0x00101010 commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Complete IBaseTime NatSpec: correct the BaseTime_InvalidTimestampMillisPart description (above 800 or not a multiple of 200), enumerate setTimestampMillisPart reverts in execution order, add @param/@return, and document that timestampMs() combines the current seconds with the previous block's millisecond component until the block's tx[1] update executes.
  • Drop the named return from BaseTime.timestampMs.
  • Run BaseTime tests against the genesis-installed predeploy via CommonTest (adds baseTime to Setup), fuzz by default, order reverts before happy paths, pin that the depositor check precedes the value check, and drop the initial-value test already covered by L2Genesis.t.sol.

Runtime bytecode is unchanged. The node pins BaseTime's runtime code hash, so this PR is deliberately bytecode-neutral: keccak256(deployedBytecode) stays 0x9c4c8a497a69d0b8f2ba67be0bee7a1373186055978c3be6ec3068e0ec27f32a. version stays 1.0.0; only semver-lock.json's sourceCodeHash and the ABI snapshot's output name (timestampMs_ → unnamed) change. No selector, error, or storage change.

Test plan

  • just test (full suite) passes
  • forge fmt --check, just snapshots-check-no-build
  • cast keccak $(jq -r '.deployedBytecode.object' forge-artifacts/BaseTime.sol/BaseTime.json) == 0x9c4c…f32a

Companion change in base-std (read-only IBaseTime + StdPredeploys.BASE_TIME): base/base-std#238.

@cb-heimdall

cb-heimdall commented Oct 8, 2026 •

Copy link
Copy Markdown
Collaborator

✅ Heimdall Review Status

Requirement Status More Info
Reviews ✅ 1/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 0
Sum 1

@0x00101010
0x00101010 marked this pull request as ready for review October 8, 2026 22:27

@amiecorso amiecorso left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice!

@cb-heimdall

Copy link
Copy Markdown
Collaborator

Review Error for amiecorso @ 2026-10-08 22:37:17 UTC
User failed mfa authentication, either user does not exist or public email is not set on your github profile. \ see go/mfa-help

@amiecorso
amiecorso self-requested a review October 8, 2026 22:37
@0x00101010
0x00101010 merged commit 5f915b1 into main Oct 8, 2026
6 checks passed
@0x00101010
0x00101010 deleted the basetime-style branch October 8, 2026 22:38
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.

3 participants