Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding try_state hook for Vesting pallet #2847

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

Doordashcon
Copy link
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
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.

substrate/frame/vesting/src/lib.rs Outdated Show resolved Hide resolved
substrate/frame/vesting/src/mock.rs Show resolved Hide resolved
substrate/frame/vesting/src/tests.rs Outdated Show resolved Hide resolved
@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
substrate/frame/vesting/src/lib.rs Outdated Show resolved Hide resolved
substrate/frame/vesting/src/lib.rs Show resolved Hide resolved
substrate/frame/vesting/src/lib.rs Outdated Show resolved Hide resolved
@ggwpez
Copy link
Member

ggwpez commented Jan 19, 2024

/tip medium

(Tip for both this one and #1871)

Copy link

@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
Member

ggwpez commented Jan 19, 2024

/tip medium

Copy link

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

@ggwpez
Copy link
Member

ggwpez commented Jan 19, 2024

/tip medium

Copy link

@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

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

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
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