sui icon indicating copy to clipboard operation
sui copied to clipboard

[3/x][checkpoint] Checkpoint Prologue transaction and Move function

Open amnn opened this issue 2 years ago • 3 comments

Adds a system transaction that calls checkpoint_prologue -- a new move function in sui::sui_system. This function does work at the beginning of each checkpoint (similar to the job of advance_epoch), which initially includes updating the clock, but may later be extended to support delegation.

Does not introduce the mechanism for injecting the CheckpointPrologue transaction at the start of each checkpoint.

Relaxes the previously added entry-point verifier to allow functions in sui::sui_system to accept mutable Clock parameters.

Test Plan

Test checking details of system transaction:

$ cargo nextest run -- test_checkpoint_prologue_transaction

Test checking that the transaction will not be signed if provided from an external source:

$ cargo nextest run -- test_refusal_to_sign_checkpoint_prologue

Test that the checkpoint_prologue updates the clock:

$ cargo nextest run -- checkpoint/clock.move

Stack

  • #7922
  • #8054

amnn avatar Feb 03 '23 11:02 amnn

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
explorer ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Feb 13, 2023 at 11:20PM (UTC)
frenemies ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Feb 13, 2023 at 11:20PM (UTC)
wallet-adapter ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Feb 13, 2023 at 11:20PM (UTC)
1 Ignored Deployment
Name Status Preview Comments Updated
explorer-storybook ⬜️ Ignored (Inspect) Feb 13, 2023 at 11:20PM (UTC)

vercel[bot] avatar Feb 03 '23 11:02 vercel[bot]

I suggest a name commit_prologue or consensus_commit_prologue rather then checkpoint_prologue. We would inject this transaction on every commit, but not necessarily on each checkpoint (since commit can be split into multiple checkpoints due to checkpoint size limit)

andll avatar Feb 06 '23 18:02 andll