[go: up one dir, main page]

Etherlink: use node's timestamp in simulation

What

Closes #7338 (closed)

The simulation currently use the last seen timestamp in simulation. Whereas the node can provide a sequencer.

Why

The simulation does not make sense if the contract relies on timestamp, it needs a proper value.

How

Introduces a new simulation version, that provides the timestamp. The tricky thing is to know which simulation version the kernel supports, to this purpose I have introduced a new empty storage version for the node to understand that it's supported. It's a bit weird, but works like a charm.

Manually testing the MR

Deploy a timestamp related contract and play with this!

Checklist

  • Document the interface of any function added or modified (see the coding guidelines)
  • Document any change to the user interface, including configuration parameters (see node configuration)
  • Provide automatic testing (see the testing guide).
  • For new features and bug fixes, add an item in the appropriate changelog (docs/protocols/alpha.rst for the protocol and the environment, CHANGES.rst at the root of the repository for everything else).
  • Select suitable reviewers using the Reviewers field below.
  • Select as Assignee the next person who should take action on that MR

Merge request reports

Loading