Expand description
The anti-rollback time floor.
No time reported by a Roughtime server (or the OS clock) is trusted below this floor: a
machine cannot legitimately observe a time earlier than when this crate was built, and
HARDCODED_FLOOR_SECS is a belt-and-suspenders lower bound baked directly into source.
By default (the build-time-floor feature disabled) the effective floor is simply
HARDCODED_FLOOR_SECS — a static value with no dependency on the build machine’s clock,
keeping builds reproducible. Enabling build-time-floor additionally ratchets the floor
forward to the start (UTC) of the day the crate was built, at the cost of build
reproducibility — see build.rs for the mechanism and the crate-level docs for guidance on
which mode to pick.
Constants§
- EFFECTIVE_
FLOOR_ SECS - The effective anti-rollback floor: the later of
HARDCODED_FLOOR_SECSand the build-time floor (which is0— a no-op — unless the crate was built with thebuild-time-floorfeature enabled). - HARDCODED_
FLOOR_ SECS - The absolute, hardcoded anti-rollback floor: July 1, 2026 00:00:00 UTC, in Unix seconds.
Functions§
- check_
floor - Rejects a candidate Unix timestamp (in seconds) that predates
EFFECTIVE_FLOOR_SECS.