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

MESH-1250: on_runtime_upgrade, clear V1 PIPs storage. #591

Merged
merged 1 commit into from Sep 8, 2020

Conversation

Centril
Copy link
Contributor

@Centril Centril commented Sep 7, 2020

No description provided.

pallets/pips/src/lib.rs Outdated Show resolved Hide resolved
@adamdossa adamdossa added the merge-after-ci PR can be merged after CI has completed label Sep 8, 2020
@poly-auto-merge poly-auto-merge bot merged commit 92ccc36 into develop Sep 8, 2020
@Centril Centril deleted the mesh-1250 branch September 8, 2020 10:32
adamdossa added a commit that referenced this pull request Sep 18, 2020
* added clippy script to CI

* added clippy test to dev pr pipeline

* MESH-1233/Rebase-Fees (#572)

* rebase weights

* fix linting

Co-authored-by: satyam <satyam@secureblocks.io>

* MESH-1216: `get_valid_payer`: only accept `AccountId`. (#573)

* mesh-1216: `get_valid_payer`: only accept `AccountId`.

Also do some code cleanup & refactoring.

* refactor fee_details some more

* mesh-1228: mv pallets/runtime/{testnet-v1 -> testnet}

* mesh-1228: rename crate & fix comments

* ci: testnet-v1 -> testnet

* minor change

* added clippy test to the rest of the pipelines

* Atomically create and authorize instructions (#567)

* Added venue type

* schema update

* cli update

* submodule update

* submodule to master branch

* MESH-1232/Remove smart extension api (#558)

* add remove smart extension api

* suggested change applied

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* re-reference to right commit hash for settlement

* Trigger notification

Co-authored-by: satyam <satyam@secureblocks.io>
Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>
Co-authored-by: Adam Dossa <adam.dossa@gmail.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* MESH-1235/remove batch functions (#578)

* remove batch functions

* remove bridge batch functions

Co-authored-by: satyam <satyam@secureblocks.io>

* MESH-1240, MESH-1239, MESH-1238 (#579)

* mesh-1239: move proposer & cool_off_until to Pip

* mesh-1238: add SnapshotId to metadata

* mesh-1240: cache list of committee pips

* MESH-1231: add `get_key_id_data` rpc call (#569)

* mesh-1231: add get_key_id_data rpc call

* mesh-1231: add `KeyIdData` to polymesh_schema

* mesh-1231: key_id -> key_identity

* mesh-1231: address review comments

Co-authored-by: Adam Dossa <adam.dossa@gmail.com>

* Fix asset RPC (#562)

* fix asset rpc

* lint fixing

* comment updated

Co-authored-by: satyam <satyam@secureblocks.io>

* added sendTx to JS Scripts (#585)

Co-authored-by: Adam Dossa <adam.dossa@gmail.com>

* mesh-1236: remove_authorization -> payer: authorized_by (#574)

* DEVOPS-211 (#576)

* DEVOPS-211

* Use `load_var` to read the `rust-toolchain` contents into a variable
* Use the `rust-toolchain` variable to specify the desired Rust
  container

* DEVOPS-211

* Fix variable reference

* DEVOPS-211

* debug

* DEVOPS-211

debug

* DEVOPS-211

Remove trailing newline from `rust-toolchain` file

* DEVOPS-211

* Add rust toolchain selection to develop and tooling pipelines

* DEVOPS-211

* Bugfix

* DEVOPS-211

* Remove `serial` requirement for pipelines in favour of per-worker
  container placement strategy (DEVOPS-212)
* Remove debug configuration

* DEVOPS-211

Integrate changes from DEVOPS-209

* DEVOPS-211

* Use `load_var` to read the `rust-toolchain` contents into a variable
* Use the `rust-toolchain` variable to specify the desired Rust
  container

* DEVOPS-211

* Fix variable reference

* DEVOPS-211

* debug

* DEVOPS-211

debug

* DEVOPS-211

Remove trailing newline from `rust-toolchain` file

* DEVOPS-211

* Add rust toolchain selection to develop and tooling pipelines

* DEVOPS-211

* Bugfix

* DEVOPS-211

* Remove `serial` requirement for pipelines in favour of per-worker
  container placement strategy (DEVOPS-212)
* Remove debug configuration

* DEVOPS-211

Integrate changes from DEVOPS-209

* DEVOPS-211

* Use `load_var` to read the `rust-toolchain` contents into a variable
* Use the `rust-toolchain` variable to specify the desired Rust
  container

* DEVOPS-211

* Fix variable reference

* DEVOPS-211

* debug

* DEVOPS-211

debug

* DEVOPS-211

* Add rust toolchain selection to develop and tooling pipelines

* DEVOPS-211

* Bugfix

* DEVOPS-211

* Remove `serial` requirement for pipelines in favour of per-worker
  container placement strategy (DEVOPS-212)
* Remove debug configuration

* DEVOPS-211

* Fix clippy step inputs

Co-authored-by: Adam Dossa <adam.dossa@gmail.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* MESH-1252 & MESH-1253 (#590)

* mesh-1253: add `created_at: BlockNumber` to `PipsMetadata`.

* mesh-1252: Add `SnapshotId` to `SnapshotResultsEnacted`.

* mesh-1250: `on_runtime_upgrade`, clear V1 PIPs storage. (#591)

* Update readme and genesis files (#593)

* Update README.md (#594)

* MESH-1244: add `#[migrate_from($ty_old)]` form to `#[derive(Migrate)]`. (#592)

* mesh-1244: add `#[migrate_from($ty_old)]` form to `#[derive(Migrate)]`.

* mesh-1244: simplify `extract_migrate_refs` using `get_ident`.

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* DEVOPS-220/alcyone-pipelines (#582)

* Add `alcyone` pipelines.
* Make the `alcyone` pipelines bump versions
* Make `tooling` pipelines not bump versions
* Change PR artifact labeling to distinguish between `develop` and
  `tooling` artifacts

Co-authored-by: Adam Dossa <adam.dossa@gmail.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* MESH-1166/Scope of Claim refactor (#560)

* first go

* Update base.rs

* fix non-settlement tests

* first go at upgrade

* fix bad submodule

* formatting

* fix bad merge

* formatting

* submodule bump

* Update primitives/src/identity_claim.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* upgrade compliance manager storage

* update schema

* wip

* wip

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>
Co-authored-by: Adam Dossa <adam.dossa@gmail.com>

* DEVOPS-174/purge-cache (#595)

* DEVOPS-174/purge-cache

* Add cargo-sweep to cached rust tasks

* DEVOPS-174/purge-cache

* Fix `cargo test` / `cargo sweep`

* DEVOPS-174/purge-cache

* DEVOPS-227 / reduce `npm test` noise

* DEVOPS-174/purge-cache

DEVOPS-228: improve timeout conditions

* Move the `npm test` timeout inside the script and use coreutils
  timeout instead
* Remove archived `master` pipelines

* DEVOPS-174/purge-cache

* More aggressive cache purging
* Fix `npm test` redirect bug

* DEVOPS-174/purge-cache

* Remove timeout from alcyone pipelines
* Set tooling pipelines to not `put` semver updates

* DEVOPS-174/purge-cache

* Reset cargo cache when it reaches 10GB

* DEVOPS-174/purge-cache

* Handle undeletable `target/` directory (because it's a volume mount)

Co-authored-by: Adam Dossa <adam.dossa@gmail.com>

* MESH-1074/Enforce scope claim to assets transfer (#583)

* enforce scope claim to assets

* Centril: feedback addressed

* fix linting

* fix: avoid returning default as true for sender

* add implicit requirements within the granular_verification

* update schema

* add additional test

* use doc comments

* simplify rpc

* remove debug from wasm

* code rearrangement

* minor improvement

* lint fix

Co-authored-by: satyam <satyam@secureblocks.io>
Co-authored-by: Adam Dossa <adam.dossa@gmail.com>

* removed staking fuzzer from workplace (#597)

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* mesh-1243: add migrate_double_map_keys (#604)

* DEVOPS-232/move-polymesh-pipelines (#602)

* DEVOPS-232/move-polymesh-pipelines

* Remove deprecated Concourse files

* trigger

* DEVOPS-232/move-polymesh-pipelines

* Missing && in cli test

* trigger

* trigger

* DEVOPS-232/move-polymesh-pipelines

Undo 0c69bbd

* DEVOPS-232/move-polymesh-pipelines

Update CODEOWNERS file

Co-authored-by: Adam Dossa <adam.dossa@gmail.com>

* MESH-1257: Runtime upgrade functionality for CDD_ID. (#600)

* mesh-1257: Runtime upgrade functionality for CDD_ID.

This amends `Migrate` with `type Context`.
To `derive(Migrate)` we add `migrate_context`, `migrate_with`,
and `migrate_from` on enum variants.

* mesh-1257: more migrate_context docs

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Update README (#605)

* MESH-1262: Infer `Proposer<_>` from `origin` on `Pips::propose`. (#606)

* mesh-1262: infer proposer from origin on `Pips::propose`.

* mesh-1262: fix governance js test

* Portfolio, Custodianship, and Settlement changes (#518)

* Portfolio custodian

* accept portfolio custody

* tests fixed

* removed dispatchables for old custody approach

* wip

* merge fixes

* verify_portfolio

* wip

* added portoflio transfer fn

* lock unlock tokens

* build fix

* wip

* custodian check

* wip

* portfolio subtrait

* wip

* wip

* rpc fixed

* submodule update

* schema update

* wip

* cli fix

* use PortfolioId in PortfolioCustody auth

* minor refactoring

* parameter reordering

* submodule update

* api for moving portfolio funds updated

* Documentation wip

* fixed tests

* Added token lock and custody tests

* some code comments

* wip

* wip

* refactored tests

* settlement tests

* import fix

* Added settlement tests

* removed mut

* copy schema script

* fixed tests

* updated submodule

* Removed internal transfer function

* cleaned up comments

* review suggestions

Co-authored-by: Satyam Agrawal <satyam0499@gmail.com>

* Bump substrate rc4 => rc5+2 => rc6 (#587)

* substrate: rc4 -> rc5+2 in deps

* substrate upgrade -> rc5: fix fallout

* substrate: rc5+2 -> rc6 in deps

* substrate upgrade -> rc6: fix fallout

* substrate upgrade: bump another crate to rc6

* substrate -> rc6: cleanup

* substrate -> rc6: add ValidateUnsigned to Babe

* substrate -> rc6: cargo update

* substrate -> rc6: fix rebase fallout

* Removed submodules (#609)

* settlement module moved to main repo

* Import cryptography library from GH via cargo dependency

* Updated CircleCI to not use submodules

* Updated test scirpts to use dummy wasm

* updated cryptography branch

* removed gitignore from settlement folder

* trigger

* run it again

Co-authored-by: Claus Strommer <claus@polymath.network>

* Updated cryptography branch (#612)

* Update max inflation from 20% to 14% (#611)

* change payout_stakers dispatch weight to the 1/4 of the actual weight (#614)

Co-authored-by: satyam <satyam@secureblocks.io>

* Update REWARD_CURVE for testnet (#617)

* mesh-1141: add 'PipsMetadata::transaction_version' (#610)

Co-authored-by: CJP10 <14205938+CJP10@users.noreply.github.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* fix reference problem

* fix linting

* fix tests and remove old reference

Co-authored-by: Joel Moore <47923231+JMoore96@users.noreply.github.com>
Co-authored-by: satyam <satyam@secureblocks.io>
Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>
Co-authored-by: Mudit Gupta <guptamudit@ymail.com>
Co-authored-by: Adam Dossa <adam.dossa@gmail.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>
Co-authored-by: Claus Strommer <63645659+cwsatpolymath@users.noreply.github.com>
Co-authored-by: CJP10 <14205938+CJP10@users.noreply.github.com>
Co-authored-by: Claus Strommer <claus@polymath.network>
Neopallium pushed a commit that referenced this pull request Aug 30, 2022
* added clippy script to CI

* added clippy test to dev pr pipeline

* MESH-1233/Rebase-Fees (#572)

* rebase weights

* fix linting

Co-authored-by: satyam <satyam@secureblocks.io>

* MESH-1216: `get_valid_payer`: only accept `AccountId`. (#573)

* mesh-1216: `get_valid_payer`: only accept `AccountId`.

Also do some code cleanup & refactoring.

* refactor fee_details some more

* mesh-1228: mv pallets/runtime/{testnet-v1 -> testnet}

* mesh-1228: rename crate & fix comments

* ci: testnet-v1 -> testnet

* minor change

* added clippy test to the rest of the pipelines

* Atomically create and authorize instructions (#567)

* Added venue type

* schema update

* cli update

* submodule update

* submodule to master branch

* MESH-1232/Remove smart extension api (#558)

* add remove smart extension api

* suggested change applied

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* re-reference to right commit hash for settlement

* Trigger notification

Co-authored-by: satyam <satyam@secureblocks.io>
Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>
Co-authored-by: Adam Dossa <adam.dossa@gmail.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* MESH-1235/remove batch functions (#578)

* remove batch functions

* remove bridge batch functions

Co-authored-by: satyam <satyam@secureblocks.io>

* MESH-1240, MESH-1239, MESH-1238 (#579)

* mesh-1239: move proposer & cool_off_until to Pip

* mesh-1238: add SnapshotId to metadata

* mesh-1240: cache list of committee pips

* MESH-1231: add `get_key_id_data` rpc call (#569)

* mesh-1231: add get_key_id_data rpc call

* mesh-1231: add `KeyIdData` to polymesh_schema

* mesh-1231: key_id -> key_identity

* mesh-1231: address review comments

Co-authored-by: Adam Dossa <adam.dossa@gmail.com>

* Fix asset RPC (#562)

* fix asset rpc

* lint fixing

* comment updated

Co-authored-by: satyam <satyam@secureblocks.io>

* added sendTx to JS Scripts (#585)

Co-authored-by: Adam Dossa <adam.dossa@gmail.com>

* mesh-1236: remove_authorization -> payer: authorized_by (#574)

* DEVOPS-211 (#576)

* DEVOPS-211

* Use `load_var` to read the `rust-toolchain` contents into a variable
* Use the `rust-toolchain` variable to specify the desired Rust
  container

* DEVOPS-211

* Fix variable reference

* DEVOPS-211

* debug

* DEVOPS-211

debug

* DEVOPS-211

Remove trailing newline from `rust-toolchain` file

* DEVOPS-211

* Add rust toolchain selection to develop and tooling pipelines

* DEVOPS-211

* Bugfix

* DEVOPS-211

* Remove `serial` requirement for pipelines in favour of per-worker
  container placement strategy (DEVOPS-212)
* Remove debug configuration

* DEVOPS-211

Integrate changes from DEVOPS-209

* DEVOPS-211

* Use `load_var` to read the `rust-toolchain` contents into a variable
* Use the `rust-toolchain` variable to specify the desired Rust
  container

* DEVOPS-211

* Fix variable reference

* DEVOPS-211

* debug

* DEVOPS-211

debug

* DEVOPS-211

Remove trailing newline from `rust-toolchain` file

* DEVOPS-211

* Add rust toolchain selection to develop and tooling pipelines

* DEVOPS-211

* Bugfix

* DEVOPS-211

* Remove `serial` requirement for pipelines in favour of per-worker
  container placement strategy (DEVOPS-212)
* Remove debug configuration

* DEVOPS-211

Integrate changes from DEVOPS-209

* DEVOPS-211

* Use `load_var` to read the `rust-toolchain` contents into a variable
* Use the `rust-toolchain` variable to specify the desired Rust
  container

* DEVOPS-211

* Fix variable reference

* DEVOPS-211

* debug

* DEVOPS-211

debug

* DEVOPS-211

* Add rust toolchain selection to develop and tooling pipelines

* DEVOPS-211

* Bugfix

* DEVOPS-211

* Remove `serial` requirement for pipelines in favour of per-worker
  container placement strategy (DEVOPS-212)
* Remove debug configuration

* DEVOPS-211

* Fix clippy step inputs

Co-authored-by: Adam Dossa <adam.dossa@gmail.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* MESH-1252 & MESH-1253 (#590)

* mesh-1253: add `created_at: BlockNumber` to `PipsMetadata`.

* mesh-1252: Add `SnapshotId` to `SnapshotResultsEnacted`.

* mesh-1250: `on_runtime_upgrade`, clear V1 PIPs storage. (#591)

* Update readme and genesis files (#593)

* Update README.md (#594)

* MESH-1244: add `#[migrate_from($ty_old)]` form to `#[derive(Migrate)]`. (#592)

* mesh-1244: add `#[migrate_from($ty_old)]` form to `#[derive(Migrate)]`.

* mesh-1244: simplify `extract_migrate_refs` using `get_ident`.

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* DEVOPS-220/alcyone-pipelines (#582)

* Add `alcyone` pipelines.
* Make the `alcyone` pipelines bump versions
* Make `tooling` pipelines not bump versions
* Change PR artifact labeling to distinguish between `develop` and
  `tooling` artifacts

Co-authored-by: Adam Dossa <adam.dossa@gmail.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* MESH-1166/Scope of Claim refactor (#560)

* first go

* Update base.rs

* fix non-settlement tests

* first go at upgrade

* fix bad submodule

* formatting

* fix bad merge

* formatting

* submodule bump

* Update primitives/src/identity_claim.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* upgrade compliance manager storage

* update schema

* wip

* wip

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>
Co-authored-by: Adam Dossa <adam.dossa@gmail.com>

* DEVOPS-174/purge-cache (#595)

* DEVOPS-174/purge-cache

* Add cargo-sweep to cached rust tasks

* DEVOPS-174/purge-cache

* Fix `cargo test` / `cargo sweep`

* DEVOPS-174/purge-cache

* DEVOPS-227 / reduce `npm test` noise

* DEVOPS-174/purge-cache

DEVOPS-228: improve timeout conditions

* Move the `npm test` timeout inside the script and use coreutils
  timeout instead
* Remove archived `master` pipelines

* DEVOPS-174/purge-cache

* More aggressive cache purging
* Fix `npm test` redirect bug

* DEVOPS-174/purge-cache

* Remove timeout from alcyone pipelines
* Set tooling pipelines to not `put` semver updates

* DEVOPS-174/purge-cache

* Reset cargo cache when it reaches 10GB

* DEVOPS-174/purge-cache

* Handle undeletable `target/` directory (because it's a volume mount)

Co-authored-by: Adam Dossa <adam.dossa@gmail.com>

* MESH-1074/Enforce scope claim to assets transfer (#583)

* enforce scope claim to assets

* Centril: feedback addressed

* fix linting

* fix: avoid returning default as true for sender

* add implicit requirements within the granular_verification

* update schema

* add additional test

* use doc comments

* simplify rpc

* remove debug from wasm

* code rearrangement

* minor improvement

* lint fix

Co-authored-by: satyam <satyam@secureblocks.io>
Co-authored-by: Adam Dossa <adam.dossa@gmail.com>

* removed staking fuzzer from workplace (#597)

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* mesh-1243: add migrate_double_map_keys (#604)

* DEVOPS-232/move-polymesh-pipelines (#602)

* DEVOPS-232/move-polymesh-pipelines

* Remove deprecated Concourse files

* trigger

* DEVOPS-232/move-polymesh-pipelines

* Missing && in cli test

* trigger

* trigger

* DEVOPS-232/move-polymesh-pipelines

Undo 0c69bbd

* DEVOPS-232/move-polymesh-pipelines

Update CODEOWNERS file

Co-authored-by: Adam Dossa <adam.dossa@gmail.com>

* MESH-1257: Runtime upgrade functionality for CDD_ID. (#600)

* mesh-1257: Runtime upgrade functionality for CDD_ID.

This amends `Migrate` with `type Context`.
To `derive(Migrate)` we add `migrate_context`, `migrate_with`,
and `migrate_from` on enum variants.

* mesh-1257: more migrate_context docs

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Update README (#605)

* MESH-1262: Infer `Proposer<_>` from `origin` on `Pips::propose`. (#606)

* mesh-1262: infer proposer from origin on `Pips::propose`.

* mesh-1262: fix governance js test

* Portfolio, Custodianship, and Settlement changes (#518)

* Portfolio custodian

* accept portfolio custody

* tests fixed

* removed dispatchables for old custody approach

* wip

* merge fixes

* verify_portfolio

* wip

* added portoflio transfer fn

* lock unlock tokens

* build fix

* wip

* custodian check

* wip

* portfolio subtrait

* wip

* wip

* rpc fixed

* submodule update

* schema update

* wip

* cli fix

* use PortfolioId in PortfolioCustody auth

* minor refactoring

* parameter reordering

* submodule update

* api for moving portfolio funds updated

* Documentation wip

* fixed tests

* Added token lock and custody tests

* some code comments

* wip

* wip

* refactored tests

* settlement tests

* import fix

* Added settlement tests

* removed mut

* copy schema script

* fixed tests

* updated submodule

* Removed internal transfer function

* cleaned up comments

* review suggestions

Co-authored-by: Satyam Agrawal <satyam0499@gmail.com>

* Bump substrate rc4 => rc5+2 => rc6 (#587)

* substrate: rc4 -> rc5+2 in deps

* substrate upgrade -> rc5: fix fallout

* substrate: rc5+2 -> rc6 in deps

* substrate upgrade -> rc6: fix fallout

* substrate upgrade: bump another crate to rc6

* substrate -> rc6: cleanup

* substrate -> rc6: add ValidateUnsigned to Babe

* substrate -> rc6: cargo update

* substrate -> rc6: fix rebase fallout

* Removed submodules (#609)

* settlement module moved to main repo

* Import cryptography library from GH via cargo dependency

* Updated CircleCI to not use submodules

* Updated test scirpts to use dummy wasm

* updated cryptography branch

* removed gitignore from settlement folder

* trigger

* run it again

Co-authored-by: Claus Strommer <claus@polymath.network>

* Updated cryptography branch (#612)

* Update max inflation from 20% to 14% (#611)

* change payout_stakers dispatch weight to the 1/4 of the actual weight (#614)

Co-authored-by: satyam <satyam@secureblocks.io>

* Update REWARD_CURVE for testnet (#617)

* mesh-1141: add 'PipsMetadata::transaction_version' (#610)

Co-authored-by: CJP10 <14205938+CJP10@users.noreply.github.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* fix reference problem

* fix linting

* fix tests and remove old reference

Co-authored-by: Joel Moore <47923231+JMoore96@users.noreply.github.com>
Co-authored-by: satyam <satyam@secureblocks.io>
Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>
Co-authored-by: Mudit Gupta <guptamudit@ymail.com>
Co-authored-by: Adam Dossa <adam.dossa@gmail.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>
Co-authored-by: Claus Strommer <63645659+cwsatpolymath@users.noreply.github.com>
Co-authored-by: CJP10 <14205938+CJP10@users.noreply.github.com>
Co-authored-by: Claus Strommer <claus@polymath.network>
Neopallium pushed a commit that referenced this pull request Apr 25, 2023
* Adds an empty confidential asset pallet

Integrate mercat account (#584)

* Add mercat account creation and verification
* Emit account creation event
* Update the cryptography submodule

Weekly Task: Develop to Mercat (#619)

* added clippy script to CI

* added clippy test to dev pr pipeline

* MESH-1233/Rebase-Fees (#572)

* rebase weights

* fix linting

Co-authored-by: satyam <satyam@secureblocks.io>

* MESH-1216: `get_valid_payer`: only accept `AccountId`. (#573)

* mesh-1216: `get_valid_payer`: only accept `AccountId`.

Also do some code cleanup & refactoring.

* refactor fee_details some more

* mesh-1228: mv pallets/runtime/{testnet-v1 -> testnet}

* mesh-1228: rename crate & fix comments

* ci: testnet-v1 -> testnet

* minor change

* added clippy test to the rest of the pipelines

* Atomically create and authorize instructions (#567)

* Added venue type

* schema update

* cli update

* submodule update

* submodule to master branch

* MESH-1232/Remove smart extension api (#558)

* add remove smart extension api

* suggested change applied

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* re-reference to right commit hash for settlement

* Trigger notification

Co-authored-by: satyam <satyam@secureblocks.io>
Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>
Co-authored-by: Adam Dossa <adam.dossa@gmail.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* MESH-1235/remove batch functions (#578)

* remove batch functions

* remove bridge batch functions

Co-authored-by: satyam <satyam@secureblocks.io>

* MESH-1240, MESH-1239, MESH-1238 (#579)

* mesh-1239: move proposer & cool_off_until to Pip

* mesh-1238: add SnapshotId to metadata

* mesh-1240: cache list of committee pips

* MESH-1231: add `get_key_id_data` rpc call (#569)

* mesh-1231: add get_key_id_data rpc call

* mesh-1231: add `KeyIdData` to polymesh_schema

* mesh-1231: key_id -> key_identity

* mesh-1231: address review comments

Co-authored-by: Adam Dossa <adam.dossa@gmail.com>

* Fix asset RPC (#562)

* fix asset rpc

* lint fixing

* comment updated

Co-authored-by: satyam <satyam@secureblocks.io>

* added sendTx to JS Scripts (#585)

Co-authored-by: Adam Dossa <adam.dossa@gmail.com>

* mesh-1236: remove_authorization -> payer: authorized_by (#574)

* DEVOPS-211 (#576)

* DEVOPS-211

* Use `load_var` to read the `rust-toolchain` contents into a variable
* Use the `rust-toolchain` variable to specify the desired Rust
  container

* DEVOPS-211

* Fix variable reference

* DEVOPS-211

* debug

* DEVOPS-211

debug

* DEVOPS-211

Remove trailing newline from `rust-toolchain` file

* DEVOPS-211

* Add rust toolchain selection to develop and tooling pipelines

* DEVOPS-211

* Bugfix

* DEVOPS-211

* Remove `serial` requirement for pipelines in favour of per-worker
  container placement strategy (DEVOPS-212)
* Remove debug configuration

* DEVOPS-211

Integrate changes from DEVOPS-209

* DEVOPS-211

* Use `load_var` to read the `rust-toolchain` contents into a variable
* Use the `rust-toolchain` variable to specify the desired Rust
  container

* DEVOPS-211

* Fix variable reference

* DEVOPS-211

* debug

* DEVOPS-211

debug

* DEVOPS-211

Remove trailing newline from `rust-toolchain` file

* DEVOPS-211

* Add rust toolchain selection to develop and tooling pipelines

* DEVOPS-211

* Bugfix

* DEVOPS-211

* Remove `serial` requirement for pipelines in favour of per-worker
  container placement strategy (DEVOPS-212)
* Remove debug configuration

* DEVOPS-211

Integrate changes from DEVOPS-209

* DEVOPS-211

* Use `load_var` to read the `rust-toolchain` contents into a variable
* Use the `rust-toolchain` variable to specify the desired Rust
  container

* DEVOPS-211

* Fix variable reference

* DEVOPS-211

* debug

* DEVOPS-211

debug

* DEVOPS-211

* Add rust toolchain selection to develop and tooling pipelines

* DEVOPS-211

* Bugfix

* DEVOPS-211

* Remove `serial` requirement for pipelines in favour of per-worker
  container placement strategy (DEVOPS-212)
* Remove debug configuration

* DEVOPS-211

* Fix clippy step inputs

Co-authored-by: Adam Dossa <adam.dossa@gmail.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* MESH-1252 & MESH-1253 (#590)

* mesh-1253: add `created_at: BlockNumber` to `PipsMetadata`.

* mesh-1252: Add `SnapshotId` to `SnapshotResultsEnacted`.

* mesh-1250: `on_runtime_upgrade`, clear V1 PIPs storage. (#591)

* Update readme and genesis files (#593)

* Update README.md (#594)

* MESH-1244: add `#[migrate_from($ty_old)]` form to `#[derive(Migrate)]`. (#592)

* mesh-1244: add `#[migrate_from($ty_old)]` form to `#[derive(Migrate)]`.

* mesh-1244: simplify `extract_migrate_refs` using `get_ident`.

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* DEVOPS-220/alcyone-pipelines (#582)

* Add `alcyone` pipelines.
* Make the `alcyone` pipelines bump versions
* Make `tooling` pipelines not bump versions
* Change PR artifact labeling to distinguish between `develop` and
  `tooling` artifacts

Co-authored-by: Adam Dossa <adam.dossa@gmail.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* MESH-1166/Scope of Claim refactor (#560)

* first go

* Update base.rs

* fix non-settlement tests

* first go at upgrade

* fix bad submodule

* formatting

* fix bad merge

* formatting

* submodule bump

* Update primitives/src/identity_claim.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* upgrade compliance manager storage

* update schema

* wip

* wip

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>
Co-authored-by: Adam Dossa <adam.dossa@gmail.com>

* DEVOPS-174/purge-cache (#595)

* DEVOPS-174/purge-cache

* Add cargo-sweep to cached rust tasks

* DEVOPS-174/purge-cache

* Fix `cargo test` / `cargo sweep`

* DEVOPS-174/purge-cache

* DEVOPS-227 / reduce `npm test` noise

* DEVOPS-174/purge-cache

DEVOPS-228: improve timeout conditions

* Move the `npm test` timeout inside the script and use coreutils
  timeout instead
* Remove archived `master` pipelines

* DEVOPS-174/purge-cache

* More aggressive cache purging
* Fix `npm test` redirect bug

* DEVOPS-174/purge-cache

* Remove timeout from alcyone pipelines
* Set tooling pipelines to not `put` semver updates

* DEVOPS-174/purge-cache

* Reset cargo cache when it reaches 10GB

* DEVOPS-174/purge-cache

* Handle undeletable `target/` directory (because it's a volume mount)

Co-authored-by: Adam Dossa <adam.dossa@gmail.com>

* MESH-1074/Enforce scope claim to assets transfer (#583)

* enforce scope claim to assets

* Centril: feedback addressed

* fix linting

* fix: avoid returning default as true for sender

* add implicit requirements within the granular_verification

* update schema

* add additional test

* use doc comments

* simplify rpc

* remove debug from wasm

* code rearrangement

* minor improvement

* lint fix

Co-authored-by: satyam <satyam@secureblocks.io>
Co-authored-by: Adam Dossa <adam.dossa@gmail.com>

* removed staking fuzzer from workplace (#597)

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* mesh-1243: add migrate_double_map_keys (#604)

* DEVOPS-232/move-polymesh-pipelines (#602)

* DEVOPS-232/move-polymesh-pipelines

* Remove deprecated Concourse files

* trigger

* DEVOPS-232/move-polymesh-pipelines

* Missing && in cli test

* trigger

* trigger

* DEVOPS-232/move-polymesh-pipelines

Undo 0c69bbd7965b2546bee457bcebb1bc09324c2763

* DEVOPS-232/move-polymesh-pipelines

Update CODEOWNERS file

Co-authored-by: Adam Dossa <adam.dossa@gmail.com>

* MESH-1257: Runtime upgrade functionality for CDD_ID. (#600)

* mesh-1257: Runtime upgrade functionality for CDD_ID.

This amends `Migrate` with `type Context`.
To `derive(Migrate)` we add `migrate_context`, `migrate_with`,
and `migrate_from` on enum variants.

* mesh-1257: more migrate_context docs

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Update README (#605)

* MESH-1262: Infer `Proposer<_>` from `origin` on `Pips::propose`. (#606)

* mesh-1262: infer proposer from origin on `Pips::propose`.

* mesh-1262: fix governance js test

* Portfolio, Custodianship, and Settlement changes (#518)

* Portfolio custodian

* accept portfolio custody

* tests fixed

* removed dispatchables for old custody approach

* wip

* merge fixes

* verify_portfolio

* wip

* added portoflio transfer fn

* lock unlock tokens

* build fix

* wip

* custodian check

* wip

* portfolio subtrait

* wip

* wip

* rpc fixed

* submodule update

* schema update

* wip

* cli fix

* use PortfolioId in PortfolioCustody auth

* minor refactoring

* parameter reordering

* submodule update

* api for moving portfolio funds updated

* Documentation wip

* fixed tests

* Added token lock and custody tests

* some code comments

* wip

* wip

* refactored tests

* settlement tests

* import fix

* Added settlement tests

* removed mut

* copy schema script

* fixed tests

* updated submodule

* Removed internal transfer function

* cleaned up comments

* review suggestions

Co-authored-by: Satyam Agrawal <satyam0499@gmail.com>

* Bump substrate rc4 => rc5+2 => rc6 (#587)

* substrate: rc4 -> rc5+2 in deps

* substrate upgrade -> rc5: fix fallout

* substrate: rc5+2 -> rc6 in deps

* substrate upgrade -> rc6: fix fallout

* substrate upgrade: bump another crate to rc6

* substrate -> rc6: cleanup

* substrate -> rc6: add ValidateUnsigned to Babe

* substrate -> rc6: cargo update

* substrate -> rc6: fix rebase fallout

* Removed submodules (#609)

* settlement module moved to main repo

* Import cryptography library from GH via cargo dependency

* Updated CircleCI to not use submodules

* Updated test scirpts to use dummy wasm

* updated cryptography branch

* removed gitignore from settlement folder

* trigger

* run it again

Co-authored-by: Claus Strommer <claus@polymath.network>

* Updated cryptography branch (#612)

* Update max inflation from 20% to 14% (#611)

* change payout_stakers dispatch weight to the 1/4 of the actual weight (#614)

Co-authored-by: satyam <satyam@secureblocks.io>

* Update REWARD_CURVE for testnet (#617)

* mesh-1141: add 'PipsMetadata::transaction_version' (#610)

Co-authored-by: CJP10 <14205938+CJP10@users.noreply.github.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* fix reference problem

* fix linting

* fix tests and remove old reference

Co-authored-by: Joel Moore <47923231+JMoore96@users.noreply.github.com>
Co-authored-by: satyam <satyam@secureblocks.io>
Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>
Co-authored-by: Mudit Gupta <guptamudit@ymail.com>
Co-authored-by: Adam Dossa <adam.dossa@gmail.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>
Co-authored-by: Claus Strommer <63645659+cwsatpolymath@users.noreply.github.com>
Co-authored-by: CJP10 <14205938+CJP10@users.noreply.github.com>
Co-authored-by: Claus Strommer <claus@polymath.network>

Add support for creating confidential assets. (#623)

* Add support for creating confidential assets.

Mint Confidential Assets (#615)

CRYP-160: Integrate confidential asset minting with  Polymesh

base structure of the confidential transfer (#642)

* Integrates confidential transfer
* Update the schema with types for creating an account, minting tokens, and transferring tokens

Cryp 169/end to end test (#683)

* Refactor base64 encodings for account create, mint, and transfer
* Adds extrinsic and storage for mediator account

Co-authored-by: Mudit Gupta <guptamudit@ymail.com>
Co-authored-by: satyam <satyam@secureblocks.io>

[MERCAT] Add support for transaction ordering (#684)

Add support for transaction ordering.

[MERCAT] Some refactoring (#713)

* Address MESH-1331, MESH-1329, and CRYP-173.
* Refactor exectue_instruction function
* Refactor the rng.rs file as a primitive.
* And a few more things.

[MERCAT]: Add pallet docs (#701)

revert the shnorrkel module

fix more conflicts and re-refer to the 2.0.0 sub release

change reference of bulletproofs and curve25519_dalek

crate version fixes (#736)

successful build

fix tests

fix linting

Cryp 187/change mercat dependencies (#792)

* Change the dependencies to cryptography rep
* Point to v2-mainnet branch of cryptography

Co-authored-by: Vladimir Komendantskiy <komendantsky@gmail.com>
Co-authored-by: Francisco Miguel García <fmiguelgarcia@users.noreply.github.com>

Mesh 1523/develop to mercat + MESH-1330 (#897)

* Contracts: upgrade to 3.0.0-rc2 ink! release (#731)

* upgrade to 3.0.0-rc2 ink release

* fix linting

* update readme

Co-authored-by: satyam <satyam@secureblocks.io>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Fixed Document type in schema

* Added an unexpected error event

* Mesh 1289/compliance manager bench (#720)

* Compliance Manager benchmarking added

* More benchs and its verification part

* Source code formatting

* UT compilation errors fixed

* Add limits

* Doc & renaming of types

* Rust fmt applied

* CodeReview: Only complexity can limit

Co-authored-by: Adam Dossa <adam.dossa@gmail.com>

* Fixed Document type in schema (#738)

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* MESH-1365: Add CA + Ballot tests [Part 1] (#728)

* mesh-1365: extend only_caa_authorized with new extrinsics

* mesh-1365: test remove_ca

* mesh-1365: test change_record_date

* mesh-1365: attach_ballot tests

* mesh-1365: Ballot::change_* tests

* mesh-1365: test remove_ballot

* mesh-1365: test vote extrinsic

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Mesh 1349/update permissions (#733)

* wip

* wip

* Added portfolio perms to asset and sto module

* Added asset management permissions

* fixed test

* Fixed primitives test

* Updated schema

* Minor refactoring

* minor refactoring

* added docs

* Added missing perm check

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>
Co-authored-by: Adam Dossa <adam.dossa@gmail.com>

* MESH-1365: Add CA + Ballot + Distribution tests [Part 2] (#740)

* mesh-1365: test distribute

* mesh-1365: rest remove_distribution

* mesh-1365: test reclaim

* mesh-1365: harden sortedness testing

* mesh-1365: test claim + push_benefit

* mesh-1365: unscrew a test

* mesh-1365: TRANGE -> T_RANGE

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>
Co-authored-by: Adam Dossa <adam.dossa@gmail.com>

* MESH-1367: Fix `remove_authorization` logic (#742)

* Fix remove_authorization

* Add additional test and clear context between tests

* Tighten tests with assert_noop

* Fix linting

Co-authored-by: Adam Dossa <adamdossa@Adams-MacBook-Pro.local>

* fix CA.details typo in schema (#745)

* mesh-1374: add reserve_classic_ticker (#746)

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Added receipt metadata (#747)

Co-authored-by: Adam Dossa <adam.dossa@gmail.com>

* atomi add and affirm instruction (#749)

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Added LegacyPermissions as a workaround for a polkadot.js bug (#751)

* Added LegacyPermissions as a workaround for a polkadot.js bug

* reduced duplication

* minor refactoring from review suggestion

* Fixed identity migration

* Fix migrations

* change default type of releases

* Mesh 1300/Settlement benches (#726)

* initial setup for settlement benchmarking

* add update_venue benchmark

* instruction bench

* add benchmark for add_instruction

* benchamrks for settlement added

* add benchamrks for some other extrinsics

* reduce code complexity

* add setup for the affirm_instruction

* fix build

* fix linting

* minor fixes

* add WeightInfo trait

* some rearrangements

* minor modifications

* introduce some more benches and refactor some of parts

* fix test build

* fix linting

Co-authored-by: satyam <satyam@secureblocks.io>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Removed redundant permission (#758)

* Mesh 1324: use scheduler in pips (#704)

* wip

* added ExecutionScheduler and ExpiryScheduler in pips

* removed dependency on pallet_scheduler

* updated pips trait in staking UT

* updated staking mock

* added unique PIP names in the scheduler

* comments and Agenda length assertions in unit tests

* Update pallets/pips/src/lib.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* todo about the Substrate scheduler issue

* Apply suggestions from code review

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* removed duplicate definition

* returning errors from execute_proposal

* assertion of existence of an event matching a pattern

* fixed 8 out of 12 tests

* remove unscheduled pips

* fixed 1 out of 4 tests

* fixed the 0 enactment period scheduled block issue

* Apply suggestions from code review

Co-authored-by: Francisco Miguel García <fmiguelgarcia@users.noreply.github.com>

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>
Co-authored-by: Francisco Miguel García <fmiguelgarcia@users.noreply.github.com>

* Utility Benchmarks (#741)

* Compliance Manager benchmarking added

* More benchs and its verification part

* Source code formatting

* UT compilation errors fixed

* Add limits

* Doc & renaming of types

* Rust fmt applied

* CodeReview: Only complexity can limit

* Utility benchmarks added

* Add relay_tx benchmark

* Fix some errors

* CodeReview: Use No-Op remark in Utility benches

* CodeReview: Remove commented code

* CodeReview: UserBuilder added

Co-authored-by: Adam Dossa <adam.dossa@gmail.com>

* Renaming and minor fixes (#760)

* removed js reserved keywords from variable names

* Updated errors in set_permission_to_signer

* fixed schema

* Add batches to the bridge module (#767)

* Add back batches

* Add schema and CDD logic

* Linting

Co-authored-by: Adam Dossa <adamdossa@Adams-MacBook-Pro.local>

* CalendarPeriod: fix schema (#761)

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Changed validator count to accommodate genesis authorities (#764)

* Changed validator count to accomodate genesis authorities

* Increased epoch duration

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Mesh 1381/contracts benches (#759)

* initialize benchmark

* contract benchmarks initial setup

* finalize contract benches

* add weights for contracts

* fix linting

* Use new functionality of creating the account in benchmarks

* fix tests

* use benchmarked weights

* minor fixes

Co-authored-by: satyam <satyam@secureblocks.io>

* Update Mock CDD Register DID (#756)

* Compliance Manager benchmarking added

* More benchs and its verification part

* Source code formatting

* UT compilation errors fixed

* Add limits

* Doc & renaming of types

* Rust fmt applied

* CodeReview: Only complexity can limit

* Utility benchmarks added

* Add relay_tx benchmark

* Fix some errors

* CodeReview: Use No-Op remark in Utility benches

* CodeReview: Remove commented code

* Migrate CDD_ID mocked creation

* CodeReview: UserBuilder added

* Runtime upgrades based on curr spec version

* Storage version per pallet

* CodeReview: Remove unused from `migrate_cdd_claim`

* Add `Version` type to schema

* CodeReview: Remove multisig migration

* CodeReview: Update <StorageVersion> inside `if`

* Use macro impl for Version (#769)

* Use macros impl for Version

* CodeReview: Comments & Schema

* CodeReview: Remove unused code

* Update pallets/settlement/src/lib.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* Update pallets/asset/src/lib.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* Update pallets/compliance-manager/src/lib.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* Update pallets/identity/src/lib.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* Update pallets/bridge/src/lib.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* Update pallets/identity/src/lib.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* MESH-1393: Refactor snapshots using live queue model (#765)

* mesh-1393: refactor snapshots using live queue

* mesh-1393: address review comments.

* mesh-1393: fix Pip in schema

* mesh-1393: fix chain spec

* mesh-1393: fix integration test

* mesh-1393: add dupe live insert panic test

* mesh-1393: add compare_spip_works test

* mesh-1393: cargo fmt

* committee: embed DispatchResult in Executed (#778)

* Bump systeminformation from 4.27.11 to 4.30.9 in /scripts/cli (#775)

Bumps [systeminformation](https://github.com/sebhildebrandt/systeminformation) from 4.27.11 to 4.30.9.
- [Release notes](https://github.com/sebhildebrandt/systeminformation/releases)
- [Changelog](https://github.com/sebhildebrandt/systeminformation/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sebhildebrandt/systeminformation/commits)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* patch: remove tombstone deposit (#777)

Co-authored-by: satyam <satyam@secureblocks.io>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Mesh 1296/pips benchmarks (#722)

* pips propose benchmark

* cancel_proposal with Community proposer

* added verify blocks + amend_proposal bench

* cleanup and extra assertion

* fixed wasm bench build

* vote and approve_committee_proposal benches

* fixing committee proposal

* #extra benches

* approve_committee_proposal works

* reject_proposal works

* prune_proposal

* prune_proposal works

* reschedule_execution draft

* reschedule_execution works

* fixed reschedule_execution test; clear_snapshot bench

* snapshot works

* enact_snapshot_results

* added pips weight module

* removed deposit variable from propose_from_community

* added pips weight trait

* compilation fixes

* fmt

* removed a bunch of unused bench params

* using a dummy value != 0

* capturing a worser case of vote

* cast_votes bench helper

* elaborated on snapshot and enact benches

* corercted the snapshot queue results and lowered bench param bounds

* lowered bounds even more

* increased the bounds slightly and fixed an assertion failure

* updated the pips weight module

* increased the upper bounds

* replaced bench params with constants + added benches for new extrinsics

* fixed compilation after merge with UserBuilder

* updated pips weight file + fixed assertion in execute_scheduled_pip

* usuccessful attempt to whitelist storage prefixes

* whitelisting voter keys to exclude remove_prefix from weight computation

* updated the weight file

* commented out snapshot and enact_snapshot benches

* removed unused import

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* PTM: Patch for the panic in math operations (#766)

* patch for the panic in math operations

* rename helper function

Co-authored-by: satyam <satyam@secureblocks.io>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Fix schema for protocol fees (#776)

* Fix schema

* typo fix

Co-authored-by: Adam Dossa <adamdossa@Adams-MacBook-Pro.local>
Co-authored-by: Mudit Gupta <guptamudit@ymail.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Add snapshot details to events when snapshot is created (#779)

* Update events

* Neaten

Co-authored-by: Adam Dossa <adamdossa@Adams-MacBook-Pro.local>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Mocked InvestorUid from Cryptographic Library (#780)

* Mocked InvestorUID compliant with UUID v4, generated inside crypto lib.

* Add benchmarks to Confidential (#772)

* Add benchmarks to Confidential

* Remove already executed runtime storage code (#782)

Co-authored-by: Adam Dossa <adamdossa@Adams-MacBook-Pro.local>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* MESH-1388: Reduce chain-spec duplication (#783)

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* Added corporate actions config

Co-authored-by: Mudit Gupta <guptamudit@ymail.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* misc pips cleanup (#784)

Co-authored-by: Mudit Gupta <guptamudit@ymail.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* mesh-1399: declaration date for corporate actions (#785)

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* mesh-1366: nix unused error variants (#787)

* Minor fixes (#786)

* Fixed RecordDateSpec schema

* Replaced pipsorigin (commiteeorigin) with root

* fixed missing permissions error

* Fixed remove_authorizations

* pips and identity benchmark fixes (#788)

* pips benchmark compilation fixes

* identity benchmark fix

Co-authored-by: Mudit Gupta <guptamudit@ymail.com>

* Add benchs to Asset (#762)

Benchmarks on Asset pallet

* Minor fixes and added benchmarks build to CI (#790)

* bye bye referendums

* fixed error codes

* Build binary with benchmarks on CircleCI

* Cleaned up compiler warnings

* Identity benchmark fix

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* MESH-1382/ Same block settlement changes to next block settlement (#763)

* improvement: same block settlement changes to next block settlement

* address fedback comments

* cancel pending executions when affirmation withdraws

* add settlement type check

* minor fixes

* minor fixes

* fix typo

* minor fixes

* event emission

* minor change

Co-authored-by: satyam <satyam@secureblocks.io>

* More minor fixes (#793)

* changed remove_default_trusted_claim_issuer to take issuer identity instead of full object

* verify iu claim only for the receiver

* benchmark build changes

* benchmark build fix

* save cache on success

* Fix testnet authoring_version (#798)

Co-authored-by: Adam Dossa <adamdossa@Adams-MacBook-Pro.local>

* Mesh 1400/update storage hashers (#796)

* wip

* Updated hashers

* Fixed test ordering

Co-authored-by: Adam Dossa <adam.dossa@gmail.com>

* Add benchmarks to balances (#797)

* Add benchmarks to balances

* Bump ini from 1.3.5 to 1.3.8 in /scripts/cli (#806)

Bumps [ini](https://github.com/isaacs/ini) from 1.3.5 to 1.3.8.
- [Release notes](https://github.com/isaacs/ini/releases)
- [Commits](https://github.com/isaacs/ini/compare/v1.3.5...v1.3.8)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Use mocked InvestorUid from crypto (#804)

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Benchmarks in Treasury (#800)

* Add benchmarks to balances

* CodeReview: Remove warnings

* CodeReview: Seed param moved to builder

* Add benchmarks to treasury

* CodeReview: Remove warnings

* Schnorrkel sign as hosted function

* CodeReview: Remove commented code

* CodeReview: Use map instead match

* Update pallets/common/src/benchs/user.rs

CodeReview suggerstion.

* Benchmakrs added to ImOnline (#808)

* Use cryptography's new crate structure (#803)

* Use cryptography's new crate structure

* Increase Max BlockSize & fee

* Fix imports

Co-authored-by: Francisco Miguel García <fmiguelgarcia@users.noreply.github.com>
Co-authored-by: miguel <francisco.miguel.garcia.rodriguez@gmail.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* MESH-1423, MESH-1424, MESH-1425 - Sto and settlement fixes (#807)

* WIP

* Some clean ups

* Fix tests and Claim Receipts logic

* Update pallets/settlement/src/lib.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* Update pallets/settlement/src/lib.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* Fixes and tweaks

* Update pallets/settlement/src/lib.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* Update pallets/settlement/src/lib.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

Co-authored-by: Adam Dossa <adamdossa@Adams-MacBook-Pro.local>
Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Create pull_request_template.md

* Update pull_request_template.md

* Update pull_request_template.md

* Require IU claims for payer and receiver of transfers (#812)

Co-authored-by: Adam Dossa <adamdossa@Adams-MacBook-Pro.local>

* MESH-1409/Add check for zero balance during revoke of IU claim (#809)

* add check for zero balance during revoke of IU claim

* silent the warning for unused variables

* minor nits

* minor re-arrangement

Co-authored-by: satyam <satyam@secureblocks.io>
Co-authored-by: Adam Dossa <adam.dossa@gmail.com>

* MESH-1483: Rename valid_from to trade_date and add value_date (#811)

* Rename valid_from to trade_date and add value_date

* Fix unit tests

* Fix benchmarks

* Remove check on trade_date

Co-authored-by: Adam Dossa <adamdossa@Adams-MacBook-Pro.local>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Add benchmarks to Group pallet (#810)

* Add benchmarks to Group pallet

* minor changes (#813)

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Bump systeminformation from 4.30.9 to 4.32.0 in /scripts/cli (#814)

Bumps [systeminformation](https://github.com/sebhildebrandt/systeminformation) from 4.30.9 to 4.32.0.
- [Release notes](https://github.com/sebhildebrandt/systeminformation/releases)
- [Changelog](https://github.com/sebhildebrandt/systeminformation/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sebhildebrandt/systeminformation/commits)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* MESH-1422: correctly check permissions in batches (#805)

* removed permissions from utility batch + added batch permissions test

* quantifier fix

* event chasing

* batch_secondary_with_permissions passes

* fixed portolio module naming

* test fixed

* Permissions runtime upgrade

* fixes

* added storage migration version

* just remove old storage values

* added const_option

* Portfolio module fix storage upgrade

* review comments

* dedup and comments

* typing

* comment typo fix

* ensure_root_or_signed and minor renaming

* removed cloning

* copy -> move

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* MESH-1387: Corporate Actions Benchmarks (#794)

* mesh-1387: bench set_max_details_length

* mesh-1387: bench reset_caa

* mesh-1387: bench set_default_targets

* mesh-1387: bench set_default_withholding_tax

* mesh-1387: bench set_did_withholding_tax

* mesh-1387: bench initiate_corporate_action

* mesh-1387: bench link_ca_doc

* mesh-1387: bench remove_ca

* mesh-1387: bench change_record_date

* cargo fmt

* mesh-1387: mv ballot.rs -> ballot/mod.rs

* mesh-1387: bench attach_ballot

* mesh-1387: bench change_end

* mesh-1387: bench change_rcv

* mesh-1387: bench remove_ballot

* mesh-1387: bench vote

* mesh-1387: mv distribution.rs -> distribution/mod.rs

* mesh-1387: bench distribute

* mesh-1387: get dist benches working

* mesh-1387: cargo fmt#

* mesh-1387: std-gate set_timestamp

* mesh-1387: assert_ok! -> unwrap

* mesh-1387: cleanup

* mesh-1387: fix rebase fallout

* mesh-1387: inline composite weight fns

* mesh-1387: address review comments

* mesh-1387: move 'user' fn

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* MESH-1413: ASCII-only tickers (#818)

* mesh-1413: ascii-only tickers

* mesh-1413: only printable ascii

* mesh-1413: add test cases

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Fix minor typos (#820)

* Fix minor typos

* Some more comment fixes

* Update pallets/corporate-actions/src/lib.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* Update pallets/corporate-actions/src/lib.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

Co-authored-by: Adam Dossa <adamdossa@Adams-MacBook-Pro.local>
Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* Buffron config changes (#802)

* buffron config

* Updated config

* fixed chainspec

* changed default session keys

* config changes

* new binary

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Remove `IdentityRole` (#830)

* Remove IdentityRole

* CodeReview: Remove migration from `LinkedKeyInfo`

* MESH-1433: Introduce limits for fixed values in CA extrinsic weights (#827)

* mesh-1433: dist benches: quantify did whts

* mesh-1433: introduce limits

* mesh-1433: fix benchmarks

* mesh-1433: test limits

* cargo fmt

* mesh-1433: simplify length checks

Co-authored-by: Francisco Miguel García <fmiguelgarcia@users.noreply.github.com>

Co-authored-by: Francisco Miguel García <fmiguelgarcia@users.noreply.github.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Remove STO, Voting, & Dividend (#826)

* Remove STO, Voting, & Dividend

* Remove STO, Voting, & Dividend

* Add `empty_slot` module

* Remove unused types from schema

* CodeReview: Explicit module index

* CodeReview: privatize `create_at_by`

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* MESH-1095/DocumentHash (#817)

* Document Hash type restricted

* Add migration of `Document`

* Migrate double map with 2 hasher & collect returns

* Migrate only values of AssetDocuments

* Add types to schema

* Add types to schema

* Fix schema

* CodeReview: Remove Clone + Eq

* CodeReview: Removing bounds

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Add benchmarks to permissions (#823)

* Add benchmarks to permissions

* Update pallets/permissions/src/benchmarking.rs

CodeReview: Style

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* Update pallets/permissions/src/benchmarking.rs

CodeReview: Style

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* CodeReview: Replace assert by ensure

* CodeReview: Fix merge

* CodeReview: Rename variable

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* mesh-1357: test pips/staking interaction (#815)

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* removed exemption pallet (#832)

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Add getter to retrieve all the exempted identities (#816)

* add getter to retrieve all the exempted identities

* minor test nit picks

Co-authored-by: satyam <satyam@secureblocks.io>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Mesh 1439/native tms (#829)

* Added base for transfer managers

* wip

* implemented tms

* Integration

* some tests

* wip

* Fixed investor count bug

* Added more tests

* benchmarks

* review comments

* Updated schema

* minor refactoring

* Fixed tests

* minor refactoring

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Remove duplicated schedule event and fix comments (#833)

* Remove duplicated schedule event and fix comments

* Fix warning

* Update to only include new scheduled block in event

* Update pallets/pips/src/lib.rs

Co-authored-by: Mudit Gupta <guptamudit@ymail.com>

Co-authored-by: Adam Dossa <adamdossa@Adams-MacBook-Pro.local>
Co-authored-by: Mudit Gupta <guptamudit@ymail.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Mesh 1373/ Configurable limit on no. of validators for an entity  (#821)

* port 2.0 release changes of substrate staking pallet

* restrict the no. of validators for an indentity

* add test cases

* storage migration

* uncommented tests

* minor feedback's on code comments

* remove uncessary import

* make constructor public

* build fix

* minor improvements

* update dev comment

* change api name

* fix bug

Co-authored-by: satyam <satyam@secureblocks.io>

* MESH-1294/Multisig benchmarks (#743)

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* Fixed identity error in multisig

* WIP

* WIP

* WIP

* WIP

* remove useless multisig create

* fix some comments

* fix rest of comments

* fix rest of comments

* fix rest of comments

* fix macro error and verify errors

* regen weights

* formatting

* bad merge

* formatting

* Update pallets/multisig/src/benchmarking.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* comments

* comments

* WIP: use scheduler

* minor fixes

* scheduler cleanup

* test build fix

* fixed tests

* minor refactoring

* minot comments

* updated code comment

* Added proposal weights to multisig calls

Co-authored-by: Mudit Gupta <guptamudit@ymail.com>
Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Mesh 1383/Settlement Benches (#799)

* remaining benchmarks for settlement

* fix linting

* add contract worst case

* add compliance restriction check for the execute_instruction

* fix the execute_scheduled_instruction extrinsic bench

* add weight traits

* final weight assignments for settlement pallet

* fix linting

* fix settlement test

* cleanup

* supressed warning

* address miguel's feedback

* minor feedback's addressed

* cleanup generate portfolio

* generate different set of conditions

* minor fixes

* fix build

* fix logic bug

* fix bench

* add tms in benchmarks

* add bench numbers

* fix linting

* remove warnings

* supressed warnings

Co-authored-by: satyam <satyam@secureblocks.io>

* Misc cleanups & refactorings, Part 1 (#831)

* simplify committee logic

* move_portfolio_funds: fix atomicity bug

* simplify committee pallet more

* simplify modify_fundraiser_window

* simplify portfolio code

* simplify create_fundraiser

* simplify settlement code

* simplify confidential pallet

* simplify contracts & identity pallets

* simplify asset pallet

* simplify bridge pallet

* cargo fmt

* committee/ensure_did_is_member: use binary search

* committee: extract seat count logic

* cleanup compliance manager & group pallets

* assets: address review comments

* Clean up merge

Co-authored-by: Adam Dossa <adam.dossa@gmail.com>
Co-authored-by: Adam Dossa <adamdossa@Adams-MacBook-Pro.local>

* Update current identity when a key joins a new identity (#835)

* update current identity when key joins a new identity

* split join_identity internal functions

Co-authored-by: Adam Dossa <adam.dossa@gmail.com>

* Misc cleanups & refactorings, Part 2 (#837)

* identity: reduce allocations in remove_secondary_keys

* identity: misc improvements

* simplify multisigs

* simplify permissions

* simplify pips + check perms

* simplify portfolio pallet

* simplify protocol-fee

* cargo fmt

* Fix PIA semantics and forwarded_call permissions (#834)

* simplify committee logic

* move_portfolio_funds: fix atomicity bug

* simplify committee pallet more

* simplify modify_fundraiser_window

* simplify portfolio code

* simplify create_fundraiser

* simplify settlement code

* simplify confidential pallet

* simplify contracts & identity pallets

* simplify asset pallet

* simplify bridge pallet

* cargo fmt

* committee/ensure_did_is_member: use binary search

* committee: extract seat count logic

* cleanup compliance manager & group pallets

* assets: address review comments

* Fix PIA permissions

* Fixes for forwarded calls permissions

* Linting and some test fixes

* More fixes for tests

* Fix benchmarks

* WIP commits

* Add event and fix casing

* linting

* Set PIA back to an Option

* Fix tests

* Fix benchmarks and linting

* Fix tests

* Update pallets/identity/src/lib.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* Fix from merge

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>
Co-authored-by: Adam Dossa <adamdossa@Adams-MacBook-Pro.local>

* Minor refactoring (#847)

* minor refactoring

* Apply suggestions from code review

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* minor optimization

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* MESH-1431/Allow fix rewards (#841)

* allowed fix schedules

* add declaration

* dedup the assert statements

* renaming variables

Co-authored-by: satyam <satyam@secureblocks.io>

* Allow ceiling multiplication in staking (#846)

* allow ceiling multiplication

* specialize the below than 1 case

* fix linting

* apply mudit's suggestion

* fix bug

Co-authored-by: satyam <satyam@secureblocks.io>
Co-authored-by: Adam Dossa <adam.dossa@gmail.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Fix initialisation order and upgrade for PermissionedIdenities (#845)

* Fix initialisation order

* Fix staking upgrade functions

Co-authored-by: Adam Dossa <adamdossa@Adams-MacBook-Pro.local>

* Misc cleanups & refactorings, Part 3 (#843)

* simplify cdd_check

* optimize merge_active_and_inactive

* simplify settlement

* misc refactorings

* nuke dead jurisdiction code

* cargo fmt

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* add schedule instruction weight (#844)

Co-authored-by: satyam <satyam@secureblocks.io>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* reenable slashing (#849)

* MESH-1418/Enforce cdd_id uniqueness (#839)

* enforce cdd_id uniqueness

* address centril's feedbacks

* minor fixes

* minor fix

* fixes tests

Co-authored-by: satyam <satyam@secureblocks.io>
Co-authored-by: Mudit Gupta <guptamudit@ymail.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Refactored Multisig benchmarks (#840)

* removed refunds from multisig

* Added weight for proposal execution

* refactored some benchmarks

* more deduplications

* Added more benchmarks and removed extra fn

* Updated weights

* Added benchmark for proposal execution

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Mesh 1460/STO improvements (#848)

* sto events and status

* minimum investment amount and fundraiser name

* Updated schema

* Fixed unit tests

* minor refactoring

* Update pallets/sto/src/lib.rs

Co-authored-by: Satyam Agrawal <satyam0499@gmail.com>

* Removed unknown fundraiser status

* moved some debug derives to std

Co-authored-by: Satyam Agrawal <satyam0499@gmail.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* cleanup (#850)

* Fixed RPC definitions (#851)

* MESH-1304 Substrate benchmarks (#836)

* Substrate benchmarks added

* updated proof def (#853)

* Mesh 1463/Documentation build fails (#854)

* Substrate benchmarks added

* Add pallet_session benchmark

* Disable `runtime-benchmakrs` feature in default

* MESH-1288 committee benchmarks (#771)

* a couple benches

* set_expires_after bench

* todo

* wip on type inference for pallet instances

* fixed instance type error

* vote_or_propose draft

* set a committee member

* vote_or_propose with variable number of members

* generation of additional proposals

* corrected the expected events on approved proposal

* fixes

* vote draft

* vote bench fixed

* close bench draft

* close bench works

* WIP for propose

* merge fixes in User

* rewrote proposal making

* working on NoSuchProposal

* added committee weight file

* dedup comittee bench

* typing

* typo

* removed commented out code

* Apply suggestions from code review

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* Revert "Apply suggestions from code review"

This reverts commit 08ddcc3ab9cf8ebdc344316cc83c3ca0611405a7.

* review comments

* review comments

* fixed the max number of committee members to 1000

* split vote weight into aye and nay halves

* removed duplicate constant

* fixed typos

* worst-case aye vote

* fixed proposal padding and the member check

* sorted the member dids vec

* reduced the number of members and proposals

* updated the aye voter member index

* vote_aye triggers proposal execution; dev-only constants

* release constants and check of the opposite vote

* reverted committee threshold operator, updated weights

* special case of even number of committee members

* updated committee weights

* fmt

* Update pallets/committee/src/benchmarking.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

Co-authored-by: Adam Dossa <adam.dossa@gmail.com>
Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Initial `make_asset` refactoring (#828)

* Add benchs of exemption pallet

* Fix UT

* CodeReview: `make_asset` to common

* Remove exemption pallet

* CodeReview: Fix settlement bench error after merge

* Update pallets/asset/src/benchmarking.rs

Co-authored-by: Vladimir Komendantskiy <komendantsky@gmail.com>

* Update pallets/asset/src/benchmarking.rs

Co-authored-by: Vladimir Komendantskiy <komendantsky@gmail.com>

* CodeReview: `make_*` returns a result

* re-trigger pipeline

* re-trigger pipeline

Co-authored-by: Vladimir Komendantskiy <komendantsky@gmail.com>

* Mesh 1452/benchs failing (#859)

* Fix statistics benchs & new `running_ci` feature

* Fix identity benchs & add `running-ci` feature

* CodeReview: Fix `running-ci` constant

* Update pallets/identity/src/benchmarking.rs

CodeReview: style fix.

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* Update pallets/identity/src/benchmarking.rs

CodeReview: style.

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* Update pallets/pips/src/benchmarking.rs

CodeReview: Change complexity in PIP with `running-ci`

Co-authored-by: Vladimir Komendantskiy <komendantsky@gmail.com>

* CodeReview: use variable

* CodeReview: Fix the specific `add_transfer_manager`

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>
Co-authored-by: Vladimir Komendantskiy <komendantsky@gmail.com>

* init helper cli (#860)

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* MESH-1468/Add sudo pallet (#861)

* add sudo pallet

* add test suite in circle ci

Co-authored-by: satyam <satyam@secureblocks.io>
Co-authored-by: Adam Dossa <adam.dossa@gmail.com>

* fix initiate_corporate_action weight (#868)

* MESH-1461/Fix underflow/overflow bugs in Asset Identifier Validations (#867)

* WIP

* WIP

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* MESH-1453/Pass legs count in portfolio based extrinsics (#855)

* pass legs count in portfolio based extrinsics

* add fix for add_and_affirm_inst

* fix test suite

* fix benchmark build

* improve test cases

* minor fixes

* fix benchmarks working

* re-trigger pipeline

* minor fixes

* centril's suggestion

* minor re arrangement

* fix integration tests

* bench fixes

Co-authored-by: satyam <satyam@secureblocks.io>

* burn remaining rewards (#865)

Co-authored-by: Adam Dossa <adam.dossa@gmail.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* MESH-1456, MESH-1464, MESH-1459: In committee, nix `close` + only use dynamic threshold (#857)

* mesh-1456: simplify Origin handling

* mesh-1456: add 'type VoteThresholdOrigin'

* mesh-1456: nix close extrinsic

* mesh-1456: Condoned -> Endorsed

* nix MotionDuration

* committee: add migration logic

* PolymeshVotes: nix IdentityId typaram

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Minor refactoring of settlement benchmarks and a bug fix (#856)

* minor refactoring

* wip

* wip

* fixed merge

* Updated instruction execution bench

* updated weights for settlement

* minor refactoring

* bench fix

* Update pallets/settlement/src/lib.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* MESH-1287/Sto Benchmarks (#838)

* WIP

* WIP

* WIP

* WIP

* dedupe

* formatting

* Update pallets/sto/src/benchmarking.rs

Co-authored-by: Vladimir Komendantskiy <komendantsky@gmail.com>

* Update pallets/sto/src/benchmarking.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* comments

* Update pallets/sto/src/benchmarking.rs

Co-authored-by: Mudit Gupta <guptamudit@ymail.com>

* Update pallets/sto/src/benchmarking.rs

Co-authored-by: Mudit Gupta <guptamudit@ymail.com>

* Update primitives/src/ticker.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* Update primitives/src/ticker.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* comments

* comments

* Update pallets/sto/src/benchmarking.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* comments

Co-authored-by: Vladimir Komendantskiy <komendantsky@gmail.com>
Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>
Co-authored-by: Mudit Gupta <guptamudit@ymail.com>

* execute benchmarks in circleci (#875)

* Execute legs in order (#873)

* Added a test case

* execute tx in order

* Added an example edge case to comments

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Fixed minor bugs in sto (#869)

* fixed minor bugs in sto

* updated logic

* Added test case for zero price sto

* Fixed zero balance bug

* Update pallets/sto/src/lib.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* dedup invest call

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* `adjust_live_queue`: fix sort order bug (#880)

* adjust_live_queue: fix sort order bug

* adjust_live_queue: simplify code

* MESH-1489 (CP schedule ref counting) + MESH-1488 (CP schedule expiry-after-ticks) (#882)

* mesh-1489: ref count CP schedules

* mesh-1488: impl schedule expiry

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Wasm Builder as external crate (#876)

* Use external wasm builder

* Use builder revision

* Fix `syn::export::TokenStream2` error

* Update WASM_BINARY generated type

* CodeReview: Remove commented code

* CodeReview: Panic if wasm binary was not generated

* CodeReview: Dedup build

* MESH-1446/ Fix Genesis config ordering (#883)

* Fix Genesis ordering

* Fix Genesis ordering on testnet

* Mitigate overflow (#890)

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Benchmark refactoring (#877)

* renaming of some benchmark vars

* fix wasm execution of ca bench

* dedup iu claim mocking

* Fixed node-bench compilation

* wip

* updated weights

* fixed auto generated weights

* Updated base fees

* Updated weight files to use our constants

* imporved crypto-cli

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Allow receipt signers to invalidate receipts (#878)

* Allow receipt signers to invalidate receipts

* dedup

* Addressed review comments

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Audit 8: Mitigate overflow (#887)

* Mitigate overflow

* New `TooMuchSigners` error

* Update pallets/multisig/src/lib.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* Update pallets/multisig/src/lib.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Updated docs pipeline (#892)

* Updaed docs pipeline

* enabled docs building on patch branch to test

* build dummy wasm binaries

* removed test job

* MESH-1251/ Expose controller transfer as an extrinsic (#879)

* expose controller transfer as an extrinsic

* trigger concourse

* apply suggested changes

* remove controller redemption event

Co-authored-by: satyam <satyam@secureblocks.io>

* Upgrade to Substrate's Polymath fork

* Recover benchmark compilation

* Audit 7: Mitigate Overflow (#889)

* Mitigate overflow

* CodeReview: Error when total price tiers overflows

* Remove some warnings

* CodeReview: Use try_fold

* Update pallets/sto/src/lib.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* CodeReview: Inferrable param

* re-trigger pipeline

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* Impl Simple FIFO with Priority = tip

* SignedExtension for FIFO by priority

* MESH-1397 live queue pips benches + MESH-1395 + MESH-1507 (#822)

* draft snapshot and enact benches

* assert -> ensure

* fixed snapshot setup in enact_snapshot_results

* added pips weights with live queue feature

* minor fix for vector allocation capacity

* added differentiation between Skip, Reject and Approve results

* added 2 comments from older review

* typing fixes

* refactored using User methods

* WIP fails to prune historical pips

* debugging expire_scheduled_pip with set_prune_historical_pips=true

* returned T::Proposal since runtime::Call doesn't unify with it

* expire_scheduled_pip UT works

* fixed pips benchmark panic

* attempt to define dependent ranges

* using plain, independent ranges

* shuffled approve/reject/skip

* added constant for max skipped pip count

* review comment + some debugging

* debug info

* adjust_live_queue: fix sort order bug

* adjust_live_queue: simplify code

* removed debug prints and added a test for execute_scheduled_pip

* updated pips weights

* removed debug code

* moved make_remark_proposal centrally

* capped weight of enact_snapshot_results at MaximumBlockWeight

* introduced new constant for the max weight of enact_snapshot_results

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* TX priority = tip, Unit Tests

* Merge pull request #874 from PolymathNetwork/MESH-1467/Script-to-give-USDP-to-existing-DIDs-on-Alcyone

Mesh 1467/script to give ALCY to existing DIDs on Alcyone

* Upgrade substrate and rust + add code coverage (#886)

* upgraded references to substrate

* patch for syn's api breaking change

* Upgraded cryptography dependency

* Upgraded rust version

* coverage script

* wip

* wip

* Added code coverage to ci

* updated script

* Updated coverage script

* source-coverage

Remove trailing newline from rust-toolchain file

* Updated script

* attempt #358

* re-trigger pipeline

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* updated coverage script

* use unsigned for balances

* Updated path ignores in coverage

* updated scripts

* formating

* fixed new benchmarks

Co-authored-by: Claus Strommer <claus@polymath.network>

* MESH-1490: Checkpoint benchmarks (#891)

* cleanup asset benchs

* mesh-1490: {checkpoint -> checkpoint/mod}.rs

* benchs: cleanup cfgs

* mesh-1490: benchmark checkpoints

* mesh-1490: address review comments

* mesh-1490: use schedule_max_complexity

* fix rebase fallout

* Added codecov config (#896)

* Added codecov config

* caching fixes

* `CheckWeight` re-implemented on polymesh

* Fmt fix

* cargo fixes

* Override some default polkadot types (#895)

* override some default polkadot types

* updated cli dependencies

* Trigger ci

* Remove parity substrate deps

* Temporary CI update

* moved asset types to polymesh-primitives

* Revert temporary CI update

* added asset in primitives

* cargo fixes

* benchmarking fixes

* Update primitives/src/asset.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* removed unused defs and added doc comments

* fmt

* CodeReview: More comments

* comments on terminology

* Update pallets/runtime/extensions/src/check_weight.rs

Co-authored-by: Vladimir Komendantskiy <komendantsky@gmail.com>

* Update pallets/runtime/extensions/src/check_weight.rs

Co-authored-by: Vladimir Komendantskiy <komendantsky@gmail.com>

* explicit typing

* typo fix and fmt

* removed duplicate typedefs from asset pallet, added docs

* fixed import

* cleaned up confidential-asset Cargo.toml

* Mesh 1301 / Fix staking benches (#881)

* initial commit

* add benches for newly added functions

* fix staking benches

* minor improvements

* fix payout stakers

* fix linting

* minor fix in benchmarks compliation

* add weight file

* update weight definitions of extrinsics

* add bench for some remaining extrinsics

* remove weight mod reference

* minor fixes

* bench build fix

* fix bench build

* final-fix

* remove default implementation

Co-authored-by: satyam <satyam@secureblocks.io>
Co-authored-by: Mudit Gupta <guptamudit@ymail.com>

* Moved asset types to polymesh-primitives (#898)

* moved asset types to polymesh-primitives

* added asset in primitives

* benchmarking fixes

* Update primitives/src/asset.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* removed unused defs and added doc comments

* fmt

* comments on terminology

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>
Co-authored-by: Adam Dossa <adam.dossa@gmail.com>

* mostly (confidential) asset fixes

* CircleCI changes (#901)

* CircleCI go brrr

* minor optimizations

* updated caching

* fixed bench

* final run

* refactored settlement Leg and implemented execute_instruction failure reasons MESH-1330

* MESH-1531: Fix Checkpoint.timestamps into double map keyed by `Ticker` (#899)

* mesh-1531: add repro test

* mesh-1531: repro -> regression test

* mesh-1531: add storage migration

* cargo fmt

* mesh-1531: twox -> blake2

* mesh-1531: everybody gets double maps

Co-authored-by: Adam Dossa <adam.dossa@gmail.com>

* MESH-1518/Upgrade to Substrate's Polymath fork (#893)

* Upgrade to Substrate's Polymath fork

* Recover benchmark compilation

* Impl Simple FIFO with Priority = tip

* SignedExtension for FIFO by priority

* TX priority = tip, Unit Tests

* `CheckWeight` re-implemented on polymesh

* Fmt fix

* Remove parity substrate deps

* Temporary CI update

* Revert temporary CI update

* CodeReview: More comments

* Update pallets/runtime/extensions/src/check_weight.rs

Co-authored-by: Vladimir Komendantskiy <komendantsky@gmail.com>

* Update pallets/runtime/extensions/src/check_weight.rs

Co-authored-by: Vladimir Komendantskiy <komendantsky@gmail.com>

Co-authored-by: Vladimir Komendantskiy <komendantsky@gmail.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* fixed issues with affirm_confidential_instruction

* fixed confidential-asset Cargo.toml

* fixed some merge bugs in settlement

* fixed compile-time errors in settlement

* fixed errors in sto

* added ConfidentialAsset in construct_runtime

* typo in testnet runtime

* typo in develop runtime

* Storage migration tests (#900)

* wip

* wip

* wip

* cleanup

* more cleanup

* wip

* restructure

* moving things around

* assert

* minor cleanup

* feature gate migrations

* fixed warnings

* Update migration-tests/src/lib.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* Added checkpoints migration tests

* fixed merge conflict

* Added support for different substrate versions

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* commented out unused imports

* reenabled old versions of packages in migration

* Removed unnecessary constraints (#905)

* removed unnecessary constraints

* fixed settlement benchmarks

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* fixed confidential-asset imports in runtimes

* MESH-1473/Create a list of transactions that require Asset/Portfolio permissions (#894)

* WIP

* WIP

* Update utils/permissions/Cargo.toml

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* WIP

* WIP

* Update utils/permissions/src/doc_parser/enums.rs

Co-authored-by: Francisco Miguel García <fmiguelgarcia@users.noreply.github.com>

* crate docs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>
Co-authored-by: Francisco Miguel García <fmiguelgarcia@users.noreply.github.com>

* Add modify window event and stop event to STO (#903)

* add modify window event and stop event

* Update pallets/sto/src/lib.rs

Co-authored-by: Mudit Gupta <guptamudit@ymail.com>

* Update pallets/sto/src/lib.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* Update pallets/sto/src/lib.rs

Co-authored-by: Mudit Gupta <guptamudit@ymail.com>

* fix build

* add CloseEarly status

* updated schema

* fixed benchmarks

Co-authored-by: Mudit Gupta <guptamudit@ymail.com>
Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Added support for H2 tag perms (#907)

* Added support for H2 tag perms

* closure

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* settlement runtime test fixes

* MESH-1533/Require minimum 1 POLYX bond (#910)

* WIP

* minor changes

Co-authored-by: Mudit Gupta <guptamudit@ymail.com>

* bond 1 polyx in integration tests (#911)

* fixed ValidatorPrefsWithBlocked hack (#913)

* MESH-1379/permission logic integration test (#852)

* added createPortfolio function, modified 4_permission_management and minor change in init.js

* minor changes

* added movePortfolioFunds  function

* added setPortfolio and setExtrinsic functions

* added functions for creating documents and setting asset permissions

* minor changes

* minor change

* minor change

* Trigger Build

* minor change

* fixed minor indentation issue

Co-authored-by: Vladimir Komendantskiy <komendantsky@gmail.com>

Co-authored-by: Vladimir Komendantskiy <komendantsky@gmail.com>
Co-authored-by: Adam Dossa <adam.dossa@gmail.com>

* fixed non-confidential asset tests

* minting tokens when creating non-confidential assets only; no impact on failing tests

* benchmarks std fix

* fixed a few imports

* Script to simplify running JS integration tests  (#902)

* added script

* minor change

* minor changes

* fixed a confidential asset runtime test account_create_tx

* fixed confidential asset tests

* Update Polymesh's subrtrate version to 2.0.1-2 (#909)

* Update Polymesh's subrtrate version

* TX pool drop unpropagable tx if node is not author blocks

Co-authored-by: Mudit Gupta <guptamudit@ymail.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* removed unused imports

* removed unused import in asset

* MESH-1508, MESH-1469: Add Jurisdictions and clean up README.md (#917)

* Clean Ups

* fixed typos

* Update README.md

Co-authored-by: Vladimir Komendantskiy <komendantsky@gmail.com>

* Update primitives/src/jurisdiction.rs

Co-authored-by: Vladimir Komendantskiy <komendantsky@gmail.com>

* line breaks

Co-authored-by: Mudit Gupta <guptamudit@ymail.com>
Co-authored-by: Vladimir Komendantskiy <komendantsky@gmail.com>

* fixed permission issues in confidential asset tests

* misc refactorings

* fixed build error

* transaction ordering runtime test fixes

* add debugging

* fix failing tests: go to next block after rejecting instruction

* refactored balance decryption

* fixed schema typo

* corrected leg defs in settlement integration tests

* cleanup integration tests blocking

* Allow tipping for Operational TX from CDD/GC member (#918)

* Allow tipping for Operational TX from CDD/GC member

* re-trigger pipeline

* CodeReview fixes

* CodeReview: Improve comment

* CodeReview: consistensy

* CodeReview fix

* JS syntax fixes

* more JS syntax fixes

* removed commented code

Co-authored-by: Satyam Agrawal <satyam0499@gmail.com>
Co-authored-by: satyam <satyam@secureblocks.io>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>
Co-authored-by: Mudit Gupta <guptamudit@ymail.com>
Co-authored-by: Francisco Miguel García <fmiguelgarcia@users.noreply.github.com>
Co-authored-by: Adam Dossa <adam.dossa@gmail.com>
Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>
Co-authored-by: Adam Dossa <adamdossa@Adams-MacBook-Pro.local>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Parnian <60563484+ParnianAlimi@users.noreply.github.com>
Co-authored-by: miguel <francisco.miguel.garcia.rodriguez@gmail.com>
Co-authored-by: Joel M…
Neopallium pushed a commit that referenced this pull request May 2, 2023
* Adds an empty confidential asset pallet

Integrate mercat account (#584)

* Add mercat account creation and verification
* Emit account creation event
* Update the cryptography submodule

Weekly Task: Develop to Mercat (#619)

* added clippy script to CI

* added clippy test to dev pr pipeline

* MESH-1233/Rebase-Fees (#572)

* rebase weights

* fix linting

Co-authored-by: satyam <satyam@secureblocks.io>

* MESH-1216: `get_valid_payer`: only accept `AccountId`. (#573)

* mesh-1216: `get_valid_payer`: only accept `AccountId`.

Also do some code cleanup & refactoring.

* refactor fee_details some more

* mesh-1228: mv pallets/runtime/{testnet-v1 -> testnet}

* mesh-1228: rename crate & fix comments

* ci: testnet-v1 -> testnet

* minor change

* added clippy test to the rest of the pipelines

* Atomically create and authorize instructions (#567)

* Added venue type

* schema update

* cli update

* submodule update

* submodule to master branch

* MESH-1232/Remove smart extension api (#558)

* add remove smart extension api

* suggested change applied

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* re-reference to right commit hash for settlement

* Trigger notification

Co-authored-by: satyam <satyam@secureblocks.io>
Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>
Co-authored-by: Adam Dossa <adam.dossa@gmail.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* MESH-1235/remove batch functions (#578)

* remove batch functions

* remove bridge batch functions

Co-authored-by: satyam <satyam@secureblocks.io>

* MESH-1240, MESH-1239, MESH-1238 (#579)

* mesh-1239: move proposer & cool_off_until to Pip

* mesh-1238: add SnapshotId to metadata

* mesh-1240: cache list of committee pips

* MESH-1231: add `get_key_id_data` rpc call (#569)

* mesh-1231: add get_key_id_data rpc call

* mesh-1231: add `KeyIdData` to polymesh_schema

* mesh-1231: key_id -> key_identity

* mesh-1231: address review comments

Co-authored-by: Adam Dossa <adam.dossa@gmail.com>

* Fix asset RPC (#562)

* fix asset rpc

* lint fixing

* comment updated

Co-authored-by: satyam <satyam@secureblocks.io>

* added sendTx to JS Scripts (#585)

Co-authored-by: Adam Dossa <adam.dossa@gmail.com>

* mesh-1236: remove_authorization -> payer: authorized_by (#574)

* DEVOPS-211 (#576)

* DEVOPS-211

* Use `load_var` to read the `rust-toolchain` contents into a variable
* Use the `rust-toolchain` variable to specify the desired Rust
  container

* DEVOPS-211

* Fix variable reference

* DEVOPS-211

* debug

* DEVOPS-211

debug

* DEVOPS-211

Remove trailing newline from `rust-toolchain` file

* DEVOPS-211

* Add rust toolchain selection to develop and tooling pipelines

* DEVOPS-211

* Bugfix

* DEVOPS-211

* Remove `serial` requirement for pipelines in favour of per-worker
  container placement strategy (DEVOPS-212)
* Remove debug configuration

* DEVOPS-211

Integrate changes from DEVOPS-209

* DEVOPS-211

* Use `load_var` to read the `rust-toolchain` contents into a variable
* Use the `rust-toolchain` variable to specify the desired Rust
  container

* DEVOPS-211

* Fix variable reference

* DEVOPS-211

* debug

* DEVOPS-211

debug

* DEVOPS-211

Remove trailing newline from `rust-toolchain` file

* DEVOPS-211

* Add rust toolchain selection to develop and tooling pipelines

* DEVOPS-211

* Bugfix

* DEVOPS-211

* Remove `serial` requirement for pipelines in favour of per-worker
  container placement strategy (DEVOPS-212)
* Remove debug configuration

* DEVOPS-211

Integrate changes from DEVOPS-209

* DEVOPS-211

* Use `load_var` to read the `rust-toolchain` contents into a variable
* Use the `rust-toolchain` variable to specify the desired Rust
  container

* DEVOPS-211

* Fix variable reference

* DEVOPS-211

* debug

* DEVOPS-211

debug

* DEVOPS-211

* Add rust toolchain selection to develop and tooling pipelines

* DEVOPS-211

* Bugfix

* DEVOPS-211

* Remove `serial` requirement for pipelines in favour of per-worker
  container placement strategy (DEVOPS-212)
* Remove debug configuration

* DEVOPS-211

* Fix clippy step inputs

Co-authored-by: Adam Dossa <adam.dossa@gmail.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* MESH-1252 & MESH-1253 (#590)

* mesh-1253: add `created_at: BlockNumber` to `PipsMetadata`.

* mesh-1252: Add `SnapshotId` to `SnapshotResultsEnacted`.

* mesh-1250: `on_runtime_upgrade`, clear V1 PIPs storage. (#591)

* Update readme and genesis files (#593)

* Update README.md (#594)

* MESH-1244: add `#[migrate_from($ty_old)]` form to `#[derive(Migrate)]`. (#592)

* mesh-1244: add `#[migrate_from($ty_old)]` form to `#[derive(Migrate)]`.

* mesh-1244: simplify `extract_migrate_refs` using `get_ident`.

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* DEVOPS-220/alcyone-pipelines (#582)

* Add `alcyone` pipelines.
* Make the `alcyone` pipelines bump versions
* Make `tooling` pipelines not bump versions
* Change PR artifact labeling to distinguish between `develop` and
  `tooling` artifacts

Co-authored-by: Adam Dossa <adam.dossa@gmail.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* MESH-1166/Scope of Claim refactor (#560)

* first go

* Update base.rs

* fix non-settlement tests

* first go at upgrade

* fix bad submodule

* formatting

* fix bad merge

* formatting

* submodule bump

* Update primitives/src/identity_claim.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* upgrade compliance manager storage

* update schema

* wip

* wip

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>
Co-authored-by: Adam Dossa <adam.dossa@gmail.com>

* DEVOPS-174/purge-cache (#595)

* DEVOPS-174/purge-cache

* Add cargo-sweep to cached rust tasks

* DEVOPS-174/purge-cache

* Fix `cargo test` / `cargo sweep`

* DEVOPS-174/purge-cache

* DEVOPS-227 / reduce `npm test` noise

* DEVOPS-174/purge-cache

DEVOPS-228: improve timeout conditions

* Move the `npm test` timeout inside the script and use coreutils
  timeout instead
* Remove archived `master` pipelines

* DEVOPS-174/purge-cache

* More aggressive cache purging
* Fix `npm test` redirect bug

* DEVOPS-174/purge-cache

* Remove timeout from alcyone pipelines
* Set tooling pipelines to not `put` semver updates

* DEVOPS-174/purge-cache

* Reset cargo cache when it reaches 10GB

* DEVOPS-174/purge-cache

* Handle undeletable `target/` directory (because it's a volume mount)

Co-authored-by: Adam Dossa <adam.dossa@gmail.com>

* MESH-1074/Enforce scope claim to assets transfer (#583)

* enforce scope claim to assets

* Centril: feedback addressed

* fix linting

* fix: avoid returning default as true for sender

* add implicit requirements within the granular_verification

* update schema

* add additional test

* use doc comments

* simplify rpc

* remove debug from wasm

* code rearrangement

* minor improvement

* lint fix

Co-authored-by: satyam <satyam@secureblocks.io>
Co-authored-by: Adam Dossa <adam.dossa@gmail.com>

* removed staking fuzzer from workplace (#597)

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* mesh-1243: add migrate_double_map_keys (#604)

* DEVOPS-232/move-polymesh-pipelines (#602)

* DEVOPS-232/move-polymesh-pipelines

* Remove deprecated Concourse files

* trigger

* DEVOPS-232/move-polymesh-pipelines

* Missing && in cli test

* trigger

* trigger

* DEVOPS-232/move-polymesh-pipelines

Undo 0c69bbd7965b2546bee457bcebb1bc09324c2763

* DEVOPS-232/move-polymesh-pipelines

Update CODEOWNERS file

Co-authored-by: Adam Dossa <adam.dossa@gmail.com>

* MESH-1257: Runtime upgrade functionality for CDD_ID. (#600)

* mesh-1257: Runtime upgrade functionality for CDD_ID.

This amends `Migrate` with `type Context`.
To `derive(Migrate)` we add `migrate_context`, `migrate_with`,
and `migrate_from` on enum variants.

* mesh-1257: more migrate_context docs

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Update README (#605)

* MESH-1262: Infer `Proposer<_>` from `origin` on `Pips::propose`. (#606)

* mesh-1262: infer proposer from origin on `Pips::propose`.

* mesh-1262: fix governance js test

* Portfolio, Custodianship, and Settlement changes (#518)

* Portfolio custodian

* accept portfolio custody

* tests fixed

* removed dispatchables for old custody approach

* wip

* merge fixes

* verify_portfolio

* wip

* added portoflio transfer fn

* lock unlock tokens

* build fix

* wip

* custodian check

* wip

* portfolio subtrait

* wip

* wip

* rpc fixed

* submodule update

* schema update

* wip

* cli fix

* use PortfolioId in PortfolioCustody auth

* minor refactoring

* parameter reordering

* submodule update

* api for moving portfolio funds updated

* Documentation wip

* fixed tests

* Added token lock and custody tests

* some code comments

* wip

* wip

* refactored tests

* settlement tests

* import fix

* Added settlement tests

* removed mut

* copy schema script

* fixed tests

* updated submodule

* Removed internal transfer function

* cleaned up comments

* review suggestions

Co-authored-by: Satyam Agrawal <satyam0499@gmail.com>

* Bump substrate rc4 => rc5+2 => rc6 (#587)

* substrate: rc4 -> rc5+2 in deps

* substrate upgrade -> rc5: fix fallout

* substrate: rc5+2 -> rc6 in deps

* substrate upgrade -> rc6: fix fallout

* substrate upgrade: bump another crate to rc6

* substrate -> rc6: cleanup

* substrate -> rc6: add ValidateUnsigned to Babe

* substrate -> rc6: cargo update

* substrate -> rc6: fix rebase fallout

* Removed submodules (#609)

* settlement module moved to main repo

* Import cryptography library from GH via cargo dependency

* Updated CircleCI to not use submodules

* Updated test scirpts to use dummy wasm

* updated cryptography branch

* removed gitignore from settlement folder

* trigger

* run it again

Co-authored-by: Claus Strommer <claus@polymath.network>

* Updated cryptography branch (#612)

* Update max inflation from 20% to 14% (#611)

* change payout_stakers dispatch weight to the 1/4 of the actual weight (#614)

Co-authored-by: satyam <satyam@secureblocks.io>

* Update REWARD_CURVE for testnet (#617)

* mesh-1141: add 'PipsMetadata::transaction_version' (#610)

Co-authored-by: CJP10 <14205938+CJP10@users.noreply.github.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* fix reference problem

* fix linting

* fix tests and remove old reference

Co-authored-by: Joel Moore <47923231+JMoore96@users.noreply.github.com>
Co-authored-by: satyam <satyam@secureblocks.io>
Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>
Co-authored-by: Mudit Gupta <guptamudit@ymail.com>
Co-authored-by: Adam Dossa <adam.dossa@gmail.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>
Co-authored-by: Claus Strommer <63645659+cwsatpolymath@users.noreply.github.com>
Co-authored-by: CJP10 <14205938+CJP10@users.noreply.github.com>
Co-authored-by: Claus Strommer <claus@polymath.network>

Add support for creating confidential assets. (#623)

* Add support for creating confidential assets.

Mint Confidential Assets (#615)

CRYP-160: Integrate confidential asset minting with  Polymesh

base structure of the confidential transfer (#642)

* Integrates confidential transfer
* Update the schema with types for creating an account, minting tokens, and transferring tokens

Cryp 169/end to end test (#683)

* Refactor base64 encodings for account create, mint, and transfer
* Adds extrinsic and storage for mediator account

Co-authored-by: Mudit Gupta <guptamudit@ymail.com>
Co-authored-by: satyam <satyam@secureblocks.io>

[MERCAT] Add support for transaction ordering (#684)

Add support for transaction ordering.

[MERCAT] Some refactoring (#713)

* Address MESH-1331, MESH-1329, and CRYP-173.
* Refactor exectue_instruction function
* Refactor the rng.rs file as a primitive.
* And a few more things.

[MERCAT]: Add pallet docs (#701)

revert the shnorrkel module

fix more conflicts and re-refer to the 2.0.0 sub release

change reference of bulletproofs and curve25519_dalek

crate version fixes (#736)

successful build

fix tests

fix linting

Cryp 187/change mercat dependencies (#792)

* Change the dependencies to cryptography rep
* Point to v2-mainnet branch of cryptography

Co-authored-by: Vladimir Komendantskiy <komendantsky@gmail.com>
Co-authored-by: Francisco Miguel García <fmiguelgarcia@users.noreply.github.com>

Mesh 1523/develop to mercat + MESH-1330 (#897)

* Contracts: upgrade to 3.0.0-rc2 ink! release (#731)

* upgrade to 3.0.0-rc2 ink release

* fix linting

* update readme

Co-authored-by: satyam <satyam@secureblocks.io>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Fixed Document type in schema

* Added an unexpected error event

* Mesh 1289/compliance manager bench (#720)

* Compliance Manager benchmarking added

* More benchs and its verification part

* Source code formatting

* UT compilation errors fixed

* Add limits

* Doc & renaming of types

* Rust fmt applied

* CodeReview: Only complexity can limit

Co-authored-by: Adam Dossa <adam.dossa@gmail.com>

* Fixed Document type in schema (#738)

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* MESH-1365: Add CA + Ballot tests [Part 1] (#728)

* mesh-1365: extend only_caa_authorized with new extrinsics

* mesh-1365: test remove_ca

* mesh-1365: test change_record_date

* mesh-1365: attach_ballot tests

* mesh-1365: Ballot::change_* tests

* mesh-1365: test remove_ballot

* mesh-1365: test vote extrinsic

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Mesh 1349/update permissions (#733)

* wip

* wip

* Added portfolio perms to asset and sto module

* Added asset management permissions

* fixed test

* Fixed primitives test

* Updated schema

* Minor refactoring

* minor refactoring

* added docs

* Added missing perm check

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>
Co-authored-by: Adam Dossa <adam.dossa@gmail.com>

* MESH-1365: Add CA + Ballot + Distribution tests [Part 2] (#740)

* mesh-1365: test distribute

* mesh-1365: rest remove_distribution

* mesh-1365: test reclaim

* mesh-1365: harden sortedness testing

* mesh-1365: test claim + push_benefit

* mesh-1365: unscrew a test

* mesh-1365: TRANGE -> T_RANGE

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>
Co-authored-by: Adam Dossa <adam.dossa@gmail.com>

* MESH-1367: Fix `remove_authorization` logic (#742)

* Fix remove_authorization

* Add additional test and clear context between tests

* Tighten tests with assert_noop

* Fix linting

Co-authored-by: Adam Dossa <adamdossa@Adams-MacBook-Pro.local>

* fix CA.details typo in schema (#745)

* mesh-1374: add reserve_classic_ticker (#746)

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Added receipt metadata (#747)

Co-authored-by: Adam Dossa <adam.dossa@gmail.com>

* atomi add and affirm instruction (#749)

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Added LegacyPermissions as a workaround for a polkadot.js bug (#751)

* Added LegacyPermissions as a workaround for a polkadot.js bug

* reduced duplication

* minor refactoring from review suggestion

* Fixed identity migration

* Fix migrations

* change default type of releases

* Mesh 1300/Settlement benches (#726)

* initial setup for settlement benchmarking

* add update_venue benchmark

* instruction bench

* add benchmark for add_instruction

* benchamrks for settlement added

* add benchamrks for some other extrinsics

* reduce code complexity

* add setup for the affirm_instruction

* fix build

* fix linting

* minor fixes

* add WeightInfo trait

* some rearrangements

* minor modifications

* introduce some more benches and refactor some of parts

* fix test build

* fix linting

Co-authored-by: satyam <satyam@secureblocks.io>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Removed redundant permission (#758)

* Mesh 1324: use scheduler in pips (#704)

* wip

* added ExecutionScheduler and ExpiryScheduler in pips

* removed dependency on pallet_scheduler

* updated pips trait in staking UT

* updated staking mock

* added unique PIP names in the scheduler

* comments and Agenda length assertions in unit tests

* Update pallets/pips/src/lib.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* todo about the Substrate scheduler issue

* Apply suggestions from code review

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* removed duplicate definition

* returning errors from execute_proposal

* assertion of existence of an event matching a pattern

* fixed 8 out of 12 tests

* remove unscheduled pips

* fixed 1 out of 4 tests

* fixed the 0 enactment period scheduled block issue

* Apply suggestions from code review

Co-authored-by: Francisco Miguel García <fmiguelgarcia@users.noreply.github.com>

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>
Co-authored-by: Francisco Miguel García <fmiguelgarcia@users.noreply.github.com>

* Utility Benchmarks (#741)

* Compliance Manager benchmarking added

* More benchs and its verification part

* Source code formatting

* UT compilation errors fixed

* Add limits

* Doc & renaming of types

* Rust fmt applied

* CodeReview: Only complexity can limit

* Utility benchmarks added

* Add relay_tx benchmark

* Fix some errors

* CodeReview: Use No-Op remark in Utility benches

* CodeReview: Remove commented code

* CodeReview: UserBuilder added

Co-authored-by: Adam Dossa <adam.dossa@gmail.com>

* Renaming and minor fixes (#760)

* removed js reserved keywords from variable names

* Updated errors in set_permission_to_signer

* fixed schema

* Add batches to the bridge module (#767)

* Add back batches

* Add schema and CDD logic

* Linting

Co-authored-by: Adam Dossa <adamdossa@Adams-MacBook-Pro.local>

* CalendarPeriod: fix schema (#761)

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Changed validator count to accommodate genesis authorities (#764)

* Changed validator count to accomodate genesis authorities

* Increased epoch duration

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Mesh 1381/contracts benches (#759)

* initialize benchmark

* contract benchmarks initial setup

* finalize contract benches

* add weights for contracts

* fix linting

* Use new functionality of creating the account in benchmarks

* fix tests

* use benchmarked weights

* minor fixes

Co-authored-by: satyam <satyam@secureblocks.io>

* Update Mock CDD Register DID (#756)

* Compliance Manager benchmarking added

* More benchs and its verification part

* Source code formatting

* UT compilation errors fixed

* Add limits

* Doc & renaming of types

* Rust fmt applied

* CodeReview: Only complexity can limit

* Utility benchmarks added

* Add relay_tx benchmark

* Fix some errors

* CodeReview: Use No-Op remark in Utility benches

* CodeReview: Remove commented code

* Migrate CDD_ID mocked creation

* CodeReview: UserBuilder added

* Runtime upgrades based on curr spec version

* Storage version per pallet

* CodeReview: Remove unused from `migrate_cdd_claim`

* Add `Version` type to schema

* CodeReview: Remove multisig migration

* CodeReview: Update <StorageVersion> inside `if`

* Use macro impl for Version (#769)

* Use macros impl for Version

* CodeReview: Comments & Schema

* CodeReview: Remove unused code

* Update pallets/settlement/src/lib.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* Update pallets/asset/src/lib.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* Update pallets/compliance-manager/src/lib.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* Update pallets/identity/src/lib.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* Update pallets/bridge/src/lib.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* Update pallets/identity/src/lib.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* MESH-1393: Refactor snapshots using live queue model (#765)

* mesh-1393: refactor snapshots using live queue

* mesh-1393: address review comments.

* mesh-1393: fix Pip in schema

* mesh-1393: fix chain spec

* mesh-1393: fix integration test

* mesh-1393: add dupe live insert panic test

* mesh-1393: add compare_spip_works test

* mesh-1393: cargo fmt

* committee: embed DispatchResult in Executed (#778)

* Bump systeminformation from 4.27.11 to 4.30.9 in /scripts/cli (#775)

Bumps [systeminformation](https://github.com/sebhildebrandt/systeminformation) from 4.27.11 to 4.30.9.
- [Release notes](https://github.com/sebhildebrandt/systeminformation/releases)
- [Changelog](https://github.com/sebhildebrandt/systeminformation/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sebhildebrandt/systeminformation/commits)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* patch: remove tombstone deposit (#777)

Co-authored-by: satyam <satyam@secureblocks.io>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Mesh 1296/pips benchmarks (#722)

* pips propose benchmark

* cancel_proposal with Community proposer

* added verify blocks + amend_proposal bench

* cleanup and extra assertion

* fixed wasm bench build

* vote and approve_committee_proposal benches

* fixing committee proposal

* #extra benches

* approve_committee_proposal works

* reject_proposal works

* prune_proposal

* prune_proposal works

* reschedule_execution draft

* reschedule_execution works

* fixed reschedule_execution test; clear_snapshot bench

* snapshot works

* enact_snapshot_results

* added pips weight module

* removed deposit variable from propose_from_community

* added pips weight trait

* compilation fixes

* fmt

* removed a bunch of unused bench params

* using a dummy value != 0

* capturing a worser case of vote

* cast_votes bench helper

* elaborated on snapshot and enact benches

* corercted the snapshot queue results and lowered bench param bounds

* lowered bounds even more

* increased the bounds slightly and fixed an assertion failure

* updated the pips weight module

* increased the upper bounds

* replaced bench params with constants + added benches for new extrinsics

* fixed compilation after merge with UserBuilder

* updated pips weight file + fixed assertion in execute_scheduled_pip

* usuccessful attempt to whitelist storage prefixes

* whitelisting voter keys to exclude remove_prefix from weight computation

* updated the weight file

* commented out snapshot and enact_snapshot benches

* removed unused import

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* PTM: Patch for the panic in math operations (#766)

* patch for the panic in math operations

* rename helper function

Co-authored-by: satyam <satyam@secureblocks.io>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Fix schema for protocol fees (#776)

* Fix schema

* typo fix

Co-authored-by: Adam Dossa <adamdossa@Adams-MacBook-Pro.local>
Co-authored-by: Mudit Gupta <guptamudit@ymail.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Add snapshot details to events when snapshot is created (#779)

* Update events

* Neaten

Co-authored-by: Adam Dossa <adamdossa@Adams-MacBook-Pro.local>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Mocked InvestorUid from Cryptographic Library (#780)

* Mocked InvestorUID compliant with UUID v4, generated inside crypto lib.

* Add benchmarks to Confidential (#772)

* Add benchmarks to Confidential

* Remove already executed runtime storage code (#782)

Co-authored-by: Adam Dossa <adamdossa@Adams-MacBook-Pro.local>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* MESH-1388: Reduce chain-spec duplication (#783)

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* Added corporate actions config

Co-authored-by: Mudit Gupta <guptamudit@ymail.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* misc pips cleanup (#784)

Co-authored-by: Mudit Gupta <guptamudit@ymail.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* mesh-1399: declaration date for corporate actions (#785)

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* mesh-1366: nix unused error variants (#787)

* Minor fixes (#786)

* Fixed RecordDateSpec schema

* Replaced pipsorigin (commiteeorigin) with root

* fixed missing permissions error

* Fixed remove_authorizations

* pips and identity benchmark fixes (#788)

* pips benchmark compilation fixes

* identity benchmark fix

Co-authored-by: Mudit Gupta <guptamudit@ymail.com>

* Add benchs to Asset (#762)

Benchmarks on Asset pallet

* Minor fixes and added benchmarks build to CI (#790)

* bye bye referendums

* fixed error codes

* Build binary with benchmarks on CircleCI

* Cleaned up compiler warnings

* Identity benchmark fix

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* MESH-1382/ Same block settlement changes to next block settlement (#763)

* improvement: same block settlement changes to next block settlement

* address fedback comments

* cancel pending executions when affirmation withdraws

* add settlement type check

* minor fixes

* minor fixes

* fix typo

* minor fixes

* event emission

* minor change

Co-authored-by: satyam <satyam@secureblocks.io>

* More minor fixes (#793)

* changed remove_default_trusted_claim_issuer to take issuer identity instead of full object

* verify iu claim only for the receiver

* benchmark build changes

* benchmark build fix

* save cache on success

* Fix testnet authoring_version (#798)

Co-authored-by: Adam Dossa <adamdossa@Adams-MacBook-Pro.local>

* Mesh 1400/update storage hashers (#796)

* wip

* Updated hashers

* Fixed test ordering

Co-authored-by: Adam Dossa <adam.dossa@gmail.com>

* Add benchmarks to balances (#797)

* Add benchmarks to balances

* Bump ini from 1.3.5 to 1.3.8 in /scripts/cli (#806)

Bumps [ini](https://github.com/isaacs/ini) from 1.3.5 to 1.3.8.
- [Release notes](https://github.com/isaacs/ini/releases)
- [Commits](https://github.com/isaacs/ini/compare/v1.3.5...v1.3.8)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Use mocked InvestorUid from crypto (#804)

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Benchmarks in Treasury (#800)

* Add benchmarks to balances

* CodeReview: Remove warnings

* CodeReview: Seed param moved to builder

* Add benchmarks to treasury

* CodeReview: Remove warnings

* Schnorrkel sign as hosted function

* CodeReview: Remove commented code

* CodeReview: Use map instead match

* Update pallets/common/src/benchs/user.rs

CodeReview suggerstion.

* Benchmakrs added to ImOnline (#808)

* Use cryptography's new crate structure (#803)

* Use cryptography's new crate structure

* Increase Max BlockSize & fee

* Fix imports

Co-authored-by: Francisco Miguel García <fmiguelgarcia@users.noreply.github.com>
Co-authored-by: miguel <francisco.miguel.garcia.rodriguez@gmail.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* MESH-1423, MESH-1424, MESH-1425 - Sto and settlement fixes (#807)

* WIP

* Some clean ups

* Fix tests and Claim Receipts logic

* Update pallets/settlement/src/lib.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* Update pallets/settlement/src/lib.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* Fixes and tweaks

* Update pallets/settlement/src/lib.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* Update pallets/settlement/src/lib.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

Co-authored-by: Adam Dossa <adamdossa@Adams-MacBook-Pro.local>
Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Create pull_request_template.md

* Update pull_request_template.md

* Update pull_request_template.md

* Require IU claims for payer and receiver of transfers (#812)

Co-authored-by: Adam Dossa <adamdossa@Adams-MacBook-Pro.local>

* MESH-1409/Add check for zero balance during revoke of IU claim (#809)

* add check for zero balance during revoke of IU claim

* silent the warning for unused variables

* minor nits

* minor re-arrangement

Co-authored-by: satyam <satyam@secureblocks.io>
Co-authored-by: Adam Dossa <adam.dossa@gmail.com>

* MESH-1483: Rename valid_from to trade_date and add value_date (#811)

* Rename valid_from to trade_date and add value_date

* Fix unit tests

* Fix benchmarks

* Remove check on trade_date

Co-authored-by: Adam Dossa <adamdossa@Adams-MacBook-Pro.local>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Add benchmarks to Group pallet (#810)

* Add benchmarks to Group pallet

* minor changes (#813)

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Bump systeminformation from 4.30.9 to 4.32.0 in /scripts/cli (#814)

Bumps [systeminformation](https://github.com/sebhildebrandt/systeminformation) from 4.30.9 to 4.32.0.
- [Release notes](https://github.com/sebhildebrandt/systeminformation/releases)
- [Changelog](https://github.com/sebhildebrandt/systeminformation/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sebhildebrandt/systeminformation/commits)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* MESH-1422: correctly check permissions in batches (#805)

* removed permissions from utility batch + added batch permissions test

* quantifier fix

* event chasing

* batch_secondary_with_permissions passes

* fixed portolio module naming

* test fixed

* Permissions runtime upgrade

* fixes

* added storage migration version

* just remove old storage values

* added const_option

* Portfolio module fix storage upgrade

* review comments

* dedup and comments

* typing

* comment typo fix

* ensure_root_or_signed and minor renaming

* removed cloning

* copy -> move

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* MESH-1387: Corporate Actions Benchmarks (#794)

* mesh-1387: bench set_max_details_length

* mesh-1387: bench reset_caa

* mesh-1387: bench set_default_targets

* mesh-1387: bench set_default_withholding_tax

* mesh-1387: bench set_did_withholding_tax

* mesh-1387: bench initiate_corporate_action

* mesh-1387: bench link_ca_doc

* mesh-1387: bench remove_ca

* mesh-1387: bench change_record_date

* cargo fmt

* mesh-1387: mv ballot.rs -> ballot/mod.rs

* mesh-1387: bench attach_ballot

* mesh-1387: bench change_end

* mesh-1387: bench change_rcv

* mesh-1387: bench remove_ballot

* mesh-1387: bench vote

* mesh-1387: mv distribution.rs -> distribution/mod.rs

* mesh-1387: bench distribute

* mesh-1387: get dist benches working

* mesh-1387: cargo fmt#

* mesh-1387: std-gate set_timestamp

* mesh-1387: assert_ok! -> unwrap

* mesh-1387: cleanup

* mesh-1387: fix rebase fallout

* mesh-1387: inline composite weight fns

* mesh-1387: address review comments

* mesh-1387: move 'user' fn

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* MESH-1413: ASCII-only tickers (#818)

* mesh-1413: ascii-only tickers

* mesh-1413: only printable ascii

* mesh-1413: add test cases

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Fix minor typos (#820)

* Fix minor typos

* Some more comment fixes

* Update pallets/corporate-actions/src/lib.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* Update pallets/corporate-actions/src/lib.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

Co-authored-by: Adam Dossa <adamdossa@Adams-MacBook-Pro.local>
Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* Buffron config changes (#802)

* buffron config

* Updated config

* fixed chainspec

* changed default session keys

* config changes

* new binary

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Remove `IdentityRole` (#830)

* Remove IdentityRole

* CodeReview: Remove migration from `LinkedKeyInfo`

* MESH-1433: Introduce limits for fixed values in CA extrinsic weights (#827)

* mesh-1433: dist benches: quantify did whts

* mesh-1433: introduce limits

* mesh-1433: fix benchmarks

* mesh-1433: test limits

* cargo fmt

* mesh-1433: simplify length checks

Co-authored-by: Francisco Miguel García <fmiguelgarcia@users.noreply.github.com>

Co-authored-by: Francisco Miguel García <fmiguelgarcia@users.noreply.github.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Remove STO, Voting, & Dividend (#826)

* Remove STO, Voting, & Dividend

* Remove STO, Voting, & Dividend

* Add `empty_slot` module

* Remove unused types from schema

* CodeReview: Explicit module index

* CodeReview: privatize `create_at_by`

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* MESH-1095/DocumentHash (#817)

* Document Hash type restricted

* Add migration of `Document`

* Migrate double map with 2 hasher & collect returns

* Migrate only values of AssetDocuments

* Add types to schema

* Add types to schema

* Fix schema

* CodeReview: Remove Clone + Eq

* CodeReview: Removing bounds

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Add benchmarks to permissions (#823)

* Add benchmarks to permissions

* Update pallets/permissions/src/benchmarking.rs

CodeReview: Style

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* Update pallets/permissions/src/benchmarking.rs

CodeReview: Style

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* CodeReview: Replace assert by ensure

* CodeReview: Fix merge

* CodeReview: Rename variable

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* mesh-1357: test pips/staking interaction (#815)

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* removed exemption pallet (#832)

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Add getter to retrieve all the exempted identities (#816)

* add getter to retrieve all the exempted identities

* minor test nit picks

Co-authored-by: satyam <satyam@secureblocks.io>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Mesh 1439/native tms (#829)

* Added base for transfer managers

* wip

* implemented tms

* Integration

* some tests

* wip

* Fixed investor count bug

* Added more tests

* benchmarks

* review comments

* Updated schema

* minor refactoring

* Fixed tests

* minor refactoring

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Remove duplicated schedule event and fix comments (#833)

* Remove duplicated schedule event and fix comments

* Fix warning

* Update to only include new scheduled block in event

* Update pallets/pips/src/lib.rs

Co-authored-by: Mudit Gupta <guptamudit@ymail.com>

Co-authored-by: Adam Dossa <adamdossa@Adams-MacBook-Pro.local>
Co-authored-by: Mudit Gupta <guptamudit@ymail.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Mesh 1373/ Configurable limit on no. of validators for an entity  (#821)

* port 2.0 release changes of substrate staking pallet

* restrict the no. of validators for an indentity

* add test cases

* storage migration

* uncommented tests

* minor feedback's on code comments

* remove uncessary import

* make constructor public

* build fix

* minor improvements

* update dev comment

* change api name

* fix bug

Co-authored-by: satyam <satyam@secureblocks.io>

* MESH-1294/Multisig benchmarks (#743)

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* Fixed identity error in multisig

* WIP

* WIP

* WIP

* WIP

* remove useless multisig create

* fix some comments

* fix rest of comments

* fix rest of comments

* fix rest of comments

* fix macro error and verify errors

* regen weights

* formatting

* bad merge

* formatting

* Update pallets/multisig/src/benchmarking.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* comments

* comments

* WIP: use scheduler

* minor fixes

* scheduler cleanup

* test build fix

* fixed tests

* minor refactoring

* minot comments

* updated code comment

* Added proposal weights to multisig calls

Co-authored-by: Mudit Gupta <guptamudit@ymail.com>
Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Mesh 1383/Settlement Benches (#799)

* remaining benchmarks for settlement

* fix linting

* add contract worst case

* add compliance restriction check for the execute_instruction

* fix the execute_scheduled_instruction extrinsic bench

* add weight traits

* final weight assignments for settlement pallet

* fix linting

* fix settlement test

* cleanup

* supressed warning

* address miguel's feedback

* minor feedback's addressed

* cleanup generate portfolio

* generate different set of conditions

* minor fixes

* fix build

* fix logic bug

* fix bench

* add tms in benchmarks

* add bench numbers

* fix linting

* remove warnings

* supressed warnings

Co-authored-by: satyam <satyam@secureblocks.io>

* Misc cleanups & refactorings, Part 1 (#831)

* simplify committee logic

* move_portfolio_funds: fix atomicity bug

* simplify committee pallet more

* simplify modify_fundraiser_window

* simplify portfolio code

* simplify create_fundraiser

* simplify settlement code

* simplify confidential pallet

* simplify contracts & identity pallets

* simplify asset pallet

* simplify bridge pallet

* cargo fmt

* committee/ensure_did_is_member: use binary search

* committee: extract seat count logic

* cleanup compliance manager & group pallets

* assets: address review comments

* Clean up merge

Co-authored-by: Adam Dossa <adam.dossa@gmail.com>
Co-authored-by: Adam Dossa <adamdossa@Adams-MacBook-Pro.local>

* Update current identity when a key joins a new identity (#835)

* update current identity when key joins a new identity

* split join_identity internal functions

Co-authored-by: Adam Dossa <adam.dossa@gmail.com>

* Misc cleanups & refactorings, Part 2 (#837)

* identity: reduce allocations in remove_secondary_keys

* identity: misc improvements

* simplify multisigs

* simplify permissions

* simplify pips + check perms

* simplify portfolio pallet

* simplify protocol-fee

* cargo fmt

* Fix PIA semantics and forwarded_call permissions (#834)

* simplify committee logic

* move_portfolio_funds: fix atomicity bug

* simplify committee pallet more

* simplify modify_fundraiser_window

* simplify portfolio code

* simplify create_fundraiser

* simplify settlement code

* simplify confidential pallet

* simplify contracts & identity pallets

* simplify asset pallet

* simplify bridge pallet

* cargo fmt

* committee/ensure_did_is_member: use binary search

* committee: extract seat count logic

* cleanup compliance manager & group pallets

* assets: address review comments

* Fix PIA permissions

* Fixes for forwarded calls permissions

* Linting and some test fixes

* More fixes for tests

* Fix benchmarks

* WIP commits

* Add event and fix casing

* linting

* Set PIA back to an Option

* Fix tests

* Fix benchmarks and linting

* Fix tests

* Update pallets/identity/src/lib.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* Fix from merge

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>
Co-authored-by: Adam Dossa <adamdossa@Adams-MacBook-Pro.local>

* Minor refactoring (#847)

* minor refactoring

* Apply suggestions from code review

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* minor optimization

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* MESH-1431/Allow fix rewards (#841)

* allowed fix schedules

* add declaration

* dedup the assert statements

* renaming variables

Co-authored-by: satyam <satyam@secureblocks.io>

* Allow ceiling multiplication in staking (#846)

* allow ceiling multiplication

* specialize the below than 1 case

* fix linting

* apply mudit's suggestion

* fix bug

Co-authored-by: satyam <satyam@secureblocks.io>
Co-authored-by: Adam Dossa <adam.dossa@gmail.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Fix initialisation order and upgrade for PermissionedIdenities (#845)

* Fix initialisation order

* Fix staking upgrade functions

Co-authored-by: Adam Dossa <adamdossa@Adams-MacBook-Pro.local>

* Misc cleanups & refactorings, Part 3 (#843)

* simplify cdd_check

* optimize merge_active_and_inactive

* simplify settlement

* misc refactorings

* nuke dead jurisdiction code

* cargo fmt

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* add schedule instruction weight (#844)

Co-authored-by: satyam <satyam@secureblocks.io>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* reenable slashing (#849)

* MESH-1418/Enforce cdd_id uniqueness (#839)

* enforce cdd_id uniqueness

* address centril's feedbacks

* minor fixes

* minor fix

* fixes tests

Co-authored-by: satyam <satyam@secureblocks.io>
Co-authored-by: Mudit Gupta <guptamudit@ymail.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Refactored Multisig benchmarks (#840)

* removed refunds from multisig

* Added weight for proposal execution

* refactored some benchmarks

* more deduplications

* Added more benchmarks and removed extra fn

* Updated weights

* Added benchmark for proposal execution

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Mesh 1460/STO improvements (#848)

* sto events and status

* minimum investment amount and fundraiser name

* Updated schema

* Fixed unit tests

* minor refactoring

* Update pallets/sto/src/lib.rs

Co-authored-by: Satyam Agrawal <satyam0499@gmail.com>

* Removed unknown fundraiser status

* moved some debug derives to std

Co-authored-by: Satyam Agrawal <satyam0499@gmail.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* cleanup (#850)

* Fixed RPC definitions (#851)

* MESH-1304 Substrate benchmarks (#836)

* Substrate benchmarks added

* updated proof def (#853)

* Mesh 1463/Documentation build fails (#854)

* Substrate benchmarks added

* Add pallet_session benchmark

* Disable `runtime-benchmakrs` feature in default

* MESH-1288 committee benchmarks (#771)

* a couple benches

* set_expires_after bench

* todo

* wip on type inference for pallet instances

* fixed instance type error

* vote_or_propose draft

* set a committee member

* vote_or_propose with variable number of members

* generation of additional proposals

* corrected the expected events on approved proposal

* fixes

* vote draft

* vote bench fixed

* close bench draft

* close bench works

* WIP for propose

* merge fixes in User

* rewrote proposal making

* working on NoSuchProposal

* added committee weight file

* dedup comittee bench

* typing

* typo

* removed commented out code

* Apply suggestions from code review

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* Revert "Apply suggestions from code review"

This reverts commit 08ddcc3ab9cf8ebdc344316cc83c3ca0611405a7.

* review comments

* review comments

* fixed the max number of committee members to 1000

* split vote weight into aye and nay halves

* removed duplicate constant

* fixed typos

* worst-case aye vote

* fixed proposal padding and the member check

* sorted the member dids vec

* reduced the number of members and proposals

* updated the aye voter member index

* vote_aye triggers proposal execution; dev-only constants

* release constants and check of the opposite vote

* reverted committee threshold operator, updated weights

* special case of even number of committee members

* updated committee weights

* fmt

* Update pallets/committee/src/benchmarking.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

Co-authored-by: Adam Dossa <adam.dossa@gmail.com>
Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Initial `make_asset` refactoring (#828)

* Add benchs of exemption pallet

* Fix UT

* CodeReview: `make_asset` to common

* Remove exemption pallet

* CodeReview: Fix settlement bench error after merge

* Update pallets/asset/src/benchmarking.rs

Co-authored-by: Vladimir Komendantskiy <komendantsky@gmail.com>

* Update pallets/asset/src/benchmarking.rs

Co-authored-by: Vladimir Komendantskiy <komendantsky@gmail.com>

* CodeReview: `make_*` returns a result

* re-trigger pipeline

* re-trigger pipeline

Co-authored-by: Vladimir Komendantskiy <komendantsky@gmail.com>

* Mesh 1452/benchs failing (#859)

* Fix statistics benchs & new `running_ci` feature

* Fix identity benchs & add `running-ci` feature

* CodeReview: Fix `running-ci` constant

* Update pallets/identity/src/benchmarking.rs

CodeReview: style fix.

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* Update pallets/identity/src/benchmarking.rs

CodeReview: style.

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* Update pallets/pips/src/benchmarking.rs

CodeReview: Change complexity in PIP with `running-ci`

Co-authored-by: Vladimir Komendantskiy <komendantsky@gmail.com>

* CodeReview: use variable

* CodeReview: Fix the specific `add_transfer_manager`

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>
Co-authored-by: Vladimir Komendantskiy <komendantsky@gmail.com>

* init helper cli (#860)

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* MESH-1468/Add sudo pallet (#861)

* add sudo pallet

* add test suite in circle ci

Co-authored-by: satyam <satyam@secureblocks.io>
Co-authored-by: Adam Dossa <adam.dossa@gmail.com>

* fix initiate_corporate_action weight (#868)

* MESH-1461/Fix underflow/overflow bugs in Asset Identifier Validations (#867)

* WIP

* WIP

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* MESH-1453/Pass legs count in portfolio based extrinsics (#855)

* pass legs count in portfolio based extrinsics

* add fix for add_and_affirm_inst

* fix test suite

* fix benchmark build

* improve test cases

* minor fixes

* fix benchmarks working

* re-trigger pipeline

* minor fixes

* centril's suggestion

* minor re arrangement

* fix integration tests

* bench fixes

Co-authored-by: satyam <satyam@secureblocks.io>

* burn remaining rewards (#865)

Co-authored-by: Adam Dossa <adam.dossa@gmail.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* MESH-1456, MESH-1464, MESH-1459: In committee, nix `close` + only use dynamic threshold (#857)

* mesh-1456: simplify Origin handling

* mesh-1456: add 'type VoteThresholdOrigin'

* mesh-1456: nix close extrinsic

* mesh-1456: Condoned -> Endorsed

* nix MotionDuration

* committee: add migration logic

* PolymeshVotes: nix IdentityId typaram

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Minor refactoring of settlement benchmarks and a bug fix (#856)

* minor refactoring

* wip

* wip

* fixed merge

* Updated instruction execution bench

* updated weights for settlement

* minor refactoring

* bench fix

* Update pallets/settlement/src/lib.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* MESH-1287/Sto Benchmarks (#838)

* WIP

* WIP

* WIP

* WIP

* dedupe

* formatting

* Update pallets/sto/src/benchmarking.rs

Co-authored-by: Vladimir Komendantskiy <komendantsky@gmail.com>

* Update pallets/sto/src/benchmarking.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* comments

* Update pallets/sto/src/benchmarking.rs

Co-authored-by: Mudit Gupta <guptamudit@ymail.com>

* Update pallets/sto/src/benchmarking.rs

Co-authored-by: Mudit Gupta <guptamudit@ymail.com>

* Update primitives/src/ticker.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* Update primitives/src/ticker.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* comments

* comments

* Update pallets/sto/src/benchmarking.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* comments

Co-authored-by: Vladimir Komendantskiy <komendantsky@gmail.com>
Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>
Co-authored-by: Mudit Gupta <guptamudit@ymail.com>

* execute benchmarks in circleci (#875)

* Execute legs in order (#873)

* Added a test case

* execute tx in order

* Added an example edge case to comments

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Fixed minor bugs in sto (#869)

* fixed minor bugs in sto

* updated logic

* Added test case for zero price sto

* Fixed zero balance bug

* Update pallets/sto/src/lib.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* dedup invest call

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* `adjust_live_queue`: fix sort order bug (#880)

* adjust_live_queue: fix sort order bug

* adjust_live_queue: simplify code

* MESH-1489 (CP schedule ref counting) + MESH-1488 (CP schedule expiry-after-ticks) (#882)

* mesh-1489: ref count CP schedules

* mesh-1488: impl schedule expiry

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Wasm Builder as external crate (#876)

* Use external wasm builder

* Use builder revision

* Fix `syn::export::TokenStream2` error

* Update WASM_BINARY generated type

* CodeReview: Remove commented code

* CodeReview: Panic if wasm binary was not generated

* CodeReview: Dedup build

* MESH-1446/ Fix Genesis config ordering (#883)

* Fix Genesis ordering

* Fix Genesis ordering on testnet

* Mitigate overflow (#890)

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Benchmark refactoring (#877)

* renaming of some benchmark vars

* fix wasm execution of ca bench

* dedup iu claim mocking

* Fixed node-bench compilation

* wip

* updated weights

* fixed auto generated weights

* Updated base fees

* Updated weight files to use our constants

* imporved crypto-cli

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Allow receipt signers to invalidate receipts (#878)

* Allow receipt signers to invalidate receipts

* dedup

* Addressed review comments

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Audit 8: Mitigate overflow (#887)

* Mitigate overflow

* New `TooMuchSigners` error

* Update pallets/multisig/src/lib.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* Update pallets/multisig/src/lib.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Updated docs pipeline (#892)

* Updaed docs pipeline

* enabled docs building on patch branch to test

* build dummy wasm binaries

* removed test job

* MESH-1251/ Expose controller transfer as an extrinsic (#879)

* expose controller transfer as an extrinsic

* trigger concourse

* apply suggested changes

* remove controller redemption event

Co-authored-by: satyam <satyam@secureblocks.io>

* Upgrade to Substrate's Polymath fork

* Recover benchmark compilation

* Audit 7: Mitigate Overflow (#889)

* Mitigate overflow

* CodeReview: Error when total price tiers overflows

* Remove some warnings

* CodeReview: Use try_fold

* Update pallets/sto/src/lib.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* CodeReview: Inferrable param

* re-trigger pipeline

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* Impl Simple FIFO with Priority = tip

* SignedExtension for FIFO by priority

* MESH-1397 live queue pips benches + MESH-1395 + MESH-1507 (#822)

* draft snapshot and enact benches

* assert -> ensure

* fixed snapshot setup in enact_snapshot_results

* added pips weights with live queue feature

* minor fix for vector allocation capacity

* added differentiation between Skip, Reject and Approve results

* added 2 comments from older review

* typing fixes

* refactored using User methods

* WIP fails to prune historical pips

* debugging expire_scheduled_pip with set_prune_historical_pips=true

* returned T::Proposal since runtime::Call doesn't unify with it

* expire_scheduled_pip UT works

* fixed pips benchmark panic

* attempt to define dependent ranges

* using plain, independent ranges

* shuffled approve/reject/skip

* added constant for max skipped pip count

* review comment + some debugging

* debug info

* adjust_live_queue: fix sort order bug

* adjust_live_queue: simplify code

* removed debug prints and added a test for execute_scheduled_pip

* updated pips weights

* removed debug code

* moved make_remark_proposal centrally

* capped weight of enact_snapshot_results at MaximumBlockWeight

* introduced new constant for the max weight of enact_snapshot_results

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* TX priority = tip, Unit Tests

* Merge pull request #874 from PolymathNetwork/MESH-1467/Script-to-give-USDP-to-existing-DIDs-on-Alcyone

Mesh 1467/script to give ALCY to existing DIDs on Alcyone

* Upgrade substrate and rust + add code coverage (#886)

* upgraded references to substrate

* patch for syn's api breaking change

* Upgraded cryptography dependency

* Upgraded rust version

* coverage script

* wip

* wip

* Added code coverage to ci

* updated script

* Updated coverage script

* source-coverage

Remove trailing newline from rust-toolchain file

* Updated script

* attempt #358

* re-trigger pipeline

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* updated coverage script

* use unsigned for balances

* Updated path ignores in coverage

* updated scripts

* formating

* fixed new benchmarks

Co-authored-by: Claus Strommer <claus@polymath.network>

* MESH-1490: Checkpoint benchmarks (#891)

* cleanup asset benchs

* mesh-1490: {checkpoint -> checkpoint/mod}.rs

* benchs: cleanup cfgs

* mesh-1490: benchmark checkpoints

* mesh-1490: address review comments

* mesh-1490: use schedule_max_complexity

* fix rebase fallout

* Added codecov config (#896)

* Added codecov config

* caching fixes

* `CheckWeight` re-implemented on polymesh

* Fmt fix

* cargo fixes

* Override some default polkadot types (#895)

* override some default polkadot types

* updated cli dependencies

* Trigger ci

* Remove parity substrate deps

* Temporary CI update

* moved asset types to polymesh-primitives

* Revert temporary CI update

* added asset in primitives

* cargo fixes

* benchmarking fixes

* Update primitives/src/asset.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* removed unused defs and added doc comments

* fmt

* CodeReview: More comments

* comments on terminology

* Update pallets/runtime/extensions/src/check_weight.rs

Co-authored-by: Vladimir Komendantskiy <komendantsky@gmail.com>

* Update pallets/runtime/extensions/src/check_weight.rs

Co-authored-by: Vladimir Komendantskiy <komendantsky@gmail.com>

* explicit typing

* typo fix and fmt

* removed duplicate typedefs from asset pallet, added docs

* fixed import

* cleaned up confidential-asset Cargo.toml

* Mesh 1301 / Fix staking benches (#881)

* initial commit

* add benches for newly added functions

* fix staking benches

* minor improvements

* fix payout stakers

* fix linting

* minor fix in benchmarks compliation

* add weight file

* update weight definitions of extrinsics

* add bench for some remaining extrinsics

* remove weight mod reference

* minor fixes

* bench build fix

* fix bench build

* final-fix

* remove default implementation

Co-authored-by: satyam <satyam@secureblocks.io>
Co-authored-by: Mudit Gupta <guptamudit@ymail.com>

* Moved asset types to polymesh-primitives (#898)

* moved asset types to polymesh-primitives

* added asset in primitives

* benchmarking fixes

* Update primitives/src/asset.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* removed unused defs and added doc comments

* fmt

* comments on terminology

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>
Co-authored-by: Adam Dossa <adam.dossa@gmail.com>

* mostly (confidential) asset fixes

* CircleCI changes (#901)

* CircleCI go brrr

* minor optimizations

* updated caching

* fixed bench

* final run

* refactored settlement Leg and implemented execute_instruction failure reasons MESH-1330

* MESH-1531: Fix Checkpoint.timestamps into double map keyed by `Ticker` (#899)

* mesh-1531: add repro test

* mesh-1531: repro -> regression test

* mesh-1531: add storage migration

* cargo fmt

* mesh-1531: twox -> blake2

* mesh-1531: everybody gets double maps

Co-authored-by: Adam Dossa <adam.dossa@gmail.com>

* MESH-1518/Upgrade to Substrate's Polymath fork (#893)

* Upgrade to Substrate's Polymath fork

* Recover benchmark compilation

* Impl Simple FIFO with Priority = tip

* SignedExtension for FIFO by priority

* TX priority = tip, Unit Tests

* `CheckWeight` re-implemented on polymesh

* Fmt fix

* Remove parity substrate deps

* Temporary CI update

* Revert temporary CI update

* CodeReview: More comments

* Update pallets/runtime/extensions/src/check_weight.rs

Co-authored-by: Vladimir Komendantskiy <komendantsky@gmail.com>

* Update pallets/runtime/extensions/src/check_weight.rs

Co-authored-by: Vladimir Komendantskiy <komendantsky@gmail.com>

Co-authored-by: Vladimir Komendantskiy <komendantsky@gmail.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* fixed issues with affirm_confidential_instruction

* fixed confidential-asset Cargo.toml

* fixed some merge bugs in settlement

* fixed compile-time errors in settlement

* fixed errors in sto

* added ConfidentialAsset in construct_runtime

* typo in testnet runtime

* typo in develop runtime

* Storage migration tests (#900)

* wip

* wip

* wip

* cleanup

* more cleanup

* wip

* restructure

* moving things around

* assert

* minor cleanup

* feature gate migrations

* fixed warnings

* Update migration-tests/src/lib.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* Added checkpoints migration tests

* fixed merge conflict

* Added support for different substrate versions

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* commented out unused imports

* reenabled old versions of packages in migration

* Removed unnecessary constraints (#905)

* removed unnecessary constraints

* fixed settlement benchmarks

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* fixed confidential-asset imports in runtimes

* MESH-1473/Create a list of transactions that require Asset/Portfolio permissions (#894)

* WIP

* WIP

* Update utils/permissions/Cargo.toml

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* WIP

* WIP

* Update utils/permissions/src/doc_parser/enums.rs

Co-authored-by: Francisco Miguel García <fmiguelgarcia@users.noreply.github.com>

* crate docs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>
Co-authored-by: Francisco Miguel García <fmiguelgarcia@users.noreply.github.com>

* Add modify window event and stop event to STO (#903)

* add modify window event and stop event

* Update pallets/sto/src/lib.rs

Co-authored-by: Mudit Gupta <guptamudit@ymail.com>

* Update pallets/sto/src/lib.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* Update pallets/sto/src/lib.rs

Co-authored-by: Mudit Gupta <guptamudit@ymail.com>

* fix build

* add CloseEarly status

* updated schema

* fixed benchmarks

Co-authored-by: Mudit Gupta <guptamudit@ymail.com>
Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Added support for H2 tag perms (#907)

* Added support for H2 tag perms

* closure

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* settlement runtime test fixes

* MESH-1533/Require minimum 1 POLYX bond (#910)

* WIP

* minor changes

Co-authored-by: Mudit Gupta <guptamudit@ymail.com>

* bond 1 polyx in integration tests (#911)

* fixed ValidatorPrefsWithBlocked hack (#913)

* MESH-1379/permission logic integration test (#852)

* added createPortfolio function, modified 4_permission_management and minor change in init.js

* minor changes

* added movePortfolioFunds  function

* added setPortfolio and setExtrinsic functions

* added functions for creating documents and setting asset permissions

* minor changes

* minor change

* minor change

* Trigger Build

* minor change

* fixed minor indentation issue

Co-authored-by: Vladimir Komendantskiy <komendantsky@gmail.com>

Co-authored-by: Vladimir Komendantskiy <komendantsky@gmail.com>
Co-authored-by: Adam Dossa <adam.dossa@gmail.com>

* fixed non-confidential asset tests

* minting tokens when creating non-confidential assets only; no impact on failing tests

* benchmarks std fix

* fixed a few imports

* Script to simplify running JS integration tests  (#902)

* added script

* minor change

* minor changes

* fixed a confidential asset runtime test account_create_tx

* fixed confidential asset tests

* Update Polymesh's subrtrate version to 2.0.1-2 (#909)

* Update Polymesh's subrtrate version

* TX pool drop unpropagable tx if node is not author blocks

Co-authored-by: Mudit Gupta <guptamudit@ymail.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* removed unused imports

* removed unused import in asset

* MESH-1508, MESH-1469: Add Jurisdictions and clean up README.md (#917)

* Clean Ups

* fixed typos

* Update README.md

Co-authored-by: Vladimir Komendantskiy <komendantsky@gmail.com>

* Update primitives/src/jurisdiction.rs

Co-authored-by: Vladimir Komendantskiy <komendantsky@gmail.com>

* line breaks

Co-authored-by: Mudit Gupta <guptamudit@ymail.com>
Co-authored-by: Vladimir Komendantskiy <komendantsky@gmail.com>

* fixed permission issues in confidential asset tests

* misc refactorings

* fixed build error

* transaction ordering runtime test fixes

* add debugging

* fix failing tests: go to next block after rejecting instruction

* refactored balance decryption

* fixed schema typo

* corrected leg defs in settlement integration tests

* cleanup integration tests blocking

* Allow tipping for Operational TX from CDD/GC member (#918)

* Allow tipping for Operational TX from CDD/GC member

* re-trigger pipeline

* CodeReview fixes

* CodeReview: Improve comment

* CodeReview: consistensy

* CodeReview fix

* JS syntax fixes

* more JS syntax fixes

* removed commented code

Co-authored-by: Satyam Agrawal <satyam0499@gmail.com>
Co-authored-by: satyam <satyam@secureblocks.io>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>
Co-authored-by: Mudit Gupta <guptamudit@ymail.com>
Co-authored-by: Francisco Miguel García <fmiguelgarcia@users.noreply.github.com>
Co-authored-by: Adam Dossa <adam.dossa@gmail.com>
Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>
Co-authored-by: Adam Dossa <adamdossa@Adams-MacBook-Pro.local>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Parnian <60563484+ParnianAlimi@users.noreply.github.com>
Co-authored-by: miguel <francisco.miguel.garcia.rodriguez@gmail.com>
Co-authored-by: Joel M…
Neopallium pushed a commit that referenced this pull request May 22, 2023
* Adds an empty confidential asset pallet

Integrate mercat account (#584)

* Add mercat account creation and verification
* Emit account creation event
* Update the cryptography submodule

Weekly Task: Develop to Mercat (#619)

* added clippy script to CI

* added clippy test to dev pr pipeline

* MESH-1233/Rebase-Fees (#572)

* rebase weights

* fix linting

Co-authored-by: satyam <satyam@secureblocks.io>

* MESH-1216: `get_valid_payer`: only accept `AccountId`. (#573)

* mesh-1216: `get_valid_payer`: only accept `AccountId`.

Also do some code cleanup & refactoring.

* refactor fee_details some more

* mesh-1228: mv pallets/runtime/{testnet-v1 -> testnet}

* mesh-1228: rename crate & fix comments

* ci: testnet-v1 -> testnet

* minor change

* added clippy test to the rest of the pipelines

* Atomically create and authorize instructions (#567)

* Added venue type

* schema update

* cli update

* submodule update

* submodule to master branch

* MESH-1232/Remove smart extension api (#558)

* add remove smart extension api

* suggested change applied

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* re-reference to right commit hash for settlement

* Trigger notification

Co-authored-by: satyam <satyam@secureblocks.io>
Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>
Co-authored-by: Adam Dossa <adam.dossa@gmail.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* MESH-1235/remove batch functions (#578)

* remove batch functions

* remove bridge batch functions

Co-authored-by: satyam <satyam@secureblocks.io>

* MESH-1240, MESH-1239, MESH-1238 (#579)

* mesh-1239: move proposer & cool_off_until to Pip

* mesh-1238: add SnapshotId to metadata

* mesh-1240: cache list of committee pips

* MESH-1231: add `get_key_id_data` rpc call (#569)

* mesh-1231: add get_key_id_data rpc call

* mesh-1231: add `KeyIdData` to polymesh_schema

* mesh-1231: key_id -> key_identity

* mesh-1231: address review comments

Co-authored-by: Adam Dossa <adam.dossa@gmail.com>

* Fix asset RPC (#562)

* fix asset rpc

* lint fixing

* comment updated

Co-authored-by: satyam <satyam@secureblocks.io>

* added sendTx to JS Scripts (#585)

Co-authored-by: Adam Dossa <adam.dossa@gmail.com>

* mesh-1236: remove_authorization -> payer: authorized_by (#574)

* DEVOPS-211 (#576)

* DEVOPS-211

* Use `load_var` to read the `rust-toolchain` contents into a variable
* Use the `rust-toolchain` variable to specify the desired Rust
  container

* DEVOPS-211

* Fix variable reference

* DEVOPS-211

* debug

* DEVOPS-211

debug

* DEVOPS-211

Remove trailing newline from `rust-toolchain` file

* DEVOPS-211

* Add rust toolchain selection to develop and tooling pipelines

* DEVOPS-211

* Bugfix

* DEVOPS-211

* Remove `serial` requirement for pipelines in favour of per-worker
  container placement strategy (DEVOPS-212)
* Remove debug configuration

* DEVOPS-211

Integrate changes from DEVOPS-209

* DEVOPS-211

* Use `load_var` to read the `rust-toolchain` contents into a variable
* Use the `rust-toolchain` variable to specify the desired Rust
  container

* DEVOPS-211

* Fix variable reference

* DEVOPS-211

* debug

* DEVOPS-211

debug

* DEVOPS-211

Remove trailing newline from `rust-toolchain` file

* DEVOPS-211

* Add rust toolchain selection to develop and tooling pipelines

* DEVOPS-211

* Bugfix

* DEVOPS-211

* Remove `serial` requirement for pipelines in favour of per-worker
  container placement strategy (DEVOPS-212)
* Remove debug configuration

* DEVOPS-211

Integrate changes from DEVOPS-209

* DEVOPS-211

* Use `load_var` to read the `rust-toolchain` contents into a variable
* Use the `rust-toolchain` variable to specify the desired Rust
  container

* DEVOPS-211

* Fix variable reference

* DEVOPS-211

* debug

* DEVOPS-211

debug

* DEVOPS-211

* Add rust toolchain selection to develop and tooling pipelines

* DEVOPS-211

* Bugfix

* DEVOPS-211

* Remove `serial` requirement for pipelines in favour of per-worker
  container placement strategy (DEVOPS-212)
* Remove debug configuration

* DEVOPS-211

* Fix clippy step inputs

Co-authored-by: Adam Dossa <adam.dossa@gmail.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* MESH-1252 & MESH-1253 (#590)

* mesh-1253: add `created_at: BlockNumber` to `PipsMetadata`.

* mesh-1252: Add `SnapshotId` to `SnapshotResultsEnacted`.

* mesh-1250: `on_runtime_upgrade`, clear V1 PIPs storage. (#591)

* Update readme and genesis files (#593)

* Update README.md (#594)

* MESH-1244: add `#[migrate_from($ty_old)]` form to `#[derive(Migrate)]`. (#592)

* mesh-1244: add `#[migrate_from($ty_old)]` form to `#[derive(Migrate)]`.

* mesh-1244: simplify `extract_migrate_refs` using `get_ident`.

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* DEVOPS-220/alcyone-pipelines (#582)

* Add `alcyone` pipelines.
* Make the `alcyone` pipelines bump versions
* Make `tooling` pipelines not bump versions
* Change PR artifact labeling to distinguish between `develop` and
  `tooling` artifacts

Co-authored-by: Adam Dossa <adam.dossa@gmail.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* MESH-1166/Scope of Claim refactor (#560)

* first go

* Update base.rs

* fix non-settlement tests

* first go at upgrade

* fix bad submodule

* formatting

* fix bad merge

* formatting

* submodule bump

* Update primitives/src/identity_claim.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* upgrade compliance manager storage

* update schema

* wip

* wip

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>
Co-authored-by: Adam Dossa <adam.dossa@gmail.com>

* DEVOPS-174/purge-cache (#595)

* DEVOPS-174/purge-cache

* Add cargo-sweep to cached rust tasks

* DEVOPS-174/purge-cache

* Fix `cargo test` / `cargo sweep`

* DEVOPS-174/purge-cache

* DEVOPS-227 / reduce `npm test` noise

* DEVOPS-174/purge-cache

DEVOPS-228: improve timeout conditions

* Move the `npm test` timeout inside the script and use coreutils
  timeout instead
* Remove archived `master` pipelines

* DEVOPS-174/purge-cache

* More aggressive cache purging
* Fix `npm test` redirect bug

* DEVOPS-174/purge-cache

* Remove timeout from alcyone pipelines
* Set tooling pipelines to not `put` semver updates

* DEVOPS-174/purge-cache

* Reset cargo cache when it reaches 10GB

* DEVOPS-174/purge-cache

* Handle undeletable `target/` directory (because it's a volume mount)

Co-authored-by: Adam Dossa <adam.dossa@gmail.com>

* MESH-1074/Enforce scope claim to assets transfer (#583)

* enforce scope claim to assets

* Centril: feedback addressed

* fix linting

* fix: avoid returning default as true for sender

* add implicit requirements within the granular_verification

* update schema

* add additional test

* use doc comments

* simplify rpc

* remove debug from wasm

* code rearrangement

* minor improvement

* lint fix

Co-authored-by: satyam <satyam@secureblocks.io>
Co-authored-by: Adam Dossa <adam.dossa@gmail.com>

* removed staking fuzzer from workplace (#597)

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* mesh-1243: add migrate_double_map_keys (#604)

* DEVOPS-232/move-polymesh-pipelines (#602)

* DEVOPS-232/move-polymesh-pipelines

* Remove deprecated Concourse files

* trigger

* DEVOPS-232/move-polymesh-pipelines

* Missing && in cli test

* trigger

* trigger

* DEVOPS-232/move-polymesh-pipelines

Undo 0c69bbd7965b2546bee457bcebb1bc09324c2763

* DEVOPS-232/move-polymesh-pipelines

Update CODEOWNERS file

Co-authored-by: Adam Dossa <adam.dossa@gmail.com>

* MESH-1257: Runtime upgrade functionality for CDD_ID. (#600)

* mesh-1257: Runtime upgrade functionality for CDD_ID.

This amends `Migrate` with `type Context`.
To `derive(Migrate)` we add `migrate_context`, `migrate_with`,
and `migrate_from` on enum variants.

* mesh-1257: more migrate_context docs

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Update README (#605)

* MESH-1262: Infer `Proposer<_>` from `origin` on `Pips::propose`. (#606)

* mesh-1262: infer proposer from origin on `Pips::propose`.

* mesh-1262: fix governance js test

* Portfolio, Custodianship, and Settlement changes (#518)

* Portfolio custodian

* accept portfolio custody

* tests fixed

* removed dispatchables for old custody approach

* wip

* merge fixes

* verify_portfolio

* wip

* added portoflio transfer fn

* lock unlock tokens

* build fix

* wip

* custodian check

* wip

* portfolio subtrait

* wip

* wip

* rpc fixed

* submodule update

* schema update

* wip

* cli fix

* use PortfolioId in PortfolioCustody auth

* minor refactoring

* parameter reordering

* submodule update

* api for moving portfolio funds updated

* Documentation wip

* fixed tests

* Added token lock and custody tests

* some code comments

* wip

* wip

* refactored tests

* settlement tests

* import fix

* Added settlement tests

* removed mut

* copy schema script

* fixed tests

* updated submodule

* Removed internal transfer function

* cleaned up comments

* review suggestions

Co-authored-by: Satyam Agrawal <satyam0499@gmail.com>

* Bump substrate rc4 => rc5+2 => rc6 (#587)

* substrate: rc4 -> rc5+2 in deps

* substrate upgrade -> rc5: fix fallout

* substrate: rc5+2 -> rc6 in deps

* substrate upgrade -> rc6: fix fallout

* substrate upgrade: bump another crate to rc6

* substrate -> rc6: cleanup

* substrate -> rc6: add ValidateUnsigned to Babe

* substrate -> rc6: cargo update

* substrate -> rc6: fix rebase fallout

* Removed submodules (#609)

* settlement module moved to main repo

* Import cryptography library from GH via cargo dependency

* Updated CircleCI to not use submodules

* Updated test scirpts to use dummy wasm

* updated cryptography branch

* removed gitignore from settlement folder

* trigger

* run it again

Co-authored-by: Claus Strommer <claus@polymath.network>

* Updated cryptography branch (#612)

* Update max inflation from 20% to 14% (#611)

* change payout_stakers dispatch weight to the 1/4 of the actual weight (#614)

Co-authored-by: satyam <satyam@secureblocks.io>

* Update REWARD_CURVE for testnet (#617)

* mesh-1141: add 'PipsMetadata::transaction_version' (#610)

Co-authored-by: CJP10 <14205938+CJP10@users.noreply.github.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* fix reference problem

* fix linting

* fix tests and remove old reference

Co-authored-by: Joel Moore <47923231+JMoore96@users.noreply.github.com>
Co-authored-by: satyam <satyam@secureblocks.io>
Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>
Co-authored-by: Mudit Gupta <guptamudit@ymail.com>
Co-authored-by: Adam Dossa <adam.dossa@gmail.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>
Co-authored-by: Claus Strommer <63645659+cwsatpolymath@users.noreply.github.com>
Co-authored-by: CJP10 <14205938+CJP10@users.noreply.github.com>
Co-authored-by: Claus Strommer <claus@polymath.network>

Add support for creating confidential assets. (#623)

* Add support for creating confidential assets.

Mint Confidential Assets (#615)

CRYP-160: Integrate confidential asset minting with  Polymesh

base structure of the confidential transfer (#642)

* Integrates confidential transfer
* Update the schema with types for creating an account, minting tokens, and transferring tokens

Cryp 169/end to end test (#683)

* Refactor base64 encodings for account create, mint, and transfer
* Adds extrinsic and storage for mediator account

Co-authored-by: Mudit Gupta <guptamudit@ymail.com>
Co-authored-by: satyam <satyam@secureblocks.io>

[MERCAT] Add support for transaction ordering (#684)

Add support for transaction ordering.

[MERCAT] Some refactoring (#713)

* Address MESH-1331, MESH-1329, and CRYP-173.
* Refactor exectue_instruction function
* Refactor the rng.rs file as a primitive.
* And a few more things.

[MERCAT]: Add pallet docs (#701)

revert the shnorrkel module

fix more conflicts and re-refer to the 2.0.0 sub release

change reference of bulletproofs and curve25519_dalek

crate version fixes (#736)

successful build

fix tests

fix linting

Cryp 187/change mercat dependencies (#792)

* Change the dependencies to cryptography rep
* Point to v2-mainnet branch of cryptography

Co-authored-by: Vladimir Komendantskiy <komendantsky@gmail.com>
Co-authored-by: Francisco Miguel García <fmiguelgarcia@users.noreply.github.com>

Mesh 1523/develop to mercat + MESH-1330 (#897)

* Contracts: upgrade to 3.0.0-rc2 ink! release (#731)

* upgrade to 3.0.0-rc2 ink release

* fix linting

* update readme

Co-authored-by: satyam <satyam@secureblocks.io>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Fixed Document type in schema

* Added an unexpected error event

* Mesh 1289/compliance manager bench (#720)

* Compliance Manager benchmarking added

* More benchs and its verification part

* Source code formatting

* UT compilation errors fixed

* Add limits

* Doc & renaming of types

* Rust fmt applied

* CodeReview: Only complexity can limit

Co-authored-by: Adam Dossa <adam.dossa@gmail.com>

* Fixed Document type in schema (#738)

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* MESH-1365: Add CA + Ballot tests [Part 1] (#728)

* mesh-1365: extend only_caa_authorized with new extrinsics

* mesh-1365: test remove_ca

* mesh-1365: test change_record_date

* mesh-1365: attach_ballot tests

* mesh-1365: Ballot::change_* tests

* mesh-1365: test remove_ballot

* mesh-1365: test vote extrinsic

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Mesh 1349/update permissions (#733)

* wip

* wip

* Added portfolio perms to asset and sto module

* Added asset management permissions

* fixed test

* Fixed primitives test

* Updated schema

* Minor refactoring

* minor refactoring

* added docs

* Added missing perm check

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>
Co-authored-by: Adam Dossa <adam.dossa@gmail.com>

* MESH-1365: Add CA + Ballot + Distribution tests [Part 2] (#740)

* mesh-1365: test distribute

* mesh-1365: rest remove_distribution

* mesh-1365: test reclaim

* mesh-1365: harden sortedness testing

* mesh-1365: test claim + push_benefit

* mesh-1365: unscrew a test

* mesh-1365: TRANGE -> T_RANGE

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>
Co-authored-by: Adam Dossa <adam.dossa@gmail.com>

* MESH-1367: Fix `remove_authorization` logic (#742)

* Fix remove_authorization

* Add additional test and clear context between tests

* Tighten tests with assert_noop

* Fix linting

Co-authored-by: Adam Dossa <adamdossa@Adams-MacBook-Pro.local>

* fix CA.details typo in schema (#745)

* mesh-1374: add reserve_classic_ticker (#746)

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Added receipt metadata (#747)

Co-authored-by: Adam Dossa <adam.dossa@gmail.com>

* atomi add and affirm instruction (#749)

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Added LegacyPermissions as a workaround for a polkadot.js bug (#751)

* Added LegacyPermissions as a workaround for a polkadot.js bug

* reduced duplication

* minor refactoring from review suggestion

* Fixed identity migration

* Fix migrations

* change default type of releases

* Mesh 1300/Settlement benches (#726)

* initial setup for settlement benchmarking

* add update_venue benchmark

* instruction bench

* add benchmark for add_instruction

* benchamrks for settlement added

* add benchamrks for some other extrinsics

* reduce code complexity

* add setup for the affirm_instruction

* fix build

* fix linting

* minor fixes

* add WeightInfo trait

* some rearrangements

* minor modifications

* introduce some more benches and refactor some of parts

* fix test build

* fix linting

Co-authored-by: satyam <satyam@secureblocks.io>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Removed redundant permission (#758)

* Mesh 1324: use scheduler in pips (#704)

* wip

* added ExecutionScheduler and ExpiryScheduler in pips

* removed dependency on pallet_scheduler

* updated pips trait in staking UT

* updated staking mock

* added unique PIP names in the scheduler

* comments and Agenda length assertions in unit tests

* Update pallets/pips/src/lib.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* todo about the Substrate scheduler issue

* Apply suggestions from code review

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* removed duplicate definition

* returning errors from execute_proposal

* assertion of existence of an event matching a pattern

* fixed 8 out of 12 tests

* remove unscheduled pips

* fixed 1 out of 4 tests

* fixed the 0 enactment period scheduled block issue

* Apply suggestions from code review

Co-authored-by: Francisco Miguel García <fmiguelgarcia@users.noreply.github.com>

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>
Co-authored-by: Francisco Miguel García <fmiguelgarcia@users.noreply.github.com>

* Utility Benchmarks (#741)

* Compliance Manager benchmarking added

* More benchs and its verification part

* Source code formatting

* UT compilation errors fixed

* Add limits

* Doc & renaming of types

* Rust fmt applied

* CodeReview: Only complexity can limit

* Utility benchmarks added

* Add relay_tx benchmark

* Fix some errors

* CodeReview: Use No-Op remark in Utility benches

* CodeReview: Remove commented code

* CodeReview: UserBuilder added

Co-authored-by: Adam Dossa <adam.dossa@gmail.com>

* Renaming and minor fixes (#760)

* removed js reserved keywords from variable names

* Updated errors in set_permission_to_signer

* fixed schema

* Add batches to the bridge module (#767)

* Add back batches

* Add schema and CDD logic

* Linting

Co-authored-by: Adam Dossa <adamdossa@Adams-MacBook-Pro.local>

* CalendarPeriod: fix schema (#761)

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Changed validator count to accommodate genesis authorities (#764)

* Changed validator count to accomodate genesis authorities

* Increased epoch duration

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Mesh 1381/contracts benches (#759)

* initialize benchmark

* contract benchmarks initial setup

* finalize contract benches

* add weights for contracts

* fix linting

* Use new functionality of creating the account in benchmarks

* fix tests

* use benchmarked weights

* minor fixes

Co-authored-by: satyam <satyam@secureblocks.io>

* Update Mock CDD Register DID (#756)

* Compliance Manager benchmarking added

* More benchs and its verification part

* Source code formatting

* UT compilation errors fixed

* Add limits

* Doc & renaming of types

* Rust fmt applied

* CodeReview: Only complexity can limit

* Utility benchmarks added

* Add relay_tx benchmark

* Fix some errors

* CodeReview: Use No-Op remark in Utility benches

* CodeReview: Remove commented code

* Migrate CDD_ID mocked creation

* CodeReview: UserBuilder added

* Runtime upgrades based on curr spec version

* Storage version per pallet

* CodeReview: Remove unused from `migrate_cdd_claim`

* Add `Version` type to schema

* CodeReview: Remove multisig migration

* CodeReview: Update <StorageVersion> inside `if`

* Use macro impl for Version (#769)

* Use macros impl for Version

* CodeReview: Comments & Schema

* CodeReview: Remove unused code

* Update pallets/settlement/src/lib.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* Update pallets/asset/src/lib.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* Update pallets/compliance-manager/src/lib.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* Update pallets/identity/src/lib.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* Update pallets/bridge/src/lib.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* Update pallets/identity/src/lib.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* MESH-1393: Refactor snapshots using live queue model (#765)

* mesh-1393: refactor snapshots using live queue

* mesh-1393: address review comments.

* mesh-1393: fix Pip in schema

* mesh-1393: fix chain spec

* mesh-1393: fix integration test

* mesh-1393: add dupe live insert panic test

* mesh-1393: add compare_spip_works test

* mesh-1393: cargo fmt

* committee: embed DispatchResult in Executed (#778)

* Bump systeminformation from 4.27.11 to 4.30.9 in /scripts/cli (#775)

Bumps [systeminformation](https://github.com/sebhildebrandt/systeminformation) from 4.27.11 to 4.30.9.
- [Release notes](https://github.com/sebhildebrandt/systeminformation/releases)
- [Changelog](https://github.com/sebhildebrandt/systeminformation/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sebhildebrandt/systeminformation/commits)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* patch: remove tombstone deposit (#777)

Co-authored-by: satyam <satyam@secureblocks.io>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Mesh 1296/pips benchmarks (#722)

* pips propose benchmark

* cancel_proposal with Community proposer

* added verify blocks + amend_proposal bench

* cleanup and extra assertion

* fixed wasm bench build

* vote and approve_committee_proposal benches

* fixing committee proposal

* #extra benches

* approve_committee_proposal works

* reject_proposal works

* prune_proposal

* prune_proposal works

* reschedule_execution draft

* reschedule_execution works

* fixed reschedule_execution test; clear_snapshot bench

* snapshot works

* enact_snapshot_results

* added pips weight module

* removed deposit variable from propose_from_community

* added pips weight trait

* compilation fixes

* fmt

* removed a bunch of unused bench params

* using a dummy value != 0

* capturing a worser case of vote

* cast_votes bench helper

* elaborated on snapshot and enact benches

* corercted the snapshot queue results and lowered bench param bounds

* lowered bounds even more

* increased the bounds slightly and fixed an assertion failure

* updated the pips weight module

* increased the upper bounds

* replaced bench params with constants + added benches for new extrinsics

* fixed compilation after merge with UserBuilder

* updated pips weight file + fixed assertion in execute_scheduled_pip

* usuccessful attempt to whitelist storage prefixes

* whitelisting voter keys to exclude remove_prefix from weight computation

* updated the weight file

* commented out snapshot and enact_snapshot benches

* removed unused import

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* PTM: Patch for the panic in math operations (#766)

* patch for the panic in math operations

* rename helper function

Co-authored-by: satyam <satyam@secureblocks.io>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Fix schema for protocol fees (#776)

* Fix schema

* typo fix

Co-authored-by: Adam Dossa <adamdossa@Adams-MacBook-Pro.local>
Co-authored-by: Mudit Gupta <guptamudit@ymail.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Add snapshot details to events when snapshot is created (#779)

* Update events

* Neaten

Co-authored-by: Adam Dossa <adamdossa@Adams-MacBook-Pro.local>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Mocked InvestorUid from Cryptographic Library (#780)

* Mocked InvestorUID compliant with UUID v4, generated inside crypto lib.

* Add benchmarks to Confidential (#772)

* Add benchmarks to Confidential

* Remove already executed runtime storage code (#782)

Co-authored-by: Adam Dossa <adamdossa@Adams-MacBook-Pro.local>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* MESH-1388: Reduce chain-spec duplication (#783)

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* Added corporate actions config

Co-authored-by: Mudit Gupta <guptamudit@ymail.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* misc pips cleanup (#784)

Co-authored-by: Mudit Gupta <guptamudit@ymail.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* mesh-1399: declaration date for corporate actions (#785)

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* mesh-1366: nix unused error variants (#787)

* Minor fixes (#786)

* Fixed RecordDateSpec schema

* Replaced pipsorigin (commiteeorigin) with root

* fixed missing permissions error

* Fixed remove_authorizations

* pips and identity benchmark fixes (#788)

* pips benchmark compilation fixes

* identity benchmark fix

Co-authored-by: Mudit Gupta <guptamudit@ymail.com>

* Add benchs to Asset (#762)

Benchmarks on Asset pallet

* Minor fixes and added benchmarks build to CI (#790)

* bye bye referendums

* fixed error codes

* Build binary with benchmarks on CircleCI

* Cleaned up compiler warnings

* Identity benchmark fix

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* MESH-1382/ Same block settlement changes to next block settlement (#763)

* improvement: same block settlement changes to next block settlement

* address fedback comments

* cancel pending executions when affirmation withdraws

* add settlement type check

* minor fixes

* minor fixes

* fix typo

* minor fixes

* event emission

* minor change

Co-authored-by: satyam <satyam@secureblocks.io>

* More minor fixes (#793)

* changed remove_default_trusted_claim_issuer to take issuer identity instead of full object

* verify iu claim only for the receiver

* benchmark build changes

* benchmark build fix

* save cache on success

* Fix testnet authoring_version (#798)

Co-authored-by: Adam Dossa <adamdossa@Adams-MacBook-Pro.local>

* Mesh 1400/update storage hashers (#796)

* wip

* Updated hashers

* Fixed test ordering

Co-authored-by: Adam Dossa <adam.dossa@gmail.com>

* Add benchmarks to balances (#797)

* Add benchmarks to balances

* Bump ini from 1.3.5 to 1.3.8 in /scripts/cli (#806)

Bumps [ini](https://github.com/isaacs/ini) from 1.3.5 to 1.3.8.
- [Release notes](https://github.com/isaacs/ini/releases)
- [Commits](https://github.com/isaacs/ini/compare/v1.3.5...v1.3.8)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Use mocked InvestorUid from crypto (#804)

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Benchmarks in Treasury (#800)

* Add benchmarks to balances

* CodeReview: Remove warnings

* CodeReview: Seed param moved to builder

* Add benchmarks to treasury

* CodeReview: Remove warnings

* Schnorrkel sign as hosted function

* CodeReview: Remove commented code

* CodeReview: Use map instead match

* Update pallets/common/src/benchs/user.rs

CodeReview suggerstion.

* Benchmakrs added to ImOnline (#808)

* Use cryptography's new crate structure (#803)

* Use cryptography's new crate structure

* Increase Max BlockSize & fee

* Fix imports

Co-authored-by: Francisco Miguel García <fmiguelgarcia@users.noreply.github.com>
Co-authored-by: miguel <francisco.miguel.garcia.rodriguez@gmail.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* MESH-1423, MESH-1424, MESH-1425 - Sto and settlement fixes (#807)

* WIP

* Some clean ups

* Fix tests and Claim Receipts logic

* Update pallets/settlement/src/lib.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* Update pallets/settlement/src/lib.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* Fixes and tweaks

* Update pallets/settlement/src/lib.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* Update pallets/settlement/src/lib.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

Co-authored-by: Adam Dossa <adamdossa@Adams-MacBook-Pro.local>
Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Create pull_request_template.md

* Update pull_request_template.md

* Update pull_request_template.md

* Require IU claims for payer and receiver of transfers (#812)

Co-authored-by: Adam Dossa <adamdossa@Adams-MacBook-Pro.local>

* MESH-1409/Add check for zero balance during revoke of IU claim (#809)

* add check for zero balance during revoke of IU claim

* silent the warning for unused variables

* minor nits

* minor re-arrangement

Co-authored-by: satyam <satyam@secureblocks.io>
Co-authored-by: Adam Dossa <adam.dossa@gmail.com>

* MESH-1483: Rename valid_from to trade_date and add value_date (#811)

* Rename valid_from to trade_date and add value_date

* Fix unit tests

* Fix benchmarks

* Remove check on trade_date

Co-authored-by: Adam Dossa <adamdossa@Adams-MacBook-Pro.local>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Add benchmarks to Group pallet (#810)

* Add benchmarks to Group pallet

* minor changes (#813)

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Bump systeminformation from 4.30.9 to 4.32.0 in /scripts/cli (#814)

Bumps [systeminformation](https://github.com/sebhildebrandt/systeminformation) from 4.30.9 to 4.32.0.
- [Release notes](https://github.com/sebhildebrandt/systeminformation/releases)
- [Changelog](https://github.com/sebhildebrandt/systeminformation/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sebhildebrandt/systeminformation/commits)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* MESH-1422: correctly check permissions in batches (#805)

* removed permissions from utility batch + added batch permissions test

* quantifier fix

* event chasing

* batch_secondary_with_permissions passes

* fixed portolio module naming

* test fixed

* Permissions runtime upgrade

* fixes

* added storage migration version

* just remove old storage values

* added const_option

* Portfolio module fix storage upgrade

* review comments

* dedup and comments

* typing

* comment typo fix

* ensure_root_or_signed and minor renaming

* removed cloning

* copy -> move

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* MESH-1387: Corporate Actions Benchmarks (#794)

* mesh-1387: bench set_max_details_length

* mesh-1387: bench reset_caa

* mesh-1387: bench set_default_targets

* mesh-1387: bench set_default_withholding_tax

* mesh-1387: bench set_did_withholding_tax

* mesh-1387: bench initiate_corporate_action

* mesh-1387: bench link_ca_doc

* mesh-1387: bench remove_ca

* mesh-1387: bench change_record_date

* cargo fmt

* mesh-1387: mv ballot.rs -> ballot/mod.rs

* mesh-1387: bench attach_ballot

* mesh-1387: bench change_end

* mesh-1387: bench change_rcv

* mesh-1387: bench remove_ballot

* mesh-1387: bench vote

* mesh-1387: mv distribution.rs -> distribution/mod.rs

* mesh-1387: bench distribute

* mesh-1387: get dist benches working

* mesh-1387: cargo fmt#

* mesh-1387: std-gate set_timestamp

* mesh-1387: assert_ok! -> unwrap

* mesh-1387: cleanup

* mesh-1387: fix rebase fallout

* mesh-1387: inline composite weight fns

* mesh-1387: address review comments

* mesh-1387: move 'user' fn

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* MESH-1413: ASCII-only tickers (#818)

* mesh-1413: ascii-only tickers

* mesh-1413: only printable ascii

* mesh-1413: add test cases

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Fix minor typos (#820)

* Fix minor typos

* Some more comment fixes

* Update pallets/corporate-actions/src/lib.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* Update pallets/corporate-actions/src/lib.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

Co-authored-by: Adam Dossa <adamdossa@Adams-MacBook-Pro.local>
Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* Buffron config changes (#802)

* buffron config

* Updated config

* fixed chainspec

* changed default session keys

* config changes

* new binary

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Remove `IdentityRole` (#830)

* Remove IdentityRole

* CodeReview: Remove migration from `LinkedKeyInfo`

* MESH-1433: Introduce limits for fixed values in CA extrinsic weights (#827)

* mesh-1433: dist benches: quantify did whts

* mesh-1433: introduce limits

* mesh-1433: fix benchmarks

* mesh-1433: test limits

* cargo fmt

* mesh-1433: simplify length checks

Co-authored-by: Francisco Miguel García <fmiguelgarcia@users.noreply.github.com>

Co-authored-by: Francisco Miguel García <fmiguelgarcia@users.noreply.github.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Remove STO, Voting, & Dividend (#826)

* Remove STO, Voting, & Dividend

* Remove STO, Voting, & Dividend

* Add `empty_slot` module

* Remove unused types from schema

* CodeReview: Explicit module index

* CodeReview: privatize `create_at_by`

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* MESH-1095/DocumentHash (#817)

* Document Hash type restricted

* Add migration of `Document`

* Migrate double map with 2 hasher & collect returns

* Migrate only values of AssetDocuments

* Add types to schema

* Add types to schema

* Fix schema

* CodeReview: Remove Clone + Eq

* CodeReview: Removing bounds

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Add benchmarks to permissions (#823)

* Add benchmarks to permissions

* Update pallets/permissions/src/benchmarking.rs

CodeReview: Style

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* Update pallets/permissions/src/benchmarking.rs

CodeReview: Style

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* CodeReview: Replace assert by ensure

* CodeReview: Fix merge

* CodeReview: Rename variable

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* mesh-1357: test pips/staking interaction (#815)

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* removed exemption pallet (#832)

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Add getter to retrieve all the exempted identities (#816)

* add getter to retrieve all the exempted identities

* minor test nit picks

Co-authored-by: satyam <satyam@secureblocks.io>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Mesh 1439/native tms (#829)

* Added base for transfer managers

* wip

* implemented tms

* Integration

* some tests

* wip

* Fixed investor count bug

* Added more tests

* benchmarks

* review comments

* Updated schema

* minor refactoring

* Fixed tests

* minor refactoring

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Remove duplicated schedule event and fix comments (#833)

* Remove duplicated schedule event and fix comments

* Fix warning

* Update to only include new scheduled block in event

* Update pallets/pips/src/lib.rs

Co-authored-by: Mudit Gupta <guptamudit@ymail.com>

Co-authored-by: Adam Dossa <adamdossa@Adams-MacBook-Pro.local>
Co-authored-by: Mudit Gupta <guptamudit@ymail.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Mesh 1373/ Configurable limit on no. of validators for an entity  (#821)

* port 2.0 release changes of substrate staking pallet

* restrict the no. of validators for an indentity

* add test cases

* storage migration

* uncommented tests

* minor feedback's on code comments

* remove uncessary import

* make constructor public

* build fix

* minor improvements

* update dev comment

* change api name

* fix bug

Co-authored-by: satyam <satyam@secureblocks.io>

* MESH-1294/Multisig benchmarks (#743)

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* Fixed identity error in multisig

* WIP

* WIP

* WIP

* WIP

* remove useless multisig create

* fix some comments

* fix rest of comments

* fix rest of comments

* fix rest of comments

* fix macro error and verify errors

* regen weights

* formatting

* bad merge

* formatting

* Update pallets/multisig/src/benchmarking.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* comments

* comments

* WIP: use scheduler

* minor fixes

* scheduler cleanup

* test build fix

* fixed tests

* minor refactoring

* minot comments

* updated code comment

* Added proposal weights to multisig calls

Co-authored-by: Mudit Gupta <guptamudit@ymail.com>
Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Mesh 1383/Settlement Benches (#799)

* remaining benchmarks for settlement

* fix linting

* add contract worst case

* add compliance restriction check for the execute_instruction

* fix the execute_scheduled_instruction extrinsic bench

* add weight traits

* final weight assignments for settlement pallet

* fix linting

* fix settlement test

* cleanup

* supressed warning

* address miguel's feedback

* minor feedback's addressed

* cleanup generate portfolio

* generate different set of conditions

* minor fixes

* fix build

* fix logic bug

* fix bench

* add tms in benchmarks

* add bench numbers

* fix linting

* remove warnings

* supressed warnings

Co-authored-by: satyam <satyam@secureblocks.io>

* Misc cleanups & refactorings, Part 1 (#831)

* simplify committee logic

* move_portfolio_funds: fix atomicity bug

* simplify committee pallet more

* simplify modify_fundraiser_window

* simplify portfolio code

* simplify create_fundraiser

* simplify settlement code

* simplify confidential pallet

* simplify contracts & identity pallets

* simplify asset pallet

* simplify bridge pallet

* cargo fmt

* committee/ensure_did_is_member: use binary search

* committee: extract seat count logic

* cleanup compliance manager & group pallets

* assets: address review comments

* Clean up merge

Co-authored-by: Adam Dossa <adam.dossa@gmail.com>
Co-authored-by: Adam Dossa <adamdossa@Adams-MacBook-Pro.local>

* Update current identity when a key joins a new identity (#835)

* update current identity when key joins a new identity

* split join_identity internal functions

Co-authored-by: Adam Dossa <adam.dossa@gmail.com>

* Misc cleanups & refactorings, Part 2 (#837)

* identity: reduce allocations in remove_secondary_keys

* identity: misc improvements

* simplify multisigs

* simplify permissions

* simplify pips + check perms

* simplify portfolio pallet

* simplify protocol-fee

* cargo fmt

* Fix PIA semantics and forwarded_call permissions (#834)

* simplify committee logic

* move_portfolio_funds: fix atomicity bug

* simplify committee pallet more

* simplify modify_fundraiser_window

* simplify portfolio code

* simplify create_fundraiser

* simplify settlement code

* simplify confidential pallet

* simplify contracts & identity pallets

* simplify asset pallet

* simplify bridge pallet

* cargo fmt

* committee/ensure_did_is_member: use binary search

* committee: extract seat count logic

* cleanup compliance manager & group pallets

* assets: address review comments

* Fix PIA permissions

* Fixes for forwarded calls permissions

* Linting and some test fixes

* More fixes for tests

* Fix benchmarks

* WIP commits

* Add event and fix casing

* linting

* Set PIA back to an Option

* Fix tests

* Fix benchmarks and linting

* Fix tests

* Update pallets/identity/src/lib.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* Fix from merge

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>
Co-authored-by: Adam Dossa <adamdossa@Adams-MacBook-Pro.local>

* Minor refactoring (#847)

* minor refactoring

* Apply suggestions from code review

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* minor optimization

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* MESH-1431/Allow fix rewards (#841)

* allowed fix schedules

* add declaration

* dedup the assert statements

* renaming variables

Co-authored-by: satyam <satyam@secureblocks.io>

* Allow ceiling multiplication in staking (#846)

* allow ceiling multiplication

* specialize the below than 1 case

* fix linting

* apply mudit's suggestion

* fix bug

Co-authored-by: satyam <satyam@secureblocks.io>
Co-authored-by: Adam Dossa <adam.dossa@gmail.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Fix initialisation order and upgrade for PermissionedIdenities (#845)

* Fix initialisation order

* Fix staking upgrade functions

Co-authored-by: Adam Dossa <adamdossa@Adams-MacBook-Pro.local>

* Misc cleanups & refactorings, Part 3 (#843)

* simplify cdd_check

* optimize merge_active_and_inactive

* simplify settlement

* misc refactorings

* nuke dead jurisdiction code

* cargo fmt

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* add schedule instruction weight (#844)

Co-authored-by: satyam <satyam@secureblocks.io>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* reenable slashing (#849)

* MESH-1418/Enforce cdd_id uniqueness (#839)

* enforce cdd_id uniqueness

* address centril's feedbacks

* minor fixes

* minor fix

* fixes tests

Co-authored-by: satyam <satyam@secureblocks.io>
Co-authored-by: Mudit Gupta <guptamudit@ymail.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Refactored Multisig benchmarks (#840)

* removed refunds from multisig

* Added weight for proposal execution

* refactored some benchmarks

* more deduplications

* Added more benchmarks and removed extra fn

* Updated weights

* Added benchmark for proposal execution

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Mesh 1460/STO improvements (#848)

* sto events and status

* minimum investment amount and fundraiser name

* Updated schema

* Fixed unit tests

* minor refactoring

* Update pallets/sto/src/lib.rs

Co-authored-by: Satyam Agrawal <satyam0499@gmail.com>

* Removed unknown fundraiser status

* moved some debug derives to std

Co-authored-by: Satyam Agrawal <satyam0499@gmail.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* cleanup (#850)

* Fixed RPC definitions (#851)

* MESH-1304 Substrate benchmarks (#836)

* Substrate benchmarks added

* updated proof def (#853)

* Mesh 1463/Documentation build fails (#854)

* Substrate benchmarks added

* Add pallet_session benchmark

* Disable `runtime-benchmakrs` feature in default

* MESH-1288 committee benchmarks (#771)

* a couple benches

* set_expires_after bench

* todo

* wip on type inference for pallet instances

* fixed instance type error

* vote_or_propose draft

* set a committee member

* vote_or_propose with variable number of members

* generation of additional proposals

* corrected the expected events on approved proposal

* fixes

* vote draft

* vote bench fixed

* close bench draft

* close bench works

* WIP for propose

* merge fixes in User

* rewrote proposal making

* working on NoSuchProposal

* added committee weight file

* dedup comittee bench

* typing

* typo

* removed commented out code

* Apply suggestions from code review

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* Revert "Apply suggestions from code review"

This reverts commit 08ddcc3ab9cf8ebdc344316cc83c3ca0611405a7.

* review comments

* review comments

* fixed the max number of committee members to 1000

* split vote weight into aye and nay halves

* removed duplicate constant

* fixed typos

* worst-case aye vote

* fixed proposal padding and the member check

* sorted the member dids vec

* reduced the number of members and proposals

* updated the aye voter member index

* vote_aye triggers proposal execution; dev-only constants

* release constants and check of the opposite vote

* reverted committee threshold operator, updated weights

* special case of even number of committee members

* updated committee weights

* fmt

* Update pallets/committee/src/benchmarking.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

Co-authored-by: Adam Dossa <adam.dossa@gmail.com>
Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Initial `make_asset` refactoring (#828)

* Add benchs of exemption pallet

* Fix UT

* CodeReview: `make_asset` to common

* Remove exemption pallet

* CodeReview: Fix settlement bench error after merge

* Update pallets/asset/src/benchmarking.rs

Co-authored-by: Vladimir Komendantskiy <komendantsky@gmail.com>

* Update pallets/asset/src/benchmarking.rs

Co-authored-by: Vladimir Komendantskiy <komendantsky@gmail.com>

* CodeReview: `make_*` returns a result

* re-trigger pipeline

* re-trigger pipeline

Co-authored-by: Vladimir Komendantskiy <komendantsky@gmail.com>

* Mesh 1452/benchs failing (#859)

* Fix statistics benchs & new `running_ci` feature

* Fix identity benchs & add `running-ci` feature

* CodeReview: Fix `running-ci` constant

* Update pallets/identity/src/benchmarking.rs

CodeReview: style fix.

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* Update pallets/identity/src/benchmarking.rs

CodeReview: style.

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* Update pallets/pips/src/benchmarking.rs

CodeReview: Change complexity in PIP with `running-ci`

Co-authored-by: Vladimir Komendantskiy <komendantsky@gmail.com>

* CodeReview: use variable

* CodeReview: Fix the specific `add_transfer_manager`

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>
Co-authored-by: Vladimir Komendantskiy <komendantsky@gmail.com>

* init helper cli (#860)

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* MESH-1468/Add sudo pallet (#861)

* add sudo pallet

* add test suite in circle ci

Co-authored-by: satyam <satyam@secureblocks.io>
Co-authored-by: Adam Dossa <adam.dossa@gmail.com>

* fix initiate_corporate_action weight (#868)

* MESH-1461/Fix underflow/overflow bugs in Asset Identifier Validations (#867)

* WIP

* WIP

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* MESH-1453/Pass legs count in portfolio based extrinsics (#855)

* pass legs count in portfolio based extrinsics

* add fix for add_and_affirm_inst

* fix test suite

* fix benchmark build

* improve test cases

* minor fixes

* fix benchmarks working

* re-trigger pipeline

* minor fixes

* centril's suggestion

* minor re arrangement

* fix integration tests

* bench fixes

Co-authored-by: satyam <satyam@secureblocks.io>

* burn remaining rewards (#865)

Co-authored-by: Adam Dossa <adam.dossa@gmail.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* MESH-1456, MESH-1464, MESH-1459: In committee, nix `close` + only use dynamic threshold (#857)

* mesh-1456: simplify Origin handling

* mesh-1456: add 'type VoteThresholdOrigin'

* mesh-1456: nix close extrinsic

* mesh-1456: Condoned -> Endorsed

* nix MotionDuration

* committee: add migration logic

* PolymeshVotes: nix IdentityId typaram

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Minor refactoring of settlement benchmarks and a bug fix (#856)

* minor refactoring

* wip

* wip

* fixed merge

* Updated instruction execution bench

* updated weights for settlement

* minor refactoring

* bench fix

* Update pallets/settlement/src/lib.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* MESH-1287/Sto Benchmarks (#838)

* WIP

* WIP

* WIP

* WIP

* dedupe

* formatting

* Update pallets/sto/src/benchmarking.rs

Co-authored-by: Vladimir Komendantskiy <komendantsky@gmail.com>

* Update pallets/sto/src/benchmarking.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* comments

* Update pallets/sto/src/benchmarking.rs

Co-authored-by: Mudit Gupta <guptamudit@ymail.com>

* Update pallets/sto/src/benchmarking.rs

Co-authored-by: Mudit Gupta <guptamudit@ymail.com>

* Update primitives/src/ticker.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* Update primitives/src/ticker.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* comments

* comments

* Update pallets/sto/src/benchmarking.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* comments

Co-authored-by: Vladimir Komendantskiy <komendantsky@gmail.com>
Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>
Co-authored-by: Mudit Gupta <guptamudit@ymail.com>

* execute benchmarks in circleci (#875)

* Execute legs in order (#873)

* Added a test case

* execute tx in order

* Added an example edge case to comments

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Fixed minor bugs in sto (#869)

* fixed minor bugs in sto

* updated logic

* Added test case for zero price sto

* Fixed zero balance bug

* Update pallets/sto/src/lib.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* dedup invest call

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* `adjust_live_queue`: fix sort order bug (#880)

* adjust_live_queue: fix sort order bug

* adjust_live_queue: simplify code

* MESH-1489 (CP schedule ref counting) + MESH-1488 (CP schedule expiry-after-ticks) (#882)

* mesh-1489: ref count CP schedules

* mesh-1488: impl schedule expiry

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Wasm Builder as external crate (#876)

* Use external wasm builder

* Use builder revision

* Fix `syn::export::TokenStream2` error

* Update WASM_BINARY generated type

* CodeReview: Remove commented code

* CodeReview: Panic if wasm binary was not generated

* CodeReview: Dedup build

* MESH-1446/ Fix Genesis config ordering (#883)

* Fix Genesis ordering

* Fix Genesis ordering on testnet

* Mitigate overflow (#890)

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Benchmark refactoring (#877)

* renaming of some benchmark vars

* fix wasm execution of ca bench

* dedup iu claim mocking

* Fixed node-bench compilation

* wip

* updated weights

* fixed auto generated weights

* Updated base fees

* Updated weight files to use our constants

* imporved crypto-cli

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Allow receipt signers to invalidate receipts (#878)

* Allow receipt signers to invalidate receipts

* dedup

* Addressed review comments

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Audit 8: Mitigate overflow (#887)

* Mitigate overflow

* New `TooMuchSigners` error

* Update pallets/multisig/src/lib.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* Update pallets/multisig/src/lib.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Updated docs pipeline (#892)

* Updaed docs pipeline

* enabled docs building on patch branch to test

* build dummy wasm binaries

* removed test job

* MESH-1251/ Expose controller transfer as an extrinsic (#879)

* expose controller transfer as an extrinsic

* trigger concourse

* apply suggested changes

* remove controller redemption event

Co-authored-by: satyam <satyam@secureblocks.io>

* Upgrade to Substrate's Polymath fork

* Recover benchmark compilation

* Audit 7: Mitigate Overflow (#889)

* Mitigate overflow

* CodeReview: Error when total price tiers overflows

* Remove some warnings

* CodeReview: Use try_fold

* Update pallets/sto/src/lib.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* CodeReview: Inferrable param

* re-trigger pipeline

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* Impl Simple FIFO with Priority = tip

* SignedExtension for FIFO by priority

* MESH-1397 live queue pips benches + MESH-1395 + MESH-1507 (#822)

* draft snapshot and enact benches

* assert -> ensure

* fixed snapshot setup in enact_snapshot_results

* added pips weights with live queue feature

* minor fix for vector allocation capacity

* added differentiation between Skip, Reject and Approve results

* added 2 comments from older review

* typing fixes

* refactored using User methods

* WIP fails to prune historical pips

* debugging expire_scheduled_pip with set_prune_historical_pips=true

* returned T::Proposal since runtime::Call doesn't unify with it

* expire_scheduled_pip UT works

* fixed pips benchmark panic

* attempt to define dependent ranges

* using plain, independent ranges

* shuffled approve/reject/skip

* added constant for max skipped pip count

* review comment + some debugging

* debug info

* adjust_live_queue: fix sort order bug

* adjust_live_queue: simplify code

* removed debug prints and added a test for execute_scheduled_pip

* updated pips weights

* removed debug code

* moved make_remark_proposal centrally

* capped weight of enact_snapshot_results at MaximumBlockWeight

* introduced new constant for the max weight of enact_snapshot_results

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* TX priority = tip, Unit Tests

* Merge pull request #874 from PolymathNetwork/MESH-1467/Script-to-give-USDP-to-existing-DIDs-on-Alcyone

Mesh 1467/script to give ALCY to existing DIDs on Alcyone

* Upgrade substrate and rust + add code coverage (#886)

* upgraded references to substrate

* patch for syn's api breaking change

* Upgraded cryptography dependency

* Upgraded rust version

* coverage script

* wip

* wip

* Added code coverage to ci

* updated script

* Updated coverage script

* source-coverage

Remove trailing newline from rust-toolchain file

* Updated script

* attempt #358

* re-trigger pipeline

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* updated coverage script

* use unsigned for balances

* Updated path ignores in coverage

* updated scripts

* formating

* fixed new benchmarks

Co-authored-by: Claus Strommer <claus@polymath.network>

* MESH-1490: Checkpoint benchmarks (#891)

* cleanup asset benchs

* mesh-1490: {checkpoint -> checkpoint/mod}.rs

* benchs: cleanup cfgs

* mesh-1490: benchmark checkpoints

* mesh-1490: address review comments

* mesh-1490: use schedule_max_complexity

* fix rebase fallout

* Added codecov config (#896)

* Added codecov config

* caching fixes

* `CheckWeight` re-implemented on polymesh

* Fmt fix

* cargo fixes

* Override some default polkadot types (#895)

* override some default polkadot types

* updated cli dependencies

* Trigger ci

* Remove parity substrate deps

* Temporary CI update

* moved asset types to polymesh-primitives

* Revert temporary CI update

* added asset in primitives

* cargo fixes

* benchmarking fixes

* Update primitives/src/asset.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* removed unused defs and added doc comments

* fmt

* CodeReview: More comments

* comments on terminology

* Update pallets/runtime/extensions/src/check_weight.rs

Co-authored-by: Vladimir Komendantskiy <komendantsky@gmail.com>

* Update pallets/runtime/extensions/src/check_weight.rs

Co-authored-by: Vladimir Komendantskiy <komendantsky@gmail.com>

* explicit typing

* typo fix and fmt

* removed duplicate typedefs from asset pallet, added docs

* fixed import

* cleaned up confidential-asset Cargo.toml

* Mesh 1301 / Fix staking benches (#881)

* initial commit

* add benches for newly added functions

* fix staking benches

* minor improvements

* fix payout stakers

* fix linting

* minor fix in benchmarks compliation

* add weight file

* update weight definitions of extrinsics

* add bench for some remaining extrinsics

* remove weight mod reference

* minor fixes

* bench build fix

* fix bench build

* final-fix

* remove default implementation

Co-authored-by: satyam <satyam@secureblocks.io>
Co-authored-by: Mudit Gupta <guptamudit@ymail.com>

* Moved asset types to polymesh-primitives (#898)

* moved asset types to polymesh-primitives

* added asset in primitives

* benchmarking fixes

* Update primitives/src/asset.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* removed unused defs and added doc comments

* fmt

* comments on terminology

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>
Co-authored-by: Adam Dossa <adam.dossa@gmail.com>

* mostly (confidential) asset fixes

* CircleCI changes (#901)

* CircleCI go brrr

* minor optimizations

* updated caching

* fixed bench

* final run

* refactored settlement Leg and implemented execute_instruction failure reasons MESH-1330

* MESH-1531: Fix Checkpoint.timestamps into double map keyed by `Ticker` (#899)

* mesh-1531: add repro test

* mesh-1531: repro -> regression test

* mesh-1531: add storage migration

* cargo fmt

* mesh-1531: twox -> blake2

* mesh-1531: everybody gets double maps

Co-authored-by: Adam Dossa <adam.dossa@gmail.com>

* MESH-1518/Upgrade to Substrate's Polymath fork (#893)

* Upgrade to Substrate's Polymath fork

* Recover benchmark compilation

* Impl Simple FIFO with Priority = tip

* SignedExtension for FIFO by priority

* TX priority = tip, Unit Tests

* `CheckWeight` re-implemented on polymesh

* Fmt fix

* Remove parity substrate deps

* Temporary CI update

* Revert temporary CI update

* CodeReview: More comments

* Update pallets/runtime/extensions/src/check_weight.rs

Co-authored-by: Vladimir Komendantskiy <komendantsky@gmail.com>

* Update pallets/runtime/extensions/src/check_weight.rs

Co-authored-by: Vladimir Komendantskiy <komendantsky@gmail.com>

Co-authored-by: Vladimir Komendantskiy <komendantsky@gmail.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* fixed issues with affirm_confidential_instruction

* fixed confidential-asset Cargo.toml

* fixed some merge bugs in settlement

* fixed compile-time errors in settlement

* fixed errors in sto

* added ConfidentialAsset in construct_runtime

* typo in testnet runtime

* typo in develop runtime

* Storage migration tests (#900)

* wip

* wip

* wip

* cleanup

* more cleanup

* wip

* restructure

* moving things around

* assert

* minor cleanup

* feature gate migrations

* fixed warnings

* Update migration-tests/src/lib.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* Added checkpoints migration tests

* fixed merge conflict

* Added support for different substrate versions

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* commented out unused imports

* reenabled old versions of packages in migration

* Removed unnecessary constraints (#905)

* removed unnecessary constraints

* fixed settlement benchmarks

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* fixed confidential-asset imports in runtimes

* MESH-1473/Create a list of transactions that require Asset/Portfolio permissions (#894)

* WIP

* WIP

* Update utils/permissions/Cargo.toml

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* WIP

* WIP

* Update utils/permissions/src/doc_parser/enums.rs

Co-authored-by: Francisco Miguel García <fmiguelgarcia@users.noreply.github.com>

* crate docs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>
Co-authored-by: Francisco Miguel García <fmiguelgarcia@users.noreply.github.com>

* Add modify window event and stop event to STO (#903)

* add modify window event and stop event

* Update pallets/sto/src/lib.rs

Co-authored-by: Mudit Gupta <guptamudit@ymail.com>

* Update pallets/sto/src/lib.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* Update pallets/sto/src/lib.rs

Co-authored-by: Mudit Gupta <guptamudit@ymail.com>

* fix build

* add CloseEarly status

* updated schema

* fixed benchmarks

Co-authored-by: Mudit Gupta <guptamudit@ymail.com>
Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Added support for H2 tag perms (#907)

* Added support for H2 tag perms

* closure

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* settlement runtime test fixes

* MESH-1533/Require minimum 1 POLYX bond (#910)

* WIP

* minor changes

Co-authored-by: Mudit Gupta <guptamudit@ymail.com>

* bond 1 polyx in integration tests (#911)

* fixed ValidatorPrefsWithBlocked hack (#913)

* MESH-1379/permission logic integration test (#852)

* added createPortfolio function, modified 4_permission_management and minor change in init.js

* minor changes

* added movePortfolioFunds  function

* added setPortfolio and setExtrinsic functions

* added functions for creating documents and setting asset permissions

* minor changes

* minor change

* minor change

* Trigger Build

* minor change

* fixed minor indentation issue

Co-authored-by: Vladimir Komendantskiy <komendantsky@gmail.com>

Co-authored-by: Vladimir Komendantskiy <komendantsky@gmail.com>
Co-authored-by: Adam Dossa <adam.dossa@gmail.com>

* fixed non-confidential asset tests

* minting tokens when creating non-confidential assets only; no impact on failing tests

* benchmarks std fix

* fixed a few imports

* Script to simplify running JS integration tests  (#902)

* added script

* minor change

* minor changes

* fixed a confidential asset runtime test account_create_tx

* fixed confidential asset tests

* Update Polymesh's subrtrate version to 2.0.1-2 (#909)

* Update Polymesh's subrtrate version

* TX pool drop unpropagable tx if node is not author blocks

Co-authored-by: Mudit Gupta <guptamudit@ymail.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* removed unused imports

* removed unused import in asset

* MESH-1508, MESH-1469: Add Jurisdictions and clean up README.md (#917)

* Clean Ups

* fixed typos

* Update README.md

Co-authored-by: Vladimir Komendantskiy <komendantsky@gmail.com>

* Update primitives/src/jurisdiction.rs

Co-authored-by: Vladimir Komendantskiy <komendantsky@gmail.com>

* line breaks

Co-authored-by: Mudit Gupta <guptamudit@ymail.com>
Co-authored-by: Vladimir Komendantskiy <komendantsky@gmail.com>

* fixed permission issues in confidential asset tests

* misc refactorings

* fixed build error

* transaction ordering runtime test fixes

* add debugging

* fix failing tests: go to next block after rejecting instruction

* refactored balance decryption

* fixed schema typo

* corrected leg defs in settlement integration tests

* cleanup integration tests blocking

* Allow tipping for Operational TX from CDD/GC member (#918)

* Allow tipping for Operational TX from CDD/GC member

* re-trigger pipeline

* CodeReview fixes

* CodeReview: Improve comment

* CodeReview: consistensy

* CodeReview fix

* JS syntax fixes

* more JS syntax fixes

* removed commented code

Co-authored-by: Satyam Agrawal <satyam0499@gmail.com>
Co-authored-by: satyam <satyam@secureblocks.io>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>
Co-authored-by: Mudit Gupta <guptamudit@ymail.com>
Co-authored-by: Francisco Miguel García <fmiguelgarcia@users.noreply.github.com>
Co-authored-by: Adam Dossa <adam.dossa@gmail.com>
Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>
Co-authored-by: Adam Dossa <adamdossa@Adams-MacBook-Pro.local>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Parnian <60563484+ParnianAlimi@users.noreply.github.com>
Co-authored-by: miguel <francisco.miguel.garcia.rodriguez@gmail.com>
Co-authored-by: Joel M…
Neopallium pushed a commit that referenced this pull request May 23, 2023
* Adds an empty confidential asset pallet

Integrate mercat account (#584)

* Add mercat account creation and verification
* Emit account creation event
* Update the cryptography submodule

Weekly Task: Develop to Mercat (#619)

* added clippy script to CI

* added clippy test to dev pr pipeline

* MESH-1233/Rebase-Fees (#572)

* rebase weights

* fix linting

Co-authored-by: satyam <satyam@secureblocks.io>

* MESH-1216: `get_valid_payer`: only accept `AccountId`. (#573)

* mesh-1216: `get_valid_payer`: only accept `AccountId`.

Also do some code cleanup & refactoring.

* refactor fee_details some more

* mesh-1228: mv pallets/runtime/{testnet-v1 -> testnet}

* mesh-1228: rename crate & fix comments

* ci: testnet-v1 -> testnet

* minor change

* added clippy test to the rest of the pipelines

* Atomically create and authorize instructions (#567)

* Added venue type

* schema update

* cli update

* submodule update

* submodule to master branch

* MESH-1232/Remove smart extension api (#558)

* add remove smart extension api

* suggested change applied

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* re-reference to right commit hash for settlement

* Trigger notification

Co-authored-by: satyam <satyam@secureblocks.io>
Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>
Co-authored-by: Adam Dossa <adam.dossa@gmail.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* MESH-1235/remove batch functions (#578)

* remove batch functions

* remove bridge batch functions

Co-authored-by: satyam <satyam@secureblocks.io>

* MESH-1240, MESH-1239, MESH-1238 (#579)

* mesh-1239: move proposer & cool_off_until to Pip

* mesh-1238: add SnapshotId to metadata

* mesh-1240: cache list of committee pips

* MESH-1231: add `get_key_id_data` rpc call (#569)

* mesh-1231: add get_key_id_data rpc call

* mesh-1231: add `KeyIdData` to polymesh_schema

* mesh-1231: key_id -> key_identity

* mesh-1231: address review comments

Co-authored-by: Adam Dossa <adam.dossa@gmail.com>

* Fix asset RPC (#562)

* fix asset rpc

* lint fixing

* comment updated

Co-authored-by: satyam <satyam@secureblocks.io>

* added sendTx to JS Scripts (#585)

Co-authored-by: Adam Dossa <adam.dossa@gmail.com>

* mesh-1236: remove_authorization -> payer: authorized_by (#574)

* DEVOPS-211 (#576)

* DEVOPS-211

* Use `load_var` to read the `rust-toolchain` contents into a variable
* Use the `rust-toolchain` variable to specify the desired Rust
  container

* DEVOPS-211

* Fix variable reference

* DEVOPS-211

* debug

* DEVOPS-211

debug

* DEVOPS-211

Remove trailing newline from `rust-toolchain` file

* DEVOPS-211

* Add rust toolchain selection to develop and tooling pipelines

* DEVOPS-211

* Bugfix

* DEVOPS-211

* Remove `serial` requirement for pipelines in favour of per-worker
  container placement strategy (DEVOPS-212)
* Remove debug configuration

* DEVOPS-211

Integrate changes from DEVOPS-209

* DEVOPS-211

* Use `load_var` to read the `rust-toolchain` contents into a variable
* Use the `rust-toolchain` variable to specify the desired Rust
  container

* DEVOPS-211

* Fix variable reference

* DEVOPS-211

* debug

* DEVOPS-211

debug

* DEVOPS-211

Remove trailing newline from `rust-toolchain` file

* DEVOPS-211

* Add rust toolchain selection to develop and tooling pipelines

* DEVOPS-211

* Bugfix

* DEVOPS-211

* Remove `serial` requirement for pipelines in favour of per-worker
  container placement strategy (DEVOPS-212)
* Remove debug configuration

* DEVOPS-211

Integrate changes from DEVOPS-209

* DEVOPS-211

* Use `load_var` to read the `rust-toolchain` contents into a variable
* Use the `rust-toolchain` variable to specify the desired Rust
  container

* DEVOPS-211

* Fix variable reference

* DEVOPS-211

* debug

* DEVOPS-211

debug

* DEVOPS-211

* Add rust toolchain selection to develop and tooling pipelines

* DEVOPS-211

* Bugfix

* DEVOPS-211

* Remove `serial` requirement for pipelines in favour of per-worker
  container placement strategy (DEVOPS-212)
* Remove debug configuration

* DEVOPS-211

* Fix clippy step inputs

Co-authored-by: Adam Dossa <adam.dossa@gmail.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* MESH-1252 & MESH-1253 (#590)

* mesh-1253: add `created_at: BlockNumber` to `PipsMetadata`.

* mesh-1252: Add `SnapshotId` to `SnapshotResultsEnacted`.

* mesh-1250: `on_runtime_upgrade`, clear V1 PIPs storage. (#591)

* Update readme and genesis files (#593)

* Update README.md (#594)

* MESH-1244: add `#[migrate_from($ty_old)]` form to `#[derive(Migrate)]`. (#592)

* mesh-1244: add `#[migrate_from($ty_old)]` form to `#[derive(Migrate)]`.

* mesh-1244: simplify `extract_migrate_refs` using `get_ident`.

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* DEVOPS-220/alcyone-pipelines (#582)

* Add `alcyone` pipelines.
* Make the `alcyone` pipelines bump versions
* Make `tooling` pipelines not bump versions
* Change PR artifact labeling to distinguish between `develop` and
  `tooling` artifacts

Co-authored-by: Adam Dossa <adam.dossa@gmail.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* MESH-1166/Scope of Claim refactor (#560)

* first go

* Update base.rs

* fix non-settlement tests

* first go at upgrade

* fix bad submodule

* formatting

* fix bad merge

* formatting

* submodule bump

* Update primitives/src/identity_claim.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* upgrade compliance manager storage

* update schema

* wip

* wip

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>
Co-authored-by: Adam Dossa <adam.dossa@gmail.com>

* DEVOPS-174/purge-cache (#595)

* DEVOPS-174/purge-cache

* Add cargo-sweep to cached rust tasks

* DEVOPS-174/purge-cache

* Fix `cargo test` / `cargo sweep`

* DEVOPS-174/purge-cache

* DEVOPS-227 / reduce `npm test` noise

* DEVOPS-174/purge-cache

DEVOPS-228: improve timeout conditions

* Move the `npm test` timeout inside the script and use coreutils
  timeout instead
* Remove archived `master` pipelines

* DEVOPS-174/purge-cache

* More aggressive cache purging
* Fix `npm test` redirect bug

* DEVOPS-174/purge-cache

* Remove timeout from alcyone pipelines
* Set tooling pipelines to not `put` semver updates

* DEVOPS-174/purge-cache

* Reset cargo cache when it reaches 10GB

* DEVOPS-174/purge-cache

* Handle undeletable `target/` directory (because it's a volume mount)

Co-authored-by: Adam Dossa <adam.dossa@gmail.com>

* MESH-1074/Enforce scope claim to assets transfer (#583)

* enforce scope claim to assets

* Centril: feedback addressed

* fix linting

* fix: avoid returning default as true for sender

* add implicit requirements within the granular_verification

* update schema

* add additional test

* use doc comments

* simplify rpc

* remove debug from wasm

* code rearrangement

* minor improvement

* lint fix

Co-authored-by: satyam <satyam@secureblocks.io>
Co-authored-by: Adam Dossa <adam.dossa@gmail.com>

* removed staking fuzzer from workplace (#597)

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* mesh-1243: add migrate_double_map_keys (#604)

* DEVOPS-232/move-polymesh-pipelines (#602)

* DEVOPS-232/move-polymesh-pipelines

* Remove deprecated Concourse files

* trigger

* DEVOPS-232/move-polymesh-pipelines

* Missing && in cli test

* trigger

* trigger

* DEVOPS-232/move-polymesh-pipelines

Undo 0c69bbd7965b2546bee457bcebb1bc09324c2763

* DEVOPS-232/move-polymesh-pipelines

Update CODEOWNERS file

Co-authored-by: Adam Dossa <adam.dossa@gmail.com>

* MESH-1257: Runtime upgrade functionality for CDD_ID. (#600)

* mesh-1257: Runtime upgrade functionality for CDD_ID.

This amends `Migrate` with `type Context`.
To `derive(Migrate)` we add `migrate_context`, `migrate_with`,
and `migrate_from` on enum variants.

* mesh-1257: more migrate_context docs

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Update README (#605)

* MESH-1262: Infer `Proposer<_>` from `origin` on `Pips::propose`. (#606)

* mesh-1262: infer proposer from origin on `Pips::propose`.

* mesh-1262: fix governance js test

* Portfolio, Custodianship, and Settlement changes (#518)

* Portfolio custodian

* accept portfolio custody

* tests fixed

* removed dispatchables for old custody approach

* wip

* merge fixes

* verify_portfolio

* wip

* added portoflio transfer fn

* lock unlock tokens

* build fix

* wip

* custodian check

* wip

* portfolio subtrait

* wip

* wip

* rpc fixed

* submodule update

* schema update

* wip

* cli fix

* use PortfolioId in PortfolioCustody auth

* minor refactoring

* parameter reordering

* submodule update

* api for moving portfolio funds updated

* Documentation wip

* fixed tests

* Added token lock and custody tests

* some code comments

* wip

* wip

* refactored tests

* settlement tests

* import fix

* Added settlement tests

* removed mut

* copy schema script

* fixed tests

* updated submodule

* Removed internal transfer function

* cleaned up comments

* review suggestions

Co-authored-by: Satyam Agrawal <satyam0499@gmail.com>

* Bump substrate rc4 => rc5+2 => rc6 (#587)

* substrate: rc4 -> rc5+2 in deps

* substrate upgrade -> rc5: fix fallout

* substrate: rc5+2 -> rc6 in deps

* substrate upgrade -> rc6: fix fallout

* substrate upgrade: bump another crate to rc6

* substrate -> rc6: cleanup

* substrate -> rc6: add ValidateUnsigned to Babe

* substrate -> rc6: cargo update

* substrate -> rc6: fix rebase fallout

* Removed submodules (#609)

* settlement module moved to main repo

* Import cryptography library from GH via cargo dependency

* Updated CircleCI to not use submodules

* Updated test scirpts to use dummy wasm

* updated cryptography branch

* removed gitignore from settlement folder

* trigger

* run it again

Co-authored-by: Claus Strommer <claus@polymath.network>

* Updated cryptography branch (#612)

* Update max inflation from 20% to 14% (#611)

* change payout_stakers dispatch weight to the 1/4 of the actual weight (#614)

Co-authored-by: satyam <satyam@secureblocks.io>

* Update REWARD_CURVE for testnet (#617)

* mesh-1141: add 'PipsMetadata::transaction_version' (#610)

Co-authored-by: CJP10 <14205938+CJP10@users.noreply.github.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* fix reference problem

* fix linting

* fix tests and remove old reference

Co-authored-by: Joel Moore <47923231+JMoore96@users.noreply.github.com>
Co-authored-by: satyam <satyam@secureblocks.io>
Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>
Co-authored-by: Mudit Gupta <guptamudit@ymail.com>
Co-authored-by: Adam Dossa <adam.dossa@gmail.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>
Co-authored-by: Claus Strommer <63645659+cwsatpolymath@users.noreply.github.com>
Co-authored-by: CJP10 <14205938+CJP10@users.noreply.github.com>
Co-authored-by: Claus Strommer <claus@polymath.network>

Add support for creating confidential assets. (#623)

* Add support for creating confidential assets.

Mint Confidential Assets (#615)

CRYP-160: Integrate confidential asset minting with  Polymesh

base structure of the confidential transfer (#642)

* Integrates confidential transfer
* Update the schema with types for creating an account, minting tokens, and transferring tokens

Cryp 169/end to end test (#683)

* Refactor base64 encodings for account create, mint, and transfer
* Adds extrinsic and storage for mediator account

Co-authored-by: Mudit Gupta <guptamudit@ymail.com>
Co-authored-by: satyam <satyam@secureblocks.io>

[MERCAT] Add support for transaction ordering (#684)

Add support for transaction ordering.

[MERCAT] Some refactoring (#713)

* Address MESH-1331, MESH-1329, and CRYP-173.
* Refactor exectue_instruction function
* Refactor the rng.rs file as a primitive.
* And a few more things.

[MERCAT]: Add pallet docs (#701)

revert the shnorrkel module

fix more conflicts and re-refer to the 2.0.0 sub release

change reference of bulletproofs and curve25519_dalek

crate version fixes (#736)

successful build

fix tests

fix linting

Cryp 187/change mercat dependencies (#792)

* Change the dependencies to cryptography rep
* Point to v2-mainnet branch of cryptography

Co-authored-by: Vladimir Komendantskiy <komendantsky@gmail.com>
Co-authored-by: Francisco Miguel García <fmiguelgarcia@users.noreply.github.com>

Mesh 1523/develop to mercat + MESH-1330 (#897)

* Contracts: upgrade to 3.0.0-rc2 ink! release (#731)

* upgrade to 3.0.0-rc2 ink release

* fix linting

* update readme

Co-authored-by: satyam <satyam@secureblocks.io>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Fixed Document type in schema

* Added an unexpected error event

* Mesh 1289/compliance manager bench (#720)

* Compliance Manager benchmarking added

* More benchs and its verification part

* Source code formatting

* UT compilation errors fixed

* Add limits

* Doc & renaming of types

* Rust fmt applied

* CodeReview: Only complexity can limit

Co-authored-by: Adam Dossa <adam.dossa@gmail.com>

* Fixed Document type in schema (#738)

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* MESH-1365: Add CA + Ballot tests [Part 1] (#728)

* mesh-1365: extend only_caa_authorized with new extrinsics

* mesh-1365: test remove_ca

* mesh-1365: test change_record_date

* mesh-1365: attach_ballot tests

* mesh-1365: Ballot::change_* tests

* mesh-1365: test remove_ballot

* mesh-1365: test vote extrinsic

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Mesh 1349/update permissions (#733)

* wip

* wip

* Added portfolio perms to asset and sto module

* Added asset management permissions

* fixed test

* Fixed primitives test

* Updated schema

* Minor refactoring

* minor refactoring

* added docs

* Added missing perm check

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>
Co-authored-by: Adam Dossa <adam.dossa@gmail.com>

* MESH-1365: Add CA + Ballot + Distribution tests [Part 2] (#740)

* mesh-1365: test distribute

* mesh-1365: rest remove_distribution

* mesh-1365: test reclaim

* mesh-1365: harden sortedness testing

* mesh-1365: test claim + push_benefit

* mesh-1365: unscrew a test

* mesh-1365: TRANGE -> T_RANGE

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>
Co-authored-by: Adam Dossa <adam.dossa@gmail.com>

* MESH-1367: Fix `remove_authorization` logic (#742)

* Fix remove_authorization

* Add additional test and clear context between tests

* Tighten tests with assert_noop

* Fix linting

Co-authored-by: Adam Dossa <adamdossa@Adams-MacBook-Pro.local>

* fix CA.details typo in schema (#745)

* mesh-1374: add reserve_classic_ticker (#746)

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Added receipt metadata (#747)

Co-authored-by: Adam Dossa <adam.dossa@gmail.com>

* atomi add and affirm instruction (#749)

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Added LegacyPermissions as a workaround for a polkadot.js bug (#751)

* Added LegacyPermissions as a workaround for a polkadot.js bug

* reduced duplication

* minor refactoring from review suggestion

* Fixed identity migration

* Fix migrations

* change default type of releases

* Mesh 1300/Settlement benches (#726)

* initial setup for settlement benchmarking

* add update_venue benchmark

* instruction bench

* add benchmark for add_instruction

* benchamrks for settlement added

* add benchamrks for some other extrinsics

* reduce code complexity

* add setup for the affirm_instruction

* fix build

* fix linting

* minor fixes

* add WeightInfo trait

* some rearrangements

* minor modifications

* introduce some more benches and refactor some of parts

* fix test build

* fix linting

Co-authored-by: satyam <satyam@secureblocks.io>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Removed redundant permission (#758)

* Mesh 1324: use scheduler in pips (#704)

* wip

* added ExecutionScheduler and ExpiryScheduler in pips

* removed dependency on pallet_scheduler

* updated pips trait in staking UT

* updated staking mock

* added unique PIP names in the scheduler

* comments and Agenda length assertions in unit tests

* Update pallets/pips/src/lib.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* todo about the Substrate scheduler issue

* Apply suggestions from code review

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* removed duplicate definition

* returning errors from execute_proposal

* assertion of existence of an event matching a pattern

* fixed 8 out of 12 tests

* remove unscheduled pips

* fixed 1 out of 4 tests

* fixed the 0 enactment period scheduled block issue

* Apply suggestions from code review

Co-authored-by: Francisco Miguel García <fmiguelgarcia@users.noreply.github.com>

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>
Co-authored-by: Francisco Miguel García <fmiguelgarcia@users.noreply.github.com>

* Utility Benchmarks (#741)

* Compliance Manager benchmarking added

* More benchs and its verification part

* Source code formatting

* UT compilation errors fixed

* Add limits

* Doc & renaming of types

* Rust fmt applied

* CodeReview: Only complexity can limit

* Utility benchmarks added

* Add relay_tx benchmark

* Fix some errors

* CodeReview: Use No-Op remark in Utility benches

* CodeReview: Remove commented code

* CodeReview: UserBuilder added

Co-authored-by: Adam Dossa <adam.dossa@gmail.com>

* Renaming and minor fixes (#760)

* removed js reserved keywords from variable names

* Updated errors in set_permission_to_signer

* fixed schema

* Add batches to the bridge module (#767)

* Add back batches

* Add schema and CDD logic

* Linting

Co-authored-by: Adam Dossa <adamdossa@Adams-MacBook-Pro.local>

* CalendarPeriod: fix schema (#761)

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Changed validator count to accommodate genesis authorities (#764)

* Changed validator count to accomodate genesis authorities

* Increased epoch duration

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Mesh 1381/contracts benches (#759)

* initialize benchmark

* contract benchmarks initial setup

* finalize contract benches

* add weights for contracts

* fix linting

* Use new functionality of creating the account in benchmarks

* fix tests

* use benchmarked weights

* minor fixes

Co-authored-by: satyam <satyam@secureblocks.io>

* Update Mock CDD Register DID (#756)

* Compliance Manager benchmarking added

* More benchs and its verification part

* Source code formatting

* UT compilation errors fixed

* Add limits

* Doc & renaming of types

* Rust fmt applied

* CodeReview: Only complexity can limit

* Utility benchmarks added

* Add relay_tx benchmark

* Fix some errors

* CodeReview: Use No-Op remark in Utility benches

* CodeReview: Remove commented code

* Migrate CDD_ID mocked creation

* CodeReview: UserBuilder added

* Runtime upgrades based on curr spec version

* Storage version per pallet

* CodeReview: Remove unused from `migrate_cdd_claim`

* Add `Version` type to schema

* CodeReview: Remove multisig migration

* CodeReview: Update <StorageVersion> inside `if`

* Use macro impl for Version (#769)

* Use macros impl for Version

* CodeReview: Comments & Schema

* CodeReview: Remove unused code

* Update pallets/settlement/src/lib.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* Update pallets/asset/src/lib.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* Update pallets/compliance-manager/src/lib.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* Update pallets/identity/src/lib.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* Update pallets/bridge/src/lib.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* Update pallets/identity/src/lib.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* MESH-1393: Refactor snapshots using live queue model (#765)

* mesh-1393: refactor snapshots using live queue

* mesh-1393: address review comments.

* mesh-1393: fix Pip in schema

* mesh-1393: fix chain spec

* mesh-1393: fix integration test

* mesh-1393: add dupe live insert panic test

* mesh-1393: add compare_spip_works test

* mesh-1393: cargo fmt

* committee: embed DispatchResult in Executed (#778)

* Bump systeminformation from 4.27.11 to 4.30.9 in /scripts/cli (#775)

Bumps [systeminformation](https://github.com/sebhildebrandt/systeminformation) from 4.27.11 to 4.30.9.
- [Release notes](https://github.com/sebhildebrandt/systeminformation/releases)
- [Changelog](https://github.com/sebhildebrandt/systeminformation/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sebhildebrandt/systeminformation/commits)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* patch: remove tombstone deposit (#777)

Co-authored-by: satyam <satyam@secureblocks.io>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Mesh 1296/pips benchmarks (#722)

* pips propose benchmark

* cancel_proposal with Community proposer

* added verify blocks + amend_proposal bench

* cleanup and extra assertion

* fixed wasm bench build

* vote and approve_committee_proposal benches

* fixing committee proposal

* #extra benches

* approve_committee_proposal works

* reject_proposal works

* prune_proposal

* prune_proposal works

* reschedule_execution draft

* reschedule_execution works

* fixed reschedule_execution test; clear_snapshot bench

* snapshot works

* enact_snapshot_results

* added pips weight module

* removed deposit variable from propose_from_community

* added pips weight trait

* compilation fixes

* fmt

* removed a bunch of unused bench params

* using a dummy value != 0

* capturing a worser case of vote

* cast_votes bench helper

* elaborated on snapshot and enact benches

* corercted the snapshot queue results and lowered bench param bounds

* lowered bounds even more

* increased the bounds slightly and fixed an assertion failure

* updated the pips weight module

* increased the upper bounds

* replaced bench params with constants + added benches for new extrinsics

* fixed compilation after merge with UserBuilder

* updated pips weight file + fixed assertion in execute_scheduled_pip

* usuccessful attempt to whitelist storage prefixes

* whitelisting voter keys to exclude remove_prefix from weight computation

* updated the weight file

* commented out snapshot and enact_snapshot benches

* removed unused import

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* PTM: Patch for the panic in math operations (#766)

* patch for the panic in math operations

* rename helper function

Co-authored-by: satyam <satyam@secureblocks.io>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Fix schema for protocol fees (#776)

* Fix schema

* typo fix

Co-authored-by: Adam Dossa <adamdossa@Adams-MacBook-Pro.local>
Co-authored-by: Mudit Gupta <guptamudit@ymail.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Add snapshot details to events when snapshot is created (#779)

* Update events

* Neaten

Co-authored-by: Adam Dossa <adamdossa@Adams-MacBook-Pro.local>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Mocked InvestorUid from Cryptographic Library (#780)

* Mocked InvestorUID compliant with UUID v4, generated inside crypto lib.

* Add benchmarks to Confidential (#772)

* Add benchmarks to Confidential

* Remove already executed runtime storage code (#782)

Co-authored-by: Adam Dossa <adamdossa@Adams-MacBook-Pro.local>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* MESH-1388: Reduce chain-spec duplication (#783)

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* Added corporate actions config

Co-authored-by: Mudit Gupta <guptamudit@ymail.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* misc pips cleanup (#784)

Co-authored-by: Mudit Gupta <guptamudit@ymail.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* mesh-1399: declaration date for corporate actions (#785)

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* mesh-1366: nix unused error variants (#787)

* Minor fixes (#786)

* Fixed RecordDateSpec schema

* Replaced pipsorigin (commiteeorigin) with root

* fixed missing permissions error

* Fixed remove_authorizations

* pips and identity benchmark fixes (#788)

* pips benchmark compilation fixes

* identity benchmark fix

Co-authored-by: Mudit Gupta <guptamudit@ymail.com>

* Add benchs to Asset (#762)

Benchmarks on Asset pallet

* Minor fixes and added benchmarks build to CI (#790)

* bye bye referendums

* fixed error codes

* Build binary with benchmarks on CircleCI

* Cleaned up compiler warnings

* Identity benchmark fix

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* MESH-1382/ Same block settlement changes to next block settlement (#763)

* improvement: same block settlement changes to next block settlement

* address fedback comments

* cancel pending executions when affirmation withdraws

* add settlement type check

* minor fixes

* minor fixes

* fix typo

* minor fixes

* event emission

* minor change

Co-authored-by: satyam <satyam@secureblocks.io>

* More minor fixes (#793)

* changed remove_default_trusted_claim_issuer to take issuer identity instead of full object

* verify iu claim only for the receiver

* benchmark build changes

* benchmark build fix

* save cache on success

* Fix testnet authoring_version (#798)

Co-authored-by: Adam Dossa <adamdossa@Adams-MacBook-Pro.local>

* Mesh 1400/update storage hashers (#796)

* wip

* Updated hashers

* Fixed test ordering

Co-authored-by: Adam Dossa <adam.dossa@gmail.com>

* Add benchmarks to balances (#797)

* Add benchmarks to balances

* Bump ini from 1.3.5 to 1.3.8 in /scripts/cli (#806)

Bumps [ini](https://github.com/isaacs/ini) from 1.3.5 to 1.3.8.
- [Release notes](https://github.com/isaacs/ini/releases)
- [Commits](https://github.com/isaacs/ini/compare/v1.3.5...v1.3.8)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Use mocked InvestorUid from crypto (#804)

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Benchmarks in Treasury (#800)

* Add benchmarks to balances

* CodeReview: Remove warnings

* CodeReview: Seed param moved to builder

* Add benchmarks to treasury

* CodeReview: Remove warnings

* Schnorrkel sign as hosted function

* CodeReview: Remove commented code

* CodeReview: Use map instead match

* Update pallets/common/src/benchs/user.rs

CodeReview suggerstion.

* Benchmakrs added to ImOnline (#808)

* Use cryptography's new crate structure (#803)

* Use cryptography's new crate structure

* Increase Max BlockSize & fee

* Fix imports

Co-authored-by: Francisco Miguel García <fmiguelgarcia@users.noreply.github.com>
Co-authored-by: miguel <francisco.miguel.garcia.rodriguez@gmail.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* MESH-1423, MESH-1424, MESH-1425 - Sto and settlement fixes (#807)

* WIP

* Some clean ups

* Fix tests and Claim Receipts logic

* Update pallets/settlement/src/lib.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* Update pallets/settlement/src/lib.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* Fixes and tweaks

* Update pallets/settlement/src/lib.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* Update pallets/settlement/src/lib.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

Co-authored-by: Adam Dossa <adamdossa@Adams-MacBook-Pro.local>
Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Create pull_request_template.md

* Update pull_request_template.md

* Update pull_request_template.md

* Require IU claims for payer and receiver of transfers (#812)

Co-authored-by: Adam Dossa <adamdossa@Adams-MacBook-Pro.local>

* MESH-1409/Add check for zero balance during revoke of IU claim (#809)

* add check for zero balance during revoke of IU claim

* silent the warning for unused variables

* minor nits

* minor re-arrangement

Co-authored-by: satyam <satyam@secureblocks.io>
Co-authored-by: Adam Dossa <adam.dossa@gmail.com>

* MESH-1483: Rename valid_from to trade_date and add value_date (#811)

* Rename valid_from to trade_date and add value_date

* Fix unit tests

* Fix benchmarks

* Remove check on trade_date

Co-authored-by: Adam Dossa <adamdossa@Adams-MacBook-Pro.local>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Add benchmarks to Group pallet (#810)

* Add benchmarks to Group pallet

* minor changes (#813)

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Bump systeminformation from 4.30.9 to 4.32.0 in /scripts/cli (#814)

Bumps [systeminformation](https://github.com/sebhildebrandt/systeminformation) from 4.30.9 to 4.32.0.
- [Release notes](https://github.com/sebhildebrandt/systeminformation/releases)
- [Changelog](https://github.com/sebhildebrandt/systeminformation/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sebhildebrandt/systeminformation/commits)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* MESH-1422: correctly check permissions in batches (#805)

* removed permissions from utility batch + added batch permissions test

* quantifier fix

* event chasing

* batch_secondary_with_permissions passes

* fixed portolio module naming

* test fixed

* Permissions runtime upgrade

* fixes

* added storage migration version

* just remove old storage values

* added const_option

* Portfolio module fix storage upgrade

* review comments

* dedup and comments

* typing

* comment typo fix

* ensure_root_or_signed and minor renaming

* removed cloning

* copy -> move

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* MESH-1387: Corporate Actions Benchmarks (#794)

* mesh-1387: bench set_max_details_length

* mesh-1387: bench reset_caa

* mesh-1387: bench set_default_targets

* mesh-1387: bench set_default_withholding_tax

* mesh-1387: bench set_did_withholding_tax

* mesh-1387: bench initiate_corporate_action

* mesh-1387: bench link_ca_doc

* mesh-1387: bench remove_ca

* mesh-1387: bench change_record_date

* cargo fmt

* mesh-1387: mv ballot.rs -> ballot/mod.rs

* mesh-1387: bench attach_ballot

* mesh-1387: bench change_end

* mesh-1387: bench change_rcv

* mesh-1387: bench remove_ballot

* mesh-1387: bench vote

* mesh-1387: mv distribution.rs -> distribution/mod.rs

* mesh-1387: bench distribute

* mesh-1387: get dist benches working

* mesh-1387: cargo fmt#

* mesh-1387: std-gate set_timestamp

* mesh-1387: assert_ok! -> unwrap

* mesh-1387: cleanup

* mesh-1387: fix rebase fallout

* mesh-1387: inline composite weight fns

* mesh-1387: address review comments

* mesh-1387: move 'user' fn

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* MESH-1413: ASCII-only tickers (#818)

* mesh-1413: ascii-only tickers

* mesh-1413: only printable ascii

* mesh-1413: add test cases

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Fix minor typos (#820)

* Fix minor typos

* Some more comment fixes

* Update pallets/corporate-actions/src/lib.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* Update pallets/corporate-actions/src/lib.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

Co-authored-by: Adam Dossa <adamdossa@Adams-MacBook-Pro.local>
Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* Buffron config changes (#802)

* buffron config

* Updated config

* fixed chainspec

* changed default session keys

* config changes

* new binary

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Remove `IdentityRole` (#830)

* Remove IdentityRole

* CodeReview: Remove migration from `LinkedKeyInfo`

* MESH-1433: Introduce limits for fixed values in CA extrinsic weights (#827)

* mesh-1433: dist benches: quantify did whts

* mesh-1433: introduce limits

* mesh-1433: fix benchmarks

* mesh-1433: test limits

* cargo fmt

* mesh-1433: simplify length checks

Co-authored-by: Francisco Miguel García <fmiguelgarcia@users.noreply.github.com>

Co-authored-by: Francisco Miguel García <fmiguelgarcia@users.noreply.github.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Remove STO, Voting, & Dividend (#826)

* Remove STO, Voting, & Dividend

* Remove STO, Voting, & Dividend

* Add `empty_slot` module

* Remove unused types from schema

* CodeReview: Explicit module index

* CodeReview: privatize `create_at_by`

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* MESH-1095/DocumentHash (#817)

* Document Hash type restricted

* Add migration of `Document`

* Migrate double map with 2 hasher & collect returns

* Migrate only values of AssetDocuments

* Add types to schema

* Add types to schema

* Fix schema

* CodeReview: Remove Clone + Eq

* CodeReview: Removing bounds

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Add benchmarks to permissions (#823)

* Add benchmarks to permissions

* Update pallets/permissions/src/benchmarking.rs

CodeReview: Style

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* Update pallets/permissions/src/benchmarking.rs

CodeReview: Style

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* CodeReview: Replace assert by ensure

* CodeReview: Fix merge

* CodeReview: Rename variable

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* mesh-1357: test pips/staking interaction (#815)

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* removed exemption pallet (#832)

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Add getter to retrieve all the exempted identities (#816)

* add getter to retrieve all the exempted identities

* minor test nit picks

Co-authored-by: satyam <satyam@secureblocks.io>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Mesh 1439/native tms (#829)

* Added base for transfer managers

* wip

* implemented tms

* Integration

* some tests

* wip

* Fixed investor count bug

* Added more tests

* benchmarks

* review comments

* Updated schema

* minor refactoring

* Fixed tests

* minor refactoring

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Remove duplicated schedule event and fix comments (#833)

* Remove duplicated schedule event and fix comments

* Fix warning

* Update to only include new scheduled block in event

* Update pallets/pips/src/lib.rs

Co-authored-by: Mudit Gupta <guptamudit@ymail.com>

Co-authored-by: Adam Dossa <adamdossa@Adams-MacBook-Pro.local>
Co-authored-by: Mudit Gupta <guptamudit@ymail.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Mesh 1373/ Configurable limit on no. of validators for an entity  (#821)

* port 2.0 release changes of substrate staking pallet

* restrict the no. of validators for an indentity

* add test cases

* storage migration

* uncommented tests

* minor feedback's on code comments

* remove uncessary import

* make constructor public

* build fix

* minor improvements

* update dev comment

* change api name

* fix bug

Co-authored-by: satyam <satyam@secureblocks.io>

* MESH-1294/Multisig benchmarks (#743)

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* Fixed identity error in multisig

* WIP

* WIP

* WIP

* WIP

* remove useless multisig create

* fix some comments

* fix rest of comments

* fix rest of comments

* fix rest of comments

* fix macro error and verify errors

* regen weights

* formatting

* bad merge

* formatting

* Update pallets/multisig/src/benchmarking.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* comments

* comments

* WIP: use scheduler

* minor fixes

* scheduler cleanup

* test build fix

* fixed tests

* minor refactoring

* minot comments

* updated code comment

* Added proposal weights to multisig calls

Co-authored-by: Mudit Gupta <guptamudit@ymail.com>
Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Mesh 1383/Settlement Benches (#799)

* remaining benchmarks for settlement

* fix linting

* add contract worst case

* add compliance restriction check for the execute_instruction

* fix the execute_scheduled_instruction extrinsic bench

* add weight traits

* final weight assignments for settlement pallet

* fix linting

* fix settlement test

* cleanup

* supressed warning

* address miguel's feedback

* minor feedback's addressed

* cleanup generate portfolio

* generate different set of conditions

* minor fixes

* fix build

* fix logic bug

* fix bench

* add tms in benchmarks

* add bench numbers

* fix linting

* remove warnings

* supressed warnings

Co-authored-by: satyam <satyam@secureblocks.io>

* Misc cleanups & refactorings, Part 1 (#831)

* simplify committee logic

* move_portfolio_funds: fix atomicity bug

* simplify committee pallet more

* simplify modify_fundraiser_window

* simplify portfolio code

* simplify create_fundraiser

* simplify settlement code

* simplify confidential pallet

* simplify contracts & identity pallets

* simplify asset pallet

* simplify bridge pallet

* cargo fmt

* committee/ensure_did_is_member: use binary search

* committee: extract seat count logic

* cleanup compliance manager & group pallets

* assets: address review comments

* Clean up merge

Co-authored-by: Adam Dossa <adam.dossa@gmail.com>
Co-authored-by: Adam Dossa <adamdossa@Adams-MacBook-Pro.local>

* Update current identity when a key joins a new identity (#835)

* update current identity when key joins a new identity

* split join_identity internal functions

Co-authored-by: Adam Dossa <adam.dossa@gmail.com>

* Misc cleanups & refactorings, Part 2 (#837)

* identity: reduce allocations in remove_secondary_keys

* identity: misc improvements

* simplify multisigs

* simplify permissions

* simplify pips + check perms

* simplify portfolio pallet

* simplify protocol-fee

* cargo fmt

* Fix PIA semantics and forwarded_call permissions (#834)

* simplify committee logic

* move_portfolio_funds: fix atomicity bug

* simplify committee pallet more

* simplify modify_fundraiser_window

* simplify portfolio code

* simplify create_fundraiser

* simplify settlement code

* simplify confidential pallet

* simplify contracts & identity pallets

* simplify asset pallet

* simplify bridge pallet

* cargo fmt

* committee/ensure_did_is_member: use binary search

* committee: extract seat count logic

* cleanup compliance manager & group pallets

* assets: address review comments

* Fix PIA permissions

* Fixes for forwarded calls permissions

* Linting and some test fixes

* More fixes for tests

* Fix benchmarks

* WIP commits

* Add event and fix casing

* linting

* Set PIA back to an Option

* Fix tests

* Fix benchmarks and linting

* Fix tests

* Update pallets/identity/src/lib.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* Fix from merge

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>
Co-authored-by: Adam Dossa <adamdossa@Adams-MacBook-Pro.local>

* Minor refactoring (#847)

* minor refactoring

* Apply suggestions from code review

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* minor optimization

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* MESH-1431/Allow fix rewards (#841)

* allowed fix schedules

* add declaration

* dedup the assert statements

* renaming variables

Co-authored-by: satyam <satyam@secureblocks.io>

* Allow ceiling multiplication in staking (#846)

* allow ceiling multiplication

* specialize the below than 1 case

* fix linting

* apply mudit's suggestion

* fix bug

Co-authored-by: satyam <satyam@secureblocks.io>
Co-authored-by: Adam Dossa <adam.dossa@gmail.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Fix initialisation order and upgrade for PermissionedIdenities (#845)

* Fix initialisation order

* Fix staking upgrade functions

Co-authored-by: Adam Dossa <adamdossa@Adams-MacBook-Pro.local>

* Misc cleanups & refactorings, Part 3 (#843)

* simplify cdd_check

* optimize merge_active_and_inactive

* simplify settlement

* misc refactorings

* nuke dead jurisdiction code

* cargo fmt

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* add schedule instruction weight (#844)

Co-authored-by: satyam <satyam@secureblocks.io>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* reenable slashing (#849)

* MESH-1418/Enforce cdd_id uniqueness (#839)

* enforce cdd_id uniqueness

* address centril's feedbacks

* minor fixes

* minor fix

* fixes tests

Co-authored-by: satyam <satyam@secureblocks.io>
Co-authored-by: Mudit Gupta <guptamudit@ymail.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Refactored Multisig benchmarks (#840)

* removed refunds from multisig

* Added weight for proposal execution

* refactored some benchmarks

* more deduplications

* Added more benchmarks and removed extra fn

* Updated weights

* Added benchmark for proposal execution

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Mesh 1460/STO improvements (#848)

* sto events and status

* minimum investment amount and fundraiser name

* Updated schema

* Fixed unit tests

* minor refactoring

* Update pallets/sto/src/lib.rs

Co-authored-by: Satyam Agrawal <satyam0499@gmail.com>

* Removed unknown fundraiser status

* moved some debug derives to std

Co-authored-by: Satyam Agrawal <satyam0499@gmail.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* cleanup (#850)

* Fixed RPC definitions (#851)

* MESH-1304 Substrate benchmarks (#836)

* Substrate benchmarks added

* updated proof def (#853)

* Mesh 1463/Documentation build fails (#854)

* Substrate benchmarks added

* Add pallet_session benchmark

* Disable `runtime-benchmakrs` feature in default

* MESH-1288 committee benchmarks (#771)

* a couple benches

* set_expires_after bench

* todo

* wip on type inference for pallet instances

* fixed instance type error

* vote_or_propose draft

* set a committee member

* vote_or_propose with variable number of members

* generation of additional proposals

* corrected the expected events on approved proposal

* fixes

* vote draft

* vote bench fixed

* close bench draft

* close bench works

* WIP for propose

* merge fixes in User

* rewrote proposal making

* working on NoSuchProposal

* added committee weight file

* dedup comittee bench

* typing

* typo

* removed commented out code

* Apply suggestions from code review

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* Revert "Apply suggestions from code review"

This reverts commit 08ddcc3ab9cf8ebdc344316cc83c3ca0611405a7.

* review comments

* review comments

* fixed the max number of committee members to 1000

* split vote weight into aye and nay halves

* removed duplicate constant

* fixed typos

* worst-case aye vote

* fixed proposal padding and the member check

* sorted the member dids vec

* reduced the number of members and proposals

* updated the aye voter member index

* vote_aye triggers proposal execution; dev-only constants

* release constants and check of the opposite vote

* reverted committee threshold operator, updated weights

* special case of even number of committee members

* updated committee weights

* fmt

* Update pallets/committee/src/benchmarking.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

Co-authored-by: Adam Dossa <adam.dossa@gmail.com>
Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Initial `make_asset` refactoring (#828)

* Add benchs of exemption pallet

* Fix UT

* CodeReview: `make_asset` to common

* Remove exemption pallet

* CodeReview: Fix settlement bench error after merge

* Update pallets/asset/src/benchmarking.rs

Co-authored-by: Vladimir Komendantskiy <komendantsky@gmail.com>

* Update pallets/asset/src/benchmarking.rs

Co-authored-by: Vladimir Komendantskiy <komendantsky@gmail.com>

* CodeReview: `make_*` returns a result

* re-trigger pipeline

* re-trigger pipeline

Co-authored-by: Vladimir Komendantskiy <komendantsky@gmail.com>

* Mesh 1452/benchs failing (#859)

* Fix statistics benchs & new `running_ci` feature

* Fix identity benchs & add `running-ci` feature

* CodeReview: Fix `running-ci` constant

* Update pallets/identity/src/benchmarking.rs

CodeReview: style fix.

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* Update pallets/identity/src/benchmarking.rs

CodeReview: style.

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* Update pallets/pips/src/benchmarking.rs

CodeReview: Change complexity in PIP with `running-ci`

Co-authored-by: Vladimir Komendantskiy <komendantsky@gmail.com>

* CodeReview: use variable

* CodeReview: Fix the specific `add_transfer_manager`

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>
Co-authored-by: Vladimir Komendantskiy <komendantsky@gmail.com>

* init helper cli (#860)

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* MESH-1468/Add sudo pallet (#861)

* add sudo pallet

* add test suite in circle ci

Co-authored-by: satyam <satyam@secureblocks.io>
Co-authored-by: Adam Dossa <adam.dossa@gmail.com>

* fix initiate_corporate_action weight (#868)

* MESH-1461/Fix underflow/overflow bugs in Asset Identifier Validations (#867)

* WIP

* WIP

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* MESH-1453/Pass legs count in portfolio based extrinsics (#855)

* pass legs count in portfolio based extrinsics

* add fix for add_and_affirm_inst

* fix test suite

* fix benchmark build

* improve test cases

* minor fixes

* fix benchmarks working

* re-trigger pipeline

* minor fixes

* centril's suggestion

* minor re arrangement

* fix integration tests

* bench fixes

Co-authored-by: satyam <satyam@secureblocks.io>

* burn remaining rewards (#865)

Co-authored-by: Adam Dossa <adam.dossa@gmail.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* MESH-1456, MESH-1464, MESH-1459: In committee, nix `close` + only use dynamic threshold (#857)

* mesh-1456: simplify Origin handling

* mesh-1456: add 'type VoteThresholdOrigin'

* mesh-1456: nix close extrinsic

* mesh-1456: Condoned -> Endorsed

* nix MotionDuration

* committee: add migration logic

* PolymeshVotes: nix IdentityId typaram

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Minor refactoring of settlement benchmarks and a bug fix (#856)

* minor refactoring

* wip

* wip

* fixed merge

* Updated instruction execution bench

* updated weights for settlement

* minor refactoring

* bench fix

* Update pallets/settlement/src/lib.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* MESH-1287/Sto Benchmarks (#838)

* WIP

* WIP

* WIP

* WIP

* dedupe

* formatting

* Update pallets/sto/src/benchmarking.rs

Co-authored-by: Vladimir Komendantskiy <komendantsky@gmail.com>

* Update pallets/sto/src/benchmarking.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* comments

* Update pallets/sto/src/benchmarking.rs

Co-authored-by: Mudit Gupta <guptamudit@ymail.com>

* Update pallets/sto/src/benchmarking.rs

Co-authored-by: Mudit Gupta <guptamudit@ymail.com>

* Update primitives/src/ticker.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* Update primitives/src/ticker.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* comments

* comments

* Update pallets/sto/src/benchmarking.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* comments

Co-authored-by: Vladimir Komendantskiy <komendantsky@gmail.com>
Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>
Co-authored-by: Mudit Gupta <guptamudit@ymail.com>

* execute benchmarks in circleci (#875)

* Execute legs in order (#873)

* Added a test case

* execute tx in order

* Added an example edge case to comments

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Fixed minor bugs in sto (#869)

* fixed minor bugs in sto

* updated logic

* Added test case for zero price sto

* Fixed zero balance bug

* Update pallets/sto/src/lib.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* dedup invest call

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* `adjust_live_queue`: fix sort order bug (#880)

* adjust_live_queue: fix sort order bug

* adjust_live_queue: simplify code

* MESH-1489 (CP schedule ref counting) + MESH-1488 (CP schedule expiry-after-ticks) (#882)

* mesh-1489: ref count CP schedules

* mesh-1488: impl schedule expiry

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Wasm Builder as external crate (#876)

* Use external wasm builder

* Use builder revision

* Fix `syn::export::TokenStream2` error

* Update WASM_BINARY generated type

* CodeReview: Remove commented code

* CodeReview: Panic if wasm binary was not generated

* CodeReview: Dedup build

* MESH-1446/ Fix Genesis config ordering (#883)

* Fix Genesis ordering

* Fix Genesis ordering on testnet

* Mitigate overflow (#890)

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Benchmark refactoring (#877)

* renaming of some benchmark vars

* fix wasm execution of ca bench

* dedup iu claim mocking

* Fixed node-bench compilation

* wip

* updated weights

* fixed auto generated weights

* Updated base fees

* Updated weight files to use our constants

* imporved crypto-cli

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Allow receipt signers to invalidate receipts (#878)

* Allow receipt signers to invalidate receipts

* dedup

* Addressed review comments

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Audit 8: Mitigate overflow (#887)

* Mitigate overflow

* New `TooMuchSigners` error

* Update pallets/multisig/src/lib.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* Update pallets/multisig/src/lib.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Updated docs pipeline (#892)

* Updaed docs pipeline

* enabled docs building on patch branch to test

* build dummy wasm binaries

* removed test job

* MESH-1251/ Expose controller transfer as an extrinsic (#879)

* expose controller transfer as an extrinsic

* trigger concourse

* apply suggested changes

* remove controller redemption event

Co-authored-by: satyam <satyam@secureblocks.io>

* Upgrade to Substrate's Polymath fork

* Recover benchmark compilation

* Audit 7: Mitigate Overflow (#889)

* Mitigate overflow

* CodeReview: Error when total price tiers overflows

* Remove some warnings

* CodeReview: Use try_fold

* Update pallets/sto/src/lib.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* CodeReview: Inferrable param

* re-trigger pipeline

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* Impl Simple FIFO with Priority = tip

* SignedExtension for FIFO by priority

* MESH-1397 live queue pips benches + MESH-1395 + MESH-1507 (#822)

* draft snapshot and enact benches

* assert -> ensure

* fixed snapshot setup in enact_snapshot_results

* added pips weights with live queue feature

* minor fix for vector allocation capacity

* added differentiation between Skip, Reject and Approve results

* added 2 comments from older review

* typing fixes

* refactored using User methods

* WIP fails to prune historical pips

* debugging expire_scheduled_pip with set_prune_historical_pips=true

* returned T::Proposal since runtime::Call doesn't unify with it

* expire_scheduled_pip UT works

* fixed pips benchmark panic

* attempt to define dependent ranges

* using plain, independent ranges

* shuffled approve/reject/skip

* added constant for max skipped pip count

* review comment + some debugging

* debug info

* adjust_live_queue: fix sort order bug

* adjust_live_queue: simplify code

* removed debug prints and added a test for execute_scheduled_pip

* updated pips weights

* removed debug code

* moved make_remark_proposal centrally

* capped weight of enact_snapshot_results at MaximumBlockWeight

* introduced new constant for the max weight of enact_snapshot_results

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* TX priority = tip, Unit Tests

* Merge pull request #874 from PolymathNetwork/MESH-1467/Script-to-give-USDP-to-existing-DIDs-on-Alcyone

Mesh 1467/script to give ALCY to existing DIDs on Alcyone

* Upgrade substrate and rust + add code coverage (#886)

* upgraded references to substrate

* patch for syn's api breaking change

* Upgraded cryptography dependency

* Upgraded rust version

* coverage script

* wip

* wip

* Added code coverage to ci

* updated script

* Updated coverage script

* source-coverage

Remove trailing newline from rust-toolchain file

* Updated script

* attempt #358

* re-trigger pipeline

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* updated coverage script

* use unsigned for balances

* Updated path ignores in coverage

* updated scripts

* formating

* fixed new benchmarks

Co-authored-by: Claus Strommer <claus@polymath.network>

* MESH-1490: Checkpoint benchmarks (#891)

* cleanup asset benchs

* mesh-1490: {checkpoint -> checkpoint/mod}.rs

* benchs: cleanup cfgs

* mesh-1490: benchmark checkpoints

* mesh-1490: address review comments

* mesh-1490: use schedule_max_complexity

* fix rebase fallout

* Added codecov config (#896)

* Added codecov config

* caching fixes

* `CheckWeight` re-implemented on polymesh

* Fmt fix

* cargo fixes

* Override some default polkadot types (#895)

* override some default polkadot types

* updated cli dependencies

* Trigger ci

* Remove parity substrate deps

* Temporary CI update

* moved asset types to polymesh-primitives

* Revert temporary CI update

* added asset in primitives

* cargo fixes

* benchmarking fixes

* Update primitives/src/asset.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* removed unused defs and added doc comments

* fmt

* CodeReview: More comments

* comments on terminology

* Update pallets/runtime/extensions/src/check_weight.rs

Co-authored-by: Vladimir Komendantskiy <komendantsky@gmail.com>

* Update pallets/runtime/extensions/src/check_weight.rs

Co-authored-by: Vladimir Komendantskiy <komendantsky@gmail.com>

* explicit typing

* typo fix and fmt

* removed duplicate typedefs from asset pallet, added docs

* fixed import

* cleaned up confidential-asset Cargo.toml

* Mesh 1301 / Fix staking benches (#881)

* initial commit

* add benches for newly added functions

* fix staking benches

* minor improvements

* fix payout stakers

* fix linting

* minor fix in benchmarks compliation

* add weight file

* update weight definitions of extrinsics

* add bench for some remaining extrinsics

* remove weight mod reference

* minor fixes

* bench build fix

* fix bench build

* final-fix

* remove default implementation

Co-authored-by: satyam <satyam@secureblocks.io>
Co-authored-by: Mudit Gupta <guptamudit@ymail.com>

* Moved asset types to polymesh-primitives (#898)

* moved asset types to polymesh-primitives

* added asset in primitives

* benchmarking fixes

* Update primitives/src/asset.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* removed unused defs and added doc comments

* fmt

* comments on terminology

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>
Co-authored-by: Adam Dossa <adam.dossa@gmail.com>

* mostly (confidential) asset fixes

* CircleCI changes (#901)

* CircleCI go brrr

* minor optimizations

* updated caching

* fixed bench

* final run

* refactored settlement Leg and implemented execute_instruction failure reasons MESH-1330

* MESH-1531: Fix Checkpoint.timestamps into double map keyed by `Ticker` (#899)

* mesh-1531: add repro test

* mesh-1531: repro -> regression test

* mesh-1531: add storage migration

* cargo fmt

* mesh-1531: twox -> blake2

* mesh-1531: everybody gets double maps

Co-authored-by: Adam Dossa <adam.dossa@gmail.com>

* MESH-1518/Upgrade to Substrate's Polymath fork (#893)

* Upgrade to Substrate's Polymath fork

* Recover benchmark compilation

* Impl Simple FIFO with Priority = tip

* SignedExtension for FIFO by priority

* TX priority = tip, Unit Tests

* `CheckWeight` re-implemented on polymesh

* Fmt fix

* Remove parity substrate deps

* Temporary CI update

* Revert temporary CI update

* CodeReview: More comments

* Update pallets/runtime/extensions/src/check_weight.rs

Co-authored-by: Vladimir Komendantskiy <komendantsky@gmail.com>

* Update pallets/runtime/extensions/src/check_weight.rs

Co-authored-by: Vladimir Komendantskiy <komendantsky@gmail.com>

Co-authored-by: Vladimir Komendantskiy <komendantsky@gmail.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* fixed issues with affirm_confidential_instruction

* fixed confidential-asset Cargo.toml

* fixed some merge bugs in settlement

* fixed compile-time errors in settlement

* fixed errors in sto

* added ConfidentialAsset in construct_runtime

* typo in testnet runtime

* typo in develop runtime

* Storage migration tests (#900)

* wip

* wip

* wip

* cleanup

* more cleanup

* wip

* restructure

* moving things around

* assert

* minor cleanup

* feature gate migrations

* fixed warnings

* Update migration-tests/src/lib.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* Added checkpoints migration tests

* fixed merge conflict

* Added support for different substrate versions

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* commented out unused imports

* reenabled old versions of packages in migration

* Removed unnecessary constraints (#905)

* removed unnecessary constraints

* fixed settlement benchmarks

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* fixed confidential-asset imports in runtimes

* MESH-1473/Create a list of transactions that require Asset/Portfolio permissions (#894)

* WIP

* WIP

* Update utils/permissions/Cargo.toml

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* WIP

* WIP

* Update utils/permissions/src/doc_parser/enums.rs

Co-authored-by: Francisco Miguel García <fmiguelgarcia@users.noreply.github.com>

* crate docs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>
Co-authored-by: Francisco Miguel García <fmiguelgarcia@users.noreply.github.com>

* Add modify window event and stop event to STO (#903)

* add modify window event and stop event

* Update pallets/sto/src/lib.rs

Co-authored-by: Mudit Gupta <guptamudit@ymail.com>

* Update pallets/sto/src/lib.rs

Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>

* Update pallets/sto/src/lib.rs

Co-authored-by: Mudit Gupta <guptamudit@ymail.com>

* fix build

* add CloseEarly status

* updated schema

* fixed benchmarks

Co-authored-by: Mudit Gupta <guptamudit@ymail.com>
Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* Added support for H2 tag perms (#907)

* Added support for H2 tag perms

* closure

Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* settlement runtime test fixes

* MESH-1533/Require minimum 1 POLYX bond (#910)

* WIP

* minor changes

Co-authored-by: Mudit Gupta <guptamudit@ymail.com>

* bond 1 polyx in integration tests (#911)

* fixed ValidatorPrefsWithBlocked hack (#913)

* MESH-1379/permission logic integration test (#852)

* added createPortfolio function, modified 4_permission_management and minor change in init.js

* minor changes

* added movePortfolioFunds  function

* added setPortfolio and setExtrinsic functions

* added functions for creating documents and setting asset permissions

* minor changes

* minor change

* minor change

* Trigger Build

* minor change

* fixed minor indentation issue

Co-authored-by: Vladimir Komendantskiy <komendantsky@gmail.com>

Co-authored-by: Vladimir Komendantskiy <komendantsky@gmail.com>
Co-authored-by: Adam Dossa <adam.dossa@gmail.com>

* fixed non-confidential asset tests

* minting tokens when creating non-confidential assets only; no impact on failing tests

* benchmarks std fix

* fixed a few imports

* Script to simplify running JS integration tests  (#902)

* added script

* minor change

* minor changes

* fixed a confidential asset runtime test account_create_tx

* fixed confidential asset tests

* Update Polymesh's subrtrate version to 2.0.1-2 (#909)

* Update Polymesh's subrtrate version

* TX pool drop unpropagable tx if node is not author blocks

Co-authored-by: Mudit Gupta <guptamudit@ymail.com>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>

* removed unused imports

* removed unused import in asset

* MESH-1508, MESH-1469: Add Jurisdictions and clean up README.md (#917)

* Clean Ups

* fixed typos

* Update README.md

Co-authored-by: Vladimir Komendantskiy <komendantsky@gmail.com>

* Update primitives/src/jurisdiction.rs

Co-authored-by: Vladimir Komendantskiy <komendantsky@gmail.com>

* line breaks

Co-authored-by: Mudit Gupta <guptamudit@ymail.com>
Co-authored-by: Vladimir Komendantskiy <komendantsky@gmail.com>

* fixed permission issues in confidential asset tests

* misc refactorings

* fixed build error

* transaction ordering runtime test fixes

* add debugging

* fix failing tests: go to next block after rejecting instruction

* refactored balance decryption

* fixed schema typo

* corrected leg defs in settlement integration tests

* cleanup integration tests blocking

* Allow tipping for Operational TX from CDD/GC member (#918)

* Allow tipping for Operational TX from CDD/GC member

* re-trigger pipeline

* CodeReview fixes

* CodeReview: Improve comment

* CodeReview: consistensy

* CodeReview fix

* JS syntax fixes

* more JS syntax fixes

* removed commented code

Co-authored-by: Satyam Agrawal <satyam0499@gmail.com>
Co-authored-by: satyam <satyam@secureblocks.io>
Co-authored-by: poly-auto-merge[bot] <65769705+poly-auto-merge[bot]@users.noreply.github.com>
Co-authored-by: Mudit Gupta <guptamudit@ymail.com>
Co-authored-by: Francisco Miguel García <fmiguelgarcia@users.noreply.github.com>
Co-authored-by: Adam Dossa <adam.dossa@gmail.com>
Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>
Co-authored-by: Adam Dossa <adamdossa@Adams-MacBook-Pro.local>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Parnian <60563484+ParnianAlimi@users.noreply.github.com>
Co-authored-by: miguel <francisco.miguel.garcia.rodriguez@gmail.com>
Co-authored-by: Joel M…
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge-after-ci PR can be merged after CI has completed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants