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

Expiry time for MultiSig calls #1281

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

Conversation

Szegoo
Copy link
Contributor

@Szegoo Szegoo commented Aug 29, 2023

Introduces:

  • a new storage map: MultisigExpiries
  • create_multisig_with_expiry extrinsic for creating a multisig that has a specified expiry.
  • updates the operate function to check whether the multisig has expired.

TODO:

  • Update the NewMultisig event to include a field for expiry
  • Add the clear_expired_multi
  • Write tests
  • Benchmark the clear_expired_multi extrinsic
  • Calculate the weight for the clear_expired_multi extrinsic.

This PR is migrated from the Substrate repo.
The original PR: paritytech/substrate#14444

Closes: #231

@paritytech-ci paritytech-ci requested a review from a team August 29, 2023 19:24
@Szegoo
Copy link
Contributor Author

Szegoo commented Aug 29, 2023

@liamaharon Would be great if you could review my PR here, I added the try-state test you mentioned, so everything should be good now.

@liamaharon liamaharon self-requested a review August 30, 2023 01:16
@liamaharon liamaharon added the T1-FRAME This PR/Issue is related to core FRAME, the framework. label Aug 30, 2023
)
}

/// DEPRECATED: Use the `approve_as_multi` extrinsic instead.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
/// DEPRECATED: Use the `approve_as_multi` extrinsic instead.
/// DEPRECATED: Use the `approve_as_multi` extrinsic instead.
/// It will be removed after March 2024.

I haven't looked at the entire PR but if this is moving forward we need to create a 'deprecation' issue just like this one #147 (following the process described here #182)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

From my understanding after reading the description of #182, shouldn't this be a note inside the deprecated attribute macro instead of a plain comment?

Copy link
Contributor

Choose a reason for hiding this comment

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

True, that would help if a call to that function is compiled by Rust, which most likely would happen within a test.
Most of the cases the dispatchable function would be called by external Builders, in that case there isn't much we can do at the moment, please see #182 (comment)

@paritytech-ci paritytech-ci requested a review from a team August 30, 2023 09:32
substrate/frame/multisig/src/lib.rs Outdated Show resolved Hide resolved
substrate/frame/multisig/src/lib.rs Outdated Show resolved Hide resolved
substrate/frame/multisig/src/lib.rs Outdated Show resolved Hide resolved
substrate/frame/multisig/src/lib.rs Outdated Show resolved Hide resolved
substrate/frame/multisig/src/lib.rs Outdated Show resolved Hide resolved
substrate/frame/multisig/src/lib.rs Outdated Show resolved Hide resolved
substrate/frame/multisig/src/lib.rs Outdated Show resolved Hide resolved
substrate/frame/multisig/src/lib.rs Outdated Show resolved Hide resolved
substrate/frame/multisig/src/tests.rs Outdated Show resolved Hide resolved
substrate/frame/multisig/src/tests.rs Outdated Show resolved Hide resolved
@paritytech-ci paritytech-ci requested a review from a team August 31, 2023 01:23
@liamaharon
Copy link
Contributor

This is getting close to completion. @ggwpez the multisig pallet is especially sensitive so I'm guessing needs an audit? Do you know how to request an srlabs review?

substrate/frame/multisig/src/lib.rs Outdated Show resolved Hide resolved
substrate/frame/multisig/src/lib.rs Outdated Show resolved Hide resolved
substrate/frame/multisig/src/lib.rs Show resolved Hide resolved
@paritytech-ci paritytech-ci requested a review from a team September 4, 2023 20:45
@command-bot
Copy link

command-bot bot commented Oct 17, 2023

@liamaharon https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/3979984 was started for your command "$PIPELINE_SCRIPTS_DIR/commands/bench/bench.sh" --subcommand=pallet --runtime=contracts-rococo --runtime_dir=contracts --target_dir=cumulus --pallet=pallet_multisig. Check out https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/pipelines?page=1&scope=all&username=group_605_bot to know what else is being executed currently.

Comment bot cancel 56-e95cd800-10bf-4dca-857e-bf7aa8ed3308 to cancel this command or bot cancel to cancel all commands in this pull request.

…e=westend --target_dir=polkadot --pallet=pallet_multisig
@command-bot
Copy link

command-bot bot commented Oct 17, 2023

@liamaharon Command "$PIPELINE_SCRIPTS_DIR/commands/bench/bench.sh" --subcommand=runtime --runtime=westend --target_dir=polkadot --pallet=pallet_multisig has finished. Result: https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/3979980 has finished. If any artifacts were generated, you can download them from https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/3979980/artifacts/download.

@command-bot
Copy link

command-bot bot commented Oct 17, 2023

@liamaharon Command "$PIPELINE_SCRIPTS_DIR/commands/bench/bench.sh" --subcommand=runtime --runtime=rococo --target_dir=polkadot --pallet=pallet_multisig has finished. Result: https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/3979977 has finished. If any artifacts were generated, you can download them from https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/3979977/artifacts/download.

@command-bot
Copy link

command-bot bot commented Oct 17, 2023

@liamaharon Command "$PIPELINE_SCRIPTS_DIR/commands/bench/bench.sh" --subcommand=pallet --runtime=contracts-rococo --runtime_dir=contracts --target_dir=cumulus --pallet=pallet_multisig has finished. Result: https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/3979984 has finished. If any artifacts were generated, you can download them from https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/3979984/artifacts/download.

@command-bot
Copy link

command-bot bot commented Oct 17, 2023

@liamaharon Command "$PIPELINE_SCRIPTS_DIR/commands/bench/bench.sh" --subcommand=pallet --runtime=asset-hub-westend --runtime_dir=assets --target_dir=cumulus --pallet=pallet_multisig has finished. Result: https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/3979981 has finished. If any artifacts were generated, you can download them from https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/3979981/artifacts/download.

@command-bot
Copy link

command-bot bot commented Oct 17, 2023

@liamaharon Command "$PIPELINE_SCRIPTS_DIR/commands/bench/bench.sh" --subcommand=pallet --runtime=bridge-hub-rococo --runtime_dir=bridge-hubs --target_dir=cumulus --pallet=pallet_multisig has finished. Result: https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/3979982 has finished. If any artifacts were generated, you can download them from https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/3979982/artifacts/download.

@paritytech-review-bot paritytech-review-bot bot requested a review from a team November 13, 2023 12:40
@paritytech-cicd-pr
Copy link

The CI pipeline was cancelled due to failure one of the required jobs.
Job name: test-linux-stable 1/3
Logs: https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/4314279

serban300 pushed a commit to serban300/polkadot-sdk that referenced this pull request Apr 8, 2024
serban300 pushed a commit to serban300/polkadot-sdk that referenced this pull request Apr 8, 2024
serban300 pushed a commit to serban300/polkadot-sdk that referenced this pull request Apr 8, 2024
serban300 pushed a commit to serban300/polkadot-sdk that referenced this pull request Apr 8, 2024
serban300 pushed a commit to serban300/polkadot-sdk that referenced this pull request Apr 9, 2024
serban300 pushed a commit to serban300/polkadot-sdk that referenced this pull request Apr 9, 2024
serban300 pushed a commit to serban300/polkadot-sdk that referenced this pull request Apr 9, 2024
serban300 pushed a commit to serban300/polkadot-sdk that referenced this pull request Apr 9, 2024
serban300 pushed a commit to serban300/polkadot-sdk that referenced this pull request Apr 9, 2024
serban300 pushed a commit to serban300/polkadot-sdk that referenced this pull request Apr 9, 2024
serban300 pushed a commit to serban300/polkadot-sdk that referenced this pull request Apr 10, 2024
serban300 pushed a commit to serban300/polkadot-sdk that referenced this pull request Apr 10, 2024
bkchr pushed a commit that referenced this pull request Apr 10, 2024
@bkchr
Copy link
Member

bkchr commented Jul 17, 2024

@Szegoo do you still want to land this pr? If yes, please update and then we need to find some reviewers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T1-FRAME This PR/Issue is related to core FRAME, the framework.
Projects
Status: Audited
Status: Audited
Development

Successfully merging this pull request may close these issues.

Expiry time for MultiSig calls
8 participants