Skip to content

feat: TempoHeader::timestamp_millis_part#455

Merged
klkvr merged 10 commits intomainfrom
klkvr/millis-part
Oct 15, 2025
Merged

feat: TempoHeader::timestamp_millis_part#455
klkvr merged 10 commits intomainfrom
klkvr/millis-part

Conversation

@klkvr
Copy link
Copy Markdown
Member

@klkvr klkvr commented Oct 13, 2025

Adds timestamp_millis_part field to TempoHeader defining milliseconds portion of the timestamp.

For now it is not propagated to EVM as this would require some more upstream changes alike to alloy-rs/evm#193

// reth vs the consensus engine.
let mut timestamp = context.current().epoch().as_secs();
if timestamp <= parent.timestamp() {
timestamp = parent.timestamp().saturating_add(1);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is now entirely removed - will that be a problem since now timestamp = parent.timestamp in some cases? You mentioned on slack that nothing is yet being done with the millisecond part. So I wonder if this would kill payload builds?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

It should be fine, we've relaxed the check in #139

Copy link
Copy Markdown
Contributor

@SuperFluffy SuperFluffy left a comment

Choose a reason for hiding this comment

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

Approval for the consensus bits.

impl TempoHeader {
/// Returns the timestamp in milliseconds.
pub fn timestamp_millis(&self) -> u64 {
self.inner.timestamp() * 1000 + self.timestamp_millis_part
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should this be saturating ops?

And provide unit tests?

@klkvr klkvr merged commit b570e66 into main Oct 15, 2025
10 checks passed
@klkvr klkvr deleted the klkvr/millis-part branch October 15, 2025 18:23
unbalancedparentheses pushed a commit to unbalancedparentheses/tempo that referenced this pull request Feb 23, 2026
Adds `timestamp_millis_part` field to `TempoHeader` defining
milliseconds portion of the timestamp.

For now it is not propagated to EVM as this would require some more
upstream changes alike to alloy-rs/evm#193
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