Skip to content

sov-timelock module#2798

Open
theodorebugnet wants to merge 15 commits intodevfrom
theodore/sov-timelock-module
Open

sov-timelock module#2798
theodorebugnet wants to merge 15 commits intodevfrom
theodore/sov-timelock-module

Conversation

@theodorebugnet
Copy link
Copy Markdown
Contributor

Description

Implements sov-timelock for timelock support.

Main things to review:

  1. The TimelockCapablity introduced in a previous PR has been simplified, since a single method makes the timelock state machine more ergonomic to use. Changes in sov-modules-api/runtime/capabilities/timelock.rs and stf-blueprint/src/sequencer_mode/common.rs.
  2. The sov-timelock module itself, main logic being in lib.rs and call.rs.

sov-timelock stores timelocked proposals keyed by (Address, ProposalId). The ProposalId is a domain-separated hash so we can support both Runtime::Decodable callmessages, and separately arbitrary module-owned data; the latter is used in sov-timelock to implement a timelock on the ModifyCancellationPolicy callmessage.

We also track the number of timelocks per user in a separate state item, to enforce the MAX_PENDING_PROPOSALS_PER_ADDRESS upper bound.

  • I have updated CHANGELOG.md with a new entry if my PR makes any breaking changes or fixes a bug. If my PR removes a feature or changes its behavior, I provide help for users on how to migrate to the new behavior.
  • I have carefully reviewed all my Cargo.toml changes before opening the PRs. (Are all new dependencies necessary? Is any module dependency leaked into the full-node (hint: it shouldn't)?)

Linked Issues

  • Fixes # (issue, if applicable)
  • Related to # (issue)

Testing

Describe how these changes were tested. If you've added new features, have you added unit tests?

Docs

Describe where this code is documented. If it changes a documented interface, have the docs been updated?

Rendered docs are available at https://sovlabs-ci-rustdoc-artifacts.us-east-1.amazonaws.com/<BRANCH_NAME>/index.html

Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 5 additional findings.

Open in Devin Review

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.

1 participant