Skip to content

Commit

Permalink
MESH-2006 multisig improvements part 1 (#1687)
Browse files Browse the repository at this point in the history
* Remove old _as_identity extrinsics.

* Fix multisig benchmarks.

* Remove use of Signatory type from MultiSig pallet.

* Fix JS integration tests.

* Add migration for MultiSig Signatory storage.

* Don't use scheduler to execute MS proposals.

* Add MultiSig secondary key permissions tests.

* Rust integration tests needs more memory.

* Remove auto_close flag from MultiSig and always close proposals when they have been rejected.

* Fix Rust integration test build.

* Rename MultiSigToIdentity to CreatorDid.

* Disable CI cache for Rust integration tests.

* Don't migrate the Votes storage, it will be cleared.

* MESH-2006 multisig improvements part 2 (#1690)

* Refactor ProposalDetails and ProposalStatus.

* Convert multisig pallet to frame v2.

* Refactor Multisig events.

* Don't use Concat based hashing on the Proposal in storage map ProposalIds.

* Don't use Context::current_identity in multisig pallet.  Use the MS's linked DID or it's creator DID.

* Fix bridge controller's CreatorDID.

* Allow a primary key to use custom permissions when making a multisig a secondary key.

* Add tests for 'make_multisig_secondary'.

* Support adding/removing multiple MS signers.

* Emit one event when adding/removing many signers.

* Add execution reentry guard to multisig proposal execution.

* Fix benchmark for approve and create_proposal.

* Use bounded vec for multisig signers.

* Fix multisig unit tests.

* Make MaxSigners a constant in the metadata.

* Remove bridge part 1 (#1691)

* Remove Bridge extrinsics, events, errors.  Only keep the storage.

* MESH-2006 multisig improvements part 3 (#1693)

* Remove multisig.create_or_approve_proposal extrinsic and multisig.ProposalIds storage.

* Prune multisig proposal when it is executed/rejected.

* Rename MultiSigTxDone to NextProposalId.

* MESH-2209 multisig improvements part 4 (#1697)

* Rename MS creator to admin and add paying DID support.

* Split a long running test into smaller tests.

* Restrict the total number of signers on a multisig.

* Always use the Multisig's DID for adding new signers.

* Multisig nesting is not allowed.

* Fix test build.

* Allow a multisig to remove it's paying DID to pay their own fees.

* Add join identity support to MultiSig.

* The approve_join_identity call is paid by the joining DIDs primary key.

* Add some missing events.

* Use wasm based weights.

* Add tests for remove_payer.

* Remove use of Context::current_identity (#1698)

* Remove use of Context::current_identity

* Add some more TODOs.

* Remove Context::set_current_identity() calls from unit tests.

* Remove some more current_identity from unit tests.

* Use controller not stash for Unbonded event.

* Fix remove_authorization for unlinked keys.

* Use GC_DID in treasury event.

* Lint fix.

* Finish TODOs.

* Remove all Context::current_identity code.

* Remove identity CurrentDid storage.
  • Loading branch information
Neopallium committed Aug 15, 2024
1 parent e292afc commit a80bebd
Show file tree
Hide file tree
Showing 78 changed files with 4,473 additions and 11,997 deletions.
9 changes: 5 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -248,14 +248,12 @@ jobs:
rust-integration-test:
docker:
- image: polymeshassociation/rust:debian-nightly-2023-12-11
resource_class: medium+
resource_class: large
environment:
- VERBOSE: "1"
- RUSTFLAGS: -D warnings
steps:
- checkout
- setup-sccache
- restore-sccache-cache
- attach_workspace:
at: ./target/release
- run:
Expand All @@ -270,12 +268,15 @@ jobs:
name: Reset accounts db
command: ./reset_db.sh
working_directory: ./integration
- run:
name: Clear polymesh-api to force re-compile (chain metadata might have changed).
command: cargo clean -p polymesh-api
working_directory: ./integration
- run:
name: Run polymesh-api integration tests.
command: cargo nextest run --locked
working_directory: ./integration
no_output_timeout: 30m
- save-sccache-cache
integration-test:
docker:
- image: node:18-bookworm
Expand Down
1 change: 0 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions integration/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions integration/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ version = "0.1.0"
edition = "2021"

[patch.crates-io]
polymesh-api = { git = "https://github.com/PolymeshAssociation/polymesh-api", branch = "asset_id_v7" }
polymesh-api-client = { git = "https://github.com/PolymeshAssociation/polymesh-api", branch = "asset_id_v7" }
polymesh-api-client-extras = { git = "https://github.com/PolymeshAssociation/polymesh-api", branch = "asset_id_v7" }
polymesh-api-tester = { git = "https://github.com/PolymeshAssociation/polymesh-api", branch = "asset_id_v7" }
polymesh-api-codegen = { git = "https://github.com/PolymeshAssociation/polymesh-api", branch = "asset_id_v7" }
polymesh-api-codegen-macro = { git = "https://github.com/PolymeshAssociation/polymesh-api", branch = "asset_id_v7" }
polymesh-api = { git = "https://github.com/PolymeshAssociation/polymesh-api", branch = "multisig_v7" }
polymesh-api-client = { git = "https://github.com/PolymeshAssociation/polymesh-api", branch = "multisig_v7" }
polymesh-api-client-extras = { git = "https://github.com/PolymeshAssociation/polymesh-api", branch = "multisig_v7" }
polymesh-api-tester = { git = "https://github.com/PolymeshAssociation/polymesh-api", branch = "multisig_v7" }
polymesh-api-codegen = { git = "https://github.com/PolymeshAssociation/polymesh-api", branch = "multisig_v7" }
polymesh-api-codegen-macro = { git = "https://github.com/PolymeshAssociation/polymesh-api", branch = "multisig_v7" }

[features]
default = []
Expand All @@ -27,4 +27,4 @@ sp-keyring = "29.0"
sp-weights = "25.0"

polymesh-api = { version = "3.7.0", features = ["download_metadata"] }
polymesh-api-tester = { version = "0.6.0", features = ["download_metadata"] }
polymesh-api-tester = { version = "0.6.1", features = ["download_metadata"] }
6 changes: 6 additions & 0 deletions integration/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,12 @@ impl From<&PermissionsBuilder> for Permissions {
}
}

impl From<PermissionsBuilder> for Permissions {
fn from(builder: PermissionsBuilder) -> Self {
builder.build()
}
}

pub async fn get_auth_id(res: &mut TransactionResults) -> Result<Option<u64>> {
if let Some(events) = res.events().await? {
for rec in &events.0 {
Expand Down
Loading

0 comments on commit a80bebd

Please sign in to comment.