Skip to content

Adding try_state hook for Vesting pallet#2847

Closed
Doordashcon wants to merge 13 commits intoparitytech:masterfrom
Doordashcon:ddc-vesting-try-state
Closed

Adding try_state hook for Vesting pallet#2847
Doordashcon wants to merge 13 commits intoparitytech:masterfrom
Doordashcon:ddc-vesting-try-state

Conversation

@Doordashcon
Copy link
Copy Markdown
Contributor

@Doordashcon Doordashcon commented Jan 4, 2024

Part of #239.

The invariant:

  • At the blocks before vesting begins, the locked amount of a vesting schedule must be equal to the product of the duration and the release per block amount when the locked amount is divisible by the per block amount, else the final vesting block should be equal to the unvested amount. This should also hold true during vesting schedules.

polkadot address: 12zsKEDVcHpKEWb99iFt3xrTCQQXZMu477nJQsTBBrof5k2h

@Doordashcon Doordashcon marked this pull request as ready for review January 6, 2024 03:22
@Doordashcon Doordashcon requested review from a team January 6, 2024 03:22
@paritytech-review-bot paritytech-review-bot bot requested a review from a team January 6, 2024 03:22
Copy link
Copy Markdown
Contributor

@gpestana gpestana left a comment

Choose a reason for hiding this comment

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

Looks in the right direction, I think it would be useful to do a small refactoring on the externalities builder to make it easier to run the try state checks at the end of the tests.

Also, it would be easier for the reviewers if the feature branch is in the polkadot-sdk repo and not on a fork of yours, so we can easily pull it and test it locally.

@gpestana gpestana added the T2-pallets This PR/Issue is related to a particular pallet. label Jan 10, 2024
@paritytech-review-bot paritytech-review-bot bot requested a review from a team January 15, 2024 05:31
@Doordashcon Doordashcon requested a review from gpestana January 17, 2024 16:36
@ggwpez
Copy link
Copy Markdown
Member

ggwpez commented Jan 19, 2024

/tip medium

(Tip for both this one and #1871)

@substrate-tip-bot
Copy link
Copy Markdown

@Doordashcon Contributor did not properly post their account address.

Make sure the pull request description (or user bio) has: "{network} address: {address}".

@ggwpez
Copy link
Copy Markdown
Member

ggwpez commented Jan 19, 2024

/tip medium

@substrate-tip-bot
Copy link
Copy Markdown

@ggwpez Invalid tip size. Please specify one of small, medium, large.

@ggwpez
Copy link
Copy Markdown
Member

ggwpez commented Jan 19, 2024

/tip medium

@substrate-tip-bot
Copy link
Copy Markdown

@ggwpez A medium (80 DOT) tip was successfully submitted for @Doordashcon (12zsKEDVcHpKEWb99iFt3xrTCQQXZMu477nJQsTBBrof5k2h on polkadot).

https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frpc.polkadot.io#/referenda tip

@Polkadot-Forum
Copy link
Copy Markdown

This pull request has been mentioned on Polkadot Forum. There might be relevant details there:

https://forum.polkadot.network/t/polkadot-digest-25-jan-2024/5837/1

@Doordashcon Doordashcon requested a review from a team as a code owner February 2, 2024 15:56
@paritytech-cicd-pr
Copy link
Copy Markdown

The CI pipeline was cancelled due to failure one of the required jobs.
Job name: cargo-clippy
Logs: https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/5114781

@Doordashcon
Copy link
Copy Markdown
Contributor Author

@ggwpez @gpestana please review 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

T2-pallets This PR/Issue is related to a particular pallet.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants