Skip to content

Conversation

@fmoletta
Copy link
Contributor

@fmoletta fmoletta commented Aug 2, 2024

Motivation

Fetch cancun time from DB when validating payload v3 timestamp

Description

  • Store cancun_time in db
  • Use the stored cancun_time when validating payload timestamp in eth_newPayloadV3
  • Replace update methods for chain data in Store with set_chain_config

Bonus:

  • Move NewPayloadV3Request to its corresponding module and update is parsing to match the rest of the codebase

Closes None, but is part of #51

@fmoletta fmoletta marked this pull request as ready for review August 2, 2024 16:32
@fmoletta fmoletta requested a review from a team as a code owner August 2, 2024 16:32

// Store chain info
if let Some(cancun_time) = genesis.config.cancun_time {
self.update_cancun_time(cancun_time)?;
Copy link
Collaborator

Choose a reason for hiding this comment

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

these values are set once. Wouldn't it make more sense to have a function like set_chain_spec that sets these values the first time? All these values shouldn't be updatable.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sure

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated!

@fmoletta fmoletta added this pull request to the merge queue Aug 6, 2024
Merged via the queue into main with commit cb72a3f Aug 6, 2024
@fmoletta fmoletta deleted the store-cancun-time branch August 6, 2024 14:11
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