sui icon indicating copy to clipboard operation
sui copied to clipboard

[Snapshots] introduce StateAccumulator

Open williampsmith opened this issue 2 years ago • 4 comments

This component leverages multiset hashing to hash checkpoints and accumulate them in order to generate a root state digest representing the state (defined by the live object set) at end of epoch, the result of which is included in checkpoint summaries and submitted to consensus to allow for verifying state snapshot contents.

For now, rather than submitting the digest in the summary for consensus, we simply log the digest and add None to the summary, in order to test that the hash is consistent across the network before creating a fork.

Todos:

  • [ ] Fix how we are handling mutated objects
  • [x] Add notify read for existence of end of epoch root state digest
  • [ ] Improve documentation
  • [ ] Add metrics
  • [ ] Add configurability

williampsmith avatar Feb 03 '23 19:02 williampsmith

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 22, 2023 at 3:25AM (UTC)
explorer-storybook ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Feb 22, 2023 at 3:25AM (UTC)
frenemies ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Feb 22, 2023 at 3:25AM (UTC)
wallet-adapter ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Feb 22, 2023 at 3:25AM (UTC)

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

⚠️ 🦋 Changesets Warning: This PR has changes to public npm packages, but does not contain a changeset. You can create a changeset easily by running pnpm changeset in the root of the Sui repo, and following the prompts. If your change does not need a changeset (e.g. a documentation-only change), you can ignore this message. This warning will be removed when a changeset is added to this pull request.

Learn more about Changesets.

github-actions[bot] avatar Feb 14 '23 21:02 github-actions[bot]

Another thought on this PR - if we are introducing new perma table, such as epoch->accumulator, we need to start thinking what are the requirements for holding data in this table and how is it populated during backup.

Ideally, if we should see if it is possible to get rid of this table and have a table in epoch store instead (for example if we only car about accumulator for this and/or previous epoch)

andll avatar Feb 15 '23 17:02 andll

Another thought on this PR - if we are introducing new perma table, such as epoch->accumulator, we need to start thinking what are the requirements for holding data in this table and how is it populated during backup.

I don't think we have any requirement to keep this data around, but we thought it would grow so slowly that we don't need to worry about pruning right now.

mystenmark avatar Feb 15 '23 19:02 mystenmark