Skip to content

Commit 65dedf0

Browse files
adamdossaNeopalliumraycar5JMoore96monitz87
authored
Polymesh 5.0.0-rc1 to testnet (#1247)
* Add generated schema for error types. (#1167) * Bump rust nightly 2021-12-08 (#1178) * Bump rust nightly. Bump packed_simd_2 to fix nightly compile issue. * Update nightly version in Circle CI. * Fix benchmarks for nightly. * Try fixing circle ci resource usage issue. * Fixup. * Try downloading rustup. * Use defaults for rustup install. * Fixup rustup install steps. * More fixups. * Don't sudo the rustup installer. * Fix rustup setup. * Fix wasm-gc build. * Need more packages for building. * Need to install rustup first. * FIXUP * Remove extra cache folder. * add sonar-project.properties (#1180) * Fix docs build. (#1182) * Small schema fix. (#1181) * Bump nightly again to use newer docker image. (#1183) * Bump nightly again to use newer docker image. * Update circleci docker images. * Mesh 1673/integrate jest into js tests (#1146) * added jest config, and libraries * test: configure jest to for polkadot compatibility The latest polkadot versions do not play well with jest out of the box * created identity test using Jest * added --silent to Jest so comments are ignored * minor change in jest.config file so setup.ts isn't seen as a test * package.json using space instead of tab * minor formatting * minor formatting * replacing nonce with -1 * added poly transfer test * added sqlite3 * modified sqlite3 script and made minor changes in init script * changed table name and added error message * minor changes to timeout value in tests * added 2_key_management and 3_auth_join_did tests * increased timeout value of tests * added more tests * increased timeout for tests * minor changes and setting Jest to run sequentially * added --silent tag * minor changes to clean code * minor change * changed to ./test.sh * minor change * minor changes * updated types * minor change to fix ci error * Updated comment Co-authored-by: polymath-eric <[email protected]> * minor change * minor change * minor changes * Update package name to include @PolymathNetwork * Set package to private Co-authored-by: Jeremias Diaz <[email protected]> Co-authored-by: Robert Gabriel Jakabosky <[email protected]> Co-authored-by: polymath-eric <[email protected]> Co-authored-by: Adam Dossa <[email protected]> * Fix permissions complexity limits (#1189) * Add permissions complexity limits. * Update permissions limits in benchmark/tests. * Bump spec_version to be one more then mainnet. * Fix typo in MultiSig benchmarks. * Cargo fmt * Comment cleanup and add fold method to SubsetRestriction. * Add docs. A little dedup. * Add minimum complexity cost for names. Large number of pallet/extrinsic permissions cause the most cpu load from many memory allocation calls. Add a minimum complexity cost (minimum name length) to penalize short names. * Cargo fmt * Include permmisions complexity in extrinsic weight. (#1192) * Permissions benchmarks cleanup (#1193) * Some comments and cleanup. * Add docs to helper functions. * Add more comments to benchmark. * MESH 1654/ITN Rewards JS Test (#1190) * added rewards_helper file and modified itn test * renamed current itn rewards test to portfolio test * created new ITN Rewards Test * minor change to 15_portfolio test * minor change * created function to check eraElectionStatus is closed * minor change * minor change * minor change * minor change * assert if claim doesnt exist and wrong accounts used * formatting * Fix schema for InvestorZKProofData type. (#1194) * Fix multi node script (#1191) * Fix multi-node setup. * Add a third operator to the 'local' chains. * Temp fix for incorrect type definition in Polkadot.js. * Fix issue with Charlie. * Cargo fmt Co-authored-by: Adam Dossa <[email protected]> * Update benchmarks (#1197) * Update benchmarks * Linting * Update benchmarks * Update cargo.lock * Update weights template. (#1195) Co-authored-by: Adam Dossa <[email protected]> * Fix order of calls in identity pallet. (#1201) * MESH-1759 Remove porfolio name to number mapping after deletion (#1200) * Remove porfolio name to number mapping after deletion * Create migration * Apply suggestions from code review Co-authored-by: Mazdak Farrokhzad <[email protected]> * Drop unused var Co-authored-by: Mazdak Farrokhzad <[email protected]> * MESH-1773 & MESH-1777 condition cost function (#1204) * Improve ComplianceManager benchmarks. * Prevent a large number of empty asset compliance requirements from being added to an asset. * Code cleanup. * Upgrade Substrate to monthly-11 (#1188) * MESH-1787 relayer fixes (#1209) * Ensure `accept_paying_key` is called by `user_key` Improve description of errors. * Add missing weight. * Bump versions. * Refactor fee_details duplication (#1213) * refactor fee_details * fix imports * Bump simple-get from 2.8.1 to 2.8.2 in /scripts/event-listener (#1206) Bumps [simple-get](https://github.com/feross/simple-get) from 2.8.1 to 2.8.2. - [Release notes](https://github.com/feross/simple-get/releases) - [Commits](feross/simple-get@v2.8.1...v2.8.2) --- updated-dependencies: - dependency-name: simple-get dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump follow-redirects from 1.14.2 to 1.14.9 in /scripts/cli (#1215) Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.14.2 to 1.14.9. - [Release notes](https://github.com/follow-redirects/follow-redirects/releases) - [Commits](follow-redirects/follow-redirects@v1.14.2...v1.14.9) --- updated-dependencies: - dependency-name: follow-redirects dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump vm2 from 3.9.5 to 3.9.8 in /scripts/cli (#1216) Bumps [vm2](https://github.com/patriksimek/vm2) from 3.9.5 to 3.9.8. - [Release notes](https://github.com/patriksimek/vm2/releases) - [Changelog](https://github.com/patriksimek/vm2/blob/master/CHANGELOG.md) - [Commits](patriksimek/vm2@3.9.5...3.9.8) --- updated-dependencies: - dependency-name: vm2 dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump shelljs from 0.8.4 to 0.8.5 in /scripts/cli (#1207) Bumps [shelljs](https://github.com/shelljs/shelljs) from 0.8.4 to 0.8.5. - [Release notes](https://github.com/shelljs/shelljs/releases) - [Changelog](https://github.com/shelljs/shelljs/blob/master/CHANGELOG.md) - [Commits](shelljs/shelljs@v0.8.4...v0.8.5) --- updated-dependencies: - dependency-name: shelljs dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * MESH-1770/ Error `ConfidentialScopeClaimNotAllowed` is used for two different failure cases (#1214) * minor change to error message * updated documentation * minor change in identity_test Co-authored-by: Robert Gabriel Jakabosky <[email protected]> * New unit testing framework (#1198) * WIP * WIP * WIP * WIP * Update pallets/runtime/tests/exec_macro/src/lib.rs Co-authored-by: Mazdak Farrokhzad <[email protected]> * Update pallets/runtime/tests/src/storage.rs Co-authored-by: Mazdak Farrokhzad <[email protected]> * WIP * WIP * WIP Co-authored-by: Mazdak Farrokhzad <[email protected]> * Bump polkadot versions to fix schema issue. (#1219) * New spec version format and bump major version. (#1223) * Fix issue with MultiSig Proposal to id map. (#1225) * MESH-1793 multisig primary/secondary key with balance. (#1224) * Remove dead code. MultiSig signers are never linked directly to an identity. * Remove unused `MultiSig::get_key_signers()` * Rename `make_multisig_signer` to `make_multisig_secondary` * Fix MultiSig balance check. * Add test for primary key MultiSig with balance. * Change MultiSig balance restriction to 1 POLYX. * docs cleanup. * MESH-1792/ improving signer already linked errors (#1226) * modified errors * update comment Co-authored-by: Mazdak Farrokhzad <[email protected]> Co-authored-by: Mazdak Farrokhzad <[email protected]> Co-authored-by: Robert Gabriel Jakabosky <[email protected]> * MESH-1767 - Add secondary key and permissions length checks to `cdd_register_did` (#1221) * modified base_cdd_register_did function * minor change * minor change * minor change and formatting * minor changes and comments Co-authored-by: Adam Dossa <[email protected]> Co-authored-by: Robert Gabriel Jakabosky <[email protected]> * Bump minimist from 1.2.5 to 1.2.6 in /scripts/cli (#1228) Bumps [minimist](https://github.com/substack/minimist) from 1.2.5 to 1.2.6. - [Release notes](https://github.com/substack/minimist/releases) - [Commits](https://github.com/substack/minimist/compare/1.2.5...1.2.6) --- updated-dependencies: - dependency-name: minimist dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * MESH-1790/Create 4 new extrinsics to wrap up pipelined batches (#1222) * WIP * fix create_group_and_add_auth * fix initiate_corporate_action_and_distribute * Update pallets/corporate-actions/src/lib.rs Co-authored-by: Robert Gabriel Jakabosky <[email protected]> * Update pallets/corporate-actions/src/lib.rs Co-authored-by: Robert Gabriel Jakabosky <[email protected]> * resolve comments * resolve comments * fix compile errors * format * add create_and_change_custom_group * format * move exttrinsics * use with_transaction Co-authored-by: Robert Gabriel Jakabosky <[email protected]> Co-authored-by: Adam Dossa <[email protected]> * Mesh 1696/finish converting TS tests to Jest (#1196) * created 8_asset_minting Jest Test * created 9_bridge_transfer Jest Test * created 10_governance_management Jest Test * created 11_A_settlement & 11_B_settlement Jest Tests * created 12_external_agents Jest Test and modified createVenue function * removed old TS Tests * minor change * created 13_corporate_actions Jest Test * created 14_investment Jest Test * remove old TS Tests * updated libraries * modified jest.config, package.json, init.ts, and jest tests * created 15_portfolio, 16_relayer, and 17_itn_rewards * removed old TS tests * updated types and package.json libraries with minor changes to scripts * minor change * minor formatting * updated readme * updated types * updated types * minor changes * minor scripts change in package.json * Trigger new concourse run. Remove unused sqlite. * minor change * updated types and package.json * minor change * minor change * minor changes * minor changes Co-authored-by: Robert G. Jakabosky <[email protected]> Co-authored-by: Adam Dossa <[email protected]> * MESH-1768 custom asset metadata (#1218) * Move `Url` to primitives crate. * Asset metadata support. * Fix unit-tests. * Add some unit-tests. * Add asset metadata events. * Add docs. * Add limit checks. * Add tests. * Add missing schema types. * Fix schema and polkadot.js issue. * Update weights. * Add asset metadata type definition example. * Add example Asset Metadata Schema. * Cargo fmt * Code cleanup. * Add Asset::register_and_set_local_metadata() call. * Update weights. Co-authored-by: Adam Dossa <[email protected]> * MESH-1099 foreign transfer manager (#1159) * Add new generic statistics support. * Refactor StatType. * IdentityId instead of PortfolioId * Add new transfer compliance support. * Add some stats tests. * Fix bug with count and ownership transfer rules. * Add tests for transfer condition rules. * Add missing types to schema. * Add missing types StatUpdate to schema. * Support newer substrate. * Some tests cleanup. * Add Exempt support for Transfer Compliance rules. * Use StatClaim instead of Claim. * Claim cleanup. * Add support for 'Non'-claim transfer conditions. * Add list of CountryCode variants. * Add benchmarks. * Use BTreeSet instead of Vec. * Add events. * Cleanup. * Fix benchmarks. * Update weights. * Fixup schema. * Regen TS types. * Add new transfer compliance results to RPC asset_canTransferGranular result * Fix schema for GranularCanTransferResult type. * Migrate old TransferManagers to new system. * Permissions docs fixup. * Add new error variant, Comment cleanup. * Version RPC changes. * Add more docs. * Regen TS types. * Fix protfolio tests. * Improve comments. * Regen TS types. Co-authored-by: Adam Dossa <[email protected]> * Bump ansi-regex from 3.0.0 to 3.0.1 in /scripts/event-listener (#1229) Bumps [ansi-regex](https://github.com/chalk/ansi-regex) from 3.0.0 to 3.0.1. - [Release notes](https://github.com/chalk/ansi-regex/releases) - [Commits](chalk/ansi-regex@v3.0.0...v3.0.1) --- updated-dependencies: - dependency-name: ansi-regex dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Fix coverage (#1230) * Use Circleci rust image to fix build issue. * Fix sudo tests. * Use integration mode. * Enable more tests for coverage. * Bump moment from 2.24.0 to 2.29.2 in /scripts/event-listener (#1231) Bumps [moment](https://github.com/moment/moment) from 2.24.0 to 2.29.2. - [Release notes](https://github.com/moment/moment/releases) - [Changelog](https://github.com/moment/moment/blob/develop/CHANGELOG.md) - [Commits](moment/moment@2.24.0...2.29.2) --- updated-dependencies: - dependency-name: moment dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * MESH-1803/ Add missing tests for MESH-1792 & MESH-1767 (#1227) * added test for SignerAlreadyLinkedToIdentity Error * added test for MultisigNotAllowedToLinkToItself error * adding comments * added test for permissions length limited * removed ensure_perms_limited test and added secondary_key_with_bad_permissions test Co-authored-by: Robert Gabriel Jakabosky <[email protected]> * MESH-1806 verify did in treasury disbursement (#1233) * Add tests for bad treasury disbursement. * Update treasury disbursement test with new error. * Check for valid identities during disbursement. * Add test for treasury InsufficientBalance. * Move logic into base_ functions. * cargo fmt * Remove unused register_keyring_account_without_cdd. * Use `Currency::transfer` for disbursements. * Update pallets/treasury/src/lib.rs Co-authored-by: Mazdak Farrokhzad <[email protected]> Co-authored-by: Mazdak Farrokhzad <[email protected]> * MESH-1802/Add `AssetIdentifier::FIGI` + validate (#1234) * init impl * Update primitives/src/asset_identifier.rs Co-authored-by: Robert Gabriel Jakabosky <[email protected]> * comments and formatting Co-authored-by: Robert Gabriel Jakabosky <[email protected]> * MESH-1758 improve storage of key permissions (#1220) * Remove specialized `SecondaryKey<AccountId>` it isn't needed anymore. * Remove `LegacyPermissions` * Convert `KeyToIdentityIds` map. * Use `KeyRecords` instead of `KeyToIdentityIds` storage. * Fix schema. * Refactor `KeyRecord` to support MultiSig signer keys. * Fixup TS scripts. * Fix TS code. * Fix TypeScript bug. * Remove un-neede 'config()' * Replace use of old `DidRecords` storage.. * Add migration. * Rename 'DidPrimaryKey` -> `DidRecords`. * Rename *link_account_key* functions. * Add limit to RPC identity_getDidRecords. * Don't use `Signatory` type for secondary keys. * Close MESH-1804 * Update TS interface. * Update schema. * Fix primitives tests. * Increase secondary key permissions limits. * Fix integration tests. * fixup unit tests in polymesh-common-utilities. * Fix schema tabs. * Remove unneeded bounds. * Remove extra generic parameters. * Simplify RpcDidRecords type. * Add v1/v2 RPC support. * Cleanup. * Fix key to identity lookup. * Fix `SecondaryKeyWithAuth` schema type. * Regen TS types. * Cleanup identity events. * Cargo fmt * Fix bug with migration. Asset identities don't have primary keys. * Regen TS types. * FIXUP * Cargo fmt * MESH-1817/ Allow capital distributions in the base asset (#1235) * minor change removing test case * removing all cases of DistributingAsset error * minor change to test * minor changes * MESH-1813 - reject invalid distributions (#1236) * Move logic into base_ prefixed functions. * Check if distribution amount or per_share is zero. * Update docs. * Docs improvement. Co-authored-by: Mazdak Farrokhzad <[email protected]> * Don't use unsafe_ prefix. * Bump transaction_version for 5.0 release. Co-authored-by: Mazdak Farrokhzad <[email protected]> * Smart contracts pallet (#1217) * wip for robert * contracts: add Config impls * initial smart contracts pallet * contracts: wip chain extension * get cargo check to work * define most of chain extension logic * contracts: use drop-guard for swap-back * contracts: decided not to charge weights for now * contracts: remove need for drop_guard * contract: pass this on * contracts: propagate init/upgrade + limits and charge for in_len * contracts: add register_custom_asset_type * contracts: simplify DID swapping * contracts: use contract key instead of caller * cargo fmt * contracts: fix docs * contracts: impl From<CommonCall... * contracts: finish chain ext def + add benchmarks * contracts: minor bench fixes + docs * drive-by: simplify cfg(test)s * contracts: be consistent about kb * mv pallets/{contracts -> contracts-old} * mv contracts2 -> contracts * contracts: set dispatchable name + rerun benchs * contracts: misc tweaks * contracts: tests + other tweaks * contracts: adjust to new keys storage * contracts: rerun benchmarks * contracts2_test -> contracts_test * BaseContracts <-(swap)-> Contracts * contracts: get benchmarks running again * cargo fmt * mv benchmarking/mod.rs -> benchmarking.rs * contracts: address review comments * Mesh 1826/ remove contracts old code and examples (#1240) * removed contracts/* and pallets/contracts-old folders along with old commented out code related to contracts * formatting * minor changes * MESH-1758 backwards compatible calls (#1237) * Add backwards compatible extrinsics. * Add backwards compatible `add_secondary_keys_with_authorization`. * Regen TS types and call ./util/updateTypes.js. * Fix issue with polkadot's generate types. * FIXUP: Include missing change. * Fix TS bug. * Apply suggestions from code review Co-authored-by: Mazdak Farrokhzad <[email protected]> * cargo fmt * Use ExactSizeIterator Co-authored-by: Adam Dossa <[email protected]> Co-authored-by: Mazdak Farrokhzad <[email protected]> * Fix dependabot alerts (#1242) * Bump async. * Update TS deps. in event-listener. * MESH-1824: Empty perms default + MESH-1825: Contracts RPC (#1239) * mesh-1824: make empty perms the default * mesh-1825: enable rpc for contracts * mesh-1825: address review comments * Fix comment. Co-authored-by: Robert Gabriel Jakabosky <[email protected]> Co-authored-by: Robert Gabriel Jakabosky <[email protected]> * MESH-1815 Substrate monthly-2022-05 (#1241) * Update to Substrate monthly-2022-05 * Add `storage_deposit_limit` to contracts pallet. * Remove unused REPORTING key type logic. * Wrap substrate `AccountId` to implment Default trait. * Remove unused 'light' logic from node-rpc. * More monthly-2022-05 changes. * monthly-2022-05 staking changes. * Fix tests. * Fix contracts benchmarks. * Fix staking benchmarks. * Fix wasm/benchmark build. * Fix node build. * cargo fmt * Use Rust nightly 2022-05-10. * Remove stabilized feature. * Fix non-benchmark build. * Fix benchmark scripts. * Fix CI tests build. * cargo fmt * Fix staking benchmarks. * Cleanup. * Fix Polkadot.js error handling. * Bump coverage resource class. * Fix contracts code/salt weights. * Use official blake2 crate. * Update confidential_identity dep. * Fix Substrate migrations (System, Contracts). * The Contracts migration isn't needed. Since this is our first release with `pallet_contracts`, no migrations are needed. * Fixup contracts deps. * Fix merge conflicts. * Fix Contracts weights. Need to include `gas_limit` for maximum weight. * Fix warning during benchmark build. * Add `upload_code` and `remove_code` extrinsics. * Improve weights template. * Generate weights for contracts pallet. Co-authored-by: Robert Gabriel Jakabosky <[email protected]> Co-authored-by: raycar5 <[email protected]> Co-authored-by: Joel Moore <[email protected]> Co-authored-by: Jeremias Diaz <[email protected]> Co-authored-by: polymath-eric <[email protected]> Co-authored-by: Mazdak Farrokhzad <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: CJP10 <[email protected]>
2 parents 57cbb0d + 17235d4 commit 65dedf0

File tree

363 files changed

+43453
-34568
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

363 files changed

+43453
-34568
lines changed

.circleci/config.yml

Lines changed: 39 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ version: 2
22
jobs:
33
lint:
44
docker:
5-
- image: polymathnet/rust:debian-nightly-2021-08-24
5+
- image: polymathnet/rust:debian-nightly-2022-05-10
66
resource_class: medium
77
environment:
88
VERBOSE: "1"
@@ -13,7 +13,7 @@ jobs:
1313
command: ./scripts/rustfmt.sh
1414
build:
1515
docker:
16-
- image: polymathnet/rust:debian-nightly-2021-08-24
16+
- image: polymathnet/rust:debian-nightly-2022-05-10
1717
resource_class: xlarge
1818
environment:
1919
- VERBOSE: "1"
@@ -37,14 +37,33 @@ jobs:
3737
- "~/.cargo"
3838
- "./target"
3939
benchmark-build:
40-
docker:
41-
- image: polymathnet/rust:debian-nightly-2021-08-24
40+
machine:
41+
image: ubuntu-2004:202010-01
4242
resource_class: xlarge
4343
environment:
4444
- VERBOSE: "1"
45-
- RUSTC_WORKSPACE_WRAPPER: ./scripts/rustc.sh
4645
steps:
4746
- checkout
47+
- run:
48+
shell: /bin/bash
49+
name: Setup rust-nightly environment.
50+
command: |
51+
sudo apt update
52+
sudo apt install build-essential \
53+
clang cmake \
54+
gcc jq libclang-dev libssl-dev \
55+
pkg-config ca-certificates rsync curl \
56+
-y --no-install-recommends
57+
export TOOLCHAIN=`cat rust-toolchain`
58+
# Download rustup installer.
59+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs >./rustup_install.sh
60+
# Run rustup installer.
61+
bash ./rustup_install.sh -y --default-toolchain $TOOLCHAIN
62+
# Add rustup to PATH.
63+
source $HOME/.cargo/env
64+
# Install wasm tools.
65+
./scripts/init.sh
66+
4867
- run:
4968
name: Store rust version in an environment var for cache key
5069
command: rustc --version > rust.version
@@ -53,6 +72,8 @@ jobs:
5372
- v2-bench-cache-{{ checksum "./rust.version" }}-{{ checksum "./Cargo.lock" }}
5473
- run:
5574
name: Build binary with runtime-benchmarks
75+
environment:
76+
- RUSTC_WORKSPACE_WRAPPER: ./scripts/rustc.sh
5677
command: cargo build --release --features=runtime-benchmarks,running-ci
5778
no_output_timeout: 1h
5879
- persist_to_workspace:
@@ -62,7 +83,6 @@ jobs:
6283
- save_cache:
6384
key: v2-bench-cache-{{ checksum "./rust.version" }}-{{ checksum "./Cargo.lock" }}
6485
paths:
65-
- "/usr/local/cargo"
6686
- "~/.cargo"
6787
- "./target"
6888
benchmark:
@@ -76,11 +96,11 @@ jobs:
7696
at: .
7797
- run:
7898
name: Run benchmarks
79-
command: ./polymesh benchmark -p=* -e=* -r 1 -s 1 --execution native --db-cache 512 --heap-pages=2048
99+
command: ./polymesh benchmark pallet -p=* -e=* -r 1 -s 1 --execution native --db-cache 512 --heap-pages=2048
80100
no_output_timeout: 1h
81101
migration-tests:
82102
docker:
83-
- image: polymathnet/rust:debian-nightly-2021-08-24
103+
- image: polymathnet/rust:debian-nightly-2022-05-10
84104
resource_class: large
85105
environment:
86106
- VERBOSE: "1"
@@ -106,7 +126,7 @@ jobs:
106126
- "./target"
107127
test:
108128
docker:
109-
- image: polymathnet/rust:debian-nightly-2021-08-24
129+
- image: polymathnet/rust:debian-nightly-2022-05-10
110130
resource_class: large
111131
environment:
112132
- VERBOSE: "1"
@@ -141,19 +161,21 @@ jobs:
141161
- "./target"
142162
coverage:
143163
docker:
144-
- image: polymathnet/rust:debian-nightly-2021-08-24
145-
resource_class: large
164+
- image: cimg/rust:1.60.0
165+
resource_class: xlarge
146166
environment:
147167
- VERBOSE: "1"
148-
- RUSTC_WORKSPACE_WRAPPER: ./scripts/rustc.sh
149168
steps:
169+
- run:
170+
name: Install libclang
171+
command: sudo apt-get update && sudo apt-get install libclang-dev
150172
- checkout
151173
- run:
152174
name: Store rust version in a file for cache key
153-
command: rustc --version > rust.version
175+
command: rustc --version | tee rust.version
154176
- restore_cache:
155177
keys:
156-
- v5-coverage-cache-{{ checksum "./rust.version" }}-{{ checksum "./Cargo.lock" }}
178+
- v6-coverage-cache-{{ checksum "./rust.version" }}-{{ checksum "./Cargo.lock" }}
157179
- run:
158180
name: Install dependencies
159181
command: rustup component add llvm-tools-preview && cargo install rustfilt cargo-binutils
@@ -162,14 +184,12 @@ jobs:
162184
command: bash ./scripts/coverage.sh
163185
no_output_timeout: 1h
164186
- save_cache:
165-
key: v5-coverage-cache-{{ checksum "./rust.version" }}-{{ checksum "./Cargo.lock" }}
187+
key: v6-coverage-cache-{{ checksum "./rust.version" }}-{{ checksum "./Cargo.lock" }}
166188
paths:
167-
- "/usr/local/cargo"
168189
- "~/.cargo"
169-
- "./target"
170190
cli:
171191
docker:
172-
- image: polymathnet/rust:debian-nightly-2021-08-24
192+
- image: polymathnet/rust:debian-nightly-2022-05-10
173193
resource_class: xlarge
174194
environment:
175195
VERBOSE: "1"
@@ -208,7 +228,7 @@ jobs:
208228
- "./scripts/cli/node_modules"
209229
clippy:
210230
docker:
211-
- image: polymathnet/rust:debian-nightly-2021-08-24
231+
- image: polymathnet/rust:debian-nightly-2022-05-10
212232
resource_class: large
213233
environment:
214234
VERBOSE: "1"

.github/workflows/docs.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ jobs:
1212

1313
steps:
1414
- uses: actions/checkout@v2
15-
- name: Use rust nightly 2021-08-24 for building docs.
16-
run: echo "nightly-2021-08-24" > ./rust-toolchain
1715
- name: Install rust toolchain
1816
uses: actions-rs/toolchain@v1
1917
with:

.maintain/benchmarks_1.sh

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
./target/release/polymesh benchmark -s 100 -r 5 -p=pallet_session -e=* --heap-pages 4096 --db-cache 512 --execution wasm --wasm-execution compiled --output ./pallets/weights/src/ --template ./.maintain/frame-weight-template.hbs --raw >> data.txt 2>> log.txt
2-
./target/release/polymesh benchmark -s 100 -r 5 -p=pallet_multisig -e=* --heap-pages 4096 --db-cache 512 --execution wasm --wasm-execution compiled --output ./pallets/weights/src/ --template ./.maintain/frame-weight-template.hbs --raw >> data.txt 2>> log.txt
3-
./target/release/polymesh benchmark -s 100 -r 5 -p=pallet_corporate_ballot -e=* --heap-pages 4096 --db-cache 512 --execution wasm --wasm-execution compiled --output ./pallets/weights/src/ --template ./.maintain/frame-weight-template.hbs --raw >> data.txt 2>> log.txt
4-
./target/release/polymesh benchmark -s 100 -r 5 -p=pallet_babe -e=* --heap-pages 4096 --db-cache 512 --execution wasm --wasm-execution compiled --output ./pallets/weights/src/ --template ./.maintain/frame-weight-template.hbs --raw >> data.txt 2>> log.txt
5-
./target/release/polymesh benchmark -s 100 -r 5 -p=pallet_timestamp -e=* --heap-pages 4096 --db-cache 512 --execution wasm --wasm-execution compiled --output ./pallets/weights/src/ --template ./.maintain/frame-weight-template.hbs --raw >> data.txt 2>> log.txt
6-
./target/release/polymesh benchmark -s 100 -r 5 -p=pallet_scheduler -e=* --heap-pages 4096 --db-cache 512 --execution wasm --wasm-execution compiled --output ./pallets/weights/src/ --template ./.maintain/frame-weight-template.hbs --raw >> data.txt 2>> log.txt
7-
./target/release/polymesh benchmark -s 100 -r 5 -p=pallet_indices -e=* --heap-pages 4096 --db-cache 512 --execution wasm --wasm-execution compiled --output ./pallets/weights/src/ --template ./.maintain/frame-weight-template.hbs --raw >> data.txt 2>> log.txt
8-
./target/release/polymesh benchmark -s 100 -r 5 -p=pallet_corporate_actions -e=* --heap-pages 4096 --db-cache 512 --execution wasm --wasm-execution compiled --output ./pallets/weights/src/ --template ./.maintain/frame-weight-template.hbs --raw >> data.txt 2>> log.txt
9-
./target/release/polymesh benchmark -s 100 -r 5 -p=pallet_asset -e=* --heap-pages 4096 --db-cache 512 --execution wasm --wasm-execution compiled --output ./pallets/weights/src/ --template ./.maintain/frame-weight-template.hbs --raw >> data.txt 2>> log.txt
10-
./target/release/polymesh benchmark -s 100 -r 5 -p=pallet_test_utils -e=* --heap-pages 4096 --db-cache 512 --execution wasm --wasm-execution compiled --output ./pallets/weights/src/ --template ./.maintain/frame-weight-template.hbs --raw >> data.txt 2>> log.txt
1+
./target/release/polymesh benchmark pallet -s 100 -r 5 -p=pallet_session -e=* --heap-pages 4096 --db-cache 512 --execution wasm --wasm-execution compiled --output ./pallets/weights/src/ --template ./.maintain/frame-weight-template.hbs --raw >> data.txt 2>> log.txt
2+
./target/release/polymesh benchmark pallet -s 100 -r 5 -p=pallet_multisig -e=* --heap-pages 4096 --db-cache 512 --execution wasm --wasm-execution compiled --output ./pallets/weights/src/ --template ./.maintain/frame-weight-template.hbs --raw >> data.txt 2>> log.txt
3+
./target/release/polymesh benchmark pallet -s 100 -r 5 -p=pallet_corporate_ballot -e=* --heap-pages 4096 --db-cache 512 --execution wasm --wasm-execution compiled --output ./pallets/weights/src/ --template ./.maintain/frame-weight-template.hbs --raw >> data.txt 2>> log.txt
4+
./target/release/polymesh benchmark pallet -s 100 -r 5 -p=pallet_babe -e=* --heap-pages 4096 --db-cache 512 --execution wasm --wasm-execution compiled --output ./pallets/weights/src/ --template ./.maintain/frame-weight-template.hbs --raw >> data.txt 2>> log.txt
5+
./target/release/polymesh benchmark pallet -s 100 -r 5 -p=pallet_timestamp -e=* --heap-pages 4096 --db-cache 512 --execution wasm --wasm-execution compiled --output ./pallets/weights/src/ --template ./.maintain/frame-weight-template.hbs --raw >> data.txt 2>> log.txt
6+
./target/release/polymesh benchmark pallet -s 100 -r 5 -p=pallet_scheduler -e=* --heap-pages 4096 --db-cache 512 --execution wasm --wasm-execution compiled --output ./pallets/weights/src/ --template ./.maintain/frame-weight-template.hbs --raw >> data.txt 2>> log.txt
7+
./target/release/polymesh benchmark pallet -s 100 -r 5 -p=pallet_indices -e=* --heap-pages 4096 --db-cache 512 --execution wasm --wasm-execution compiled --output ./pallets/weights/src/ --template ./.maintain/frame-weight-template.hbs --raw >> data.txt 2>> log.txt
8+
./target/release/polymesh benchmark pallet -s 100 -r 5 -p=pallet_corporate_actions -e=* --heap-pages 4096 --db-cache 512 --execution wasm --wasm-execution compiled --output ./pallets/weights/src/ --template ./.maintain/frame-weight-template.hbs --raw >> data.txt 2>> log.txt
9+
./target/release/polymesh benchmark pallet -s 100 -r 5 -p=pallet_asset -e=* --heap-pages 4096 --db-cache 512 --execution wasm --wasm-execution compiled --output ./pallets/weights/src/ --template ./.maintain/frame-weight-template.hbs --raw >> data.txt 2>> log.txt
10+
./target/release/polymesh benchmark pallet -s 100 -r 5 -p=pallet_test_utils -e=* --heap-pages 4096 --db-cache 512 --execution wasm --wasm-execution compiled --output ./pallets/weights/src/ --template ./.maintain/frame-weight-template.hbs --raw >> data.txt 2>> log.txt

.maintain/benchmarks_2.sh

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
./target/release/polymesh benchmark -s 100 -r 5 -p=pallet_im_online -e=* --heap-pages 4096 --db-cache 512 --execution wasm --wasm-execution compiled --output ./pallets/weights/src/ --template ./.maintain/frame-weight-template.hbs --raw >> data.txt 2>> log.txt
2-
./target/release/polymesh benchmark -s 100 -r 5 -p=pallet_compliance_manager -e=* --heap-pages 4096 --db-cache 512 --execution wasm --wasm-execution compiled --output ./pallets/weights/src/ --template ./.maintain/frame-weight-template.hbs --raw >> data.txt 2>> log.txt
3-
./target/release/polymesh benchmark -s 100 -r 5 -p=pallet_sto -e=* --heap-pages 4096 --db-cache 512 --execution wasm --wasm-execution compiled --output ./pallets/weights/src/ --template ./.maintain/frame-weight-template.hbs --raw >> data.txt 2>> log.txt
4-
./target/release/polymesh benchmark -s 100 -r 5 -p=pallet_relayer -e=* --heap-pages 4096 --db-cache 512 --execution wasm --wasm-execution compiled --output ./pallets/weights/src/ --template ./.maintain/frame-weight-template.hbs --raw >> data.txt 2>> log.txt
5-
./target/release/polymesh benchmark -s 100 -r 5 -p=pallet_identity -e=* --heap-pages 4096 --db-cache 512 --execution wasm --wasm-execution compiled --output ./pallets/weights/src/ --template ./.maintain/frame-weight-template.hbs --raw >> data.txt 2>> log.txt
6-
./target/release/polymesh benchmark -s 100 -r 5 -p=pallet_committee -e=* --heap-pages 4096 --db-cache 512 --execution wasm --wasm-execution compiled --output ./pallets/weights/src/ --template ./.maintain/frame-weight-template.hbs --raw >> data.txt 2>> log.txt
7-
./target/release/polymesh benchmark -s 100 -r 5 -p=pallet_statistics -e=* --heap-pages 4096 --db-cache 512 --execution wasm --wasm-execution compiled --output ./pallets/weights/src/ --template ./.maintain/frame-weight-template.hbs --raw >> data.txt 2>> log.txt
8-
./target/release/polymesh benchmark -s 100 -r 5 -p=pallet_protocol_fee -e=* --heap-pages 4096 --db-cache 512 --execution wasm --wasm-execution compiled --output ./pallets/weights/src/ --template ./.maintain/frame-weight-template.hbs --raw >> data.txt 2>> log.txt
9-
./target/release/polymesh benchmark -s 100 -r 5 -p=pallet_group -e=* --heap-pages 4096 --db-cache 512 --execution wasm --wasm-execution compiled --output ./pallets/weights/src/ --template ./.maintain/frame-weight-template.hbs --raw >> data.txt 2>> log.txt
10-
./target/release/polymesh benchmark -s 100 -r 5 -p=pallet_checkpoint -e=* --heap-pages 4096 --db-cache 512 --execution wasm --wasm-execution compiled --output ./pallets/weights/src/ --template ./.maintain/frame-weight-template.hbs --raw >> data.txt 2>> log.txt
11-
./target/release/polymesh benchmark -s 100 -r 5 -p=frame_system -e=* --heap-pages 4096 --db-cache 512 --execution wasm --wasm-execution compiled --output ./pallets/weights/src/ --template ./.maintain/frame-weight-template.hbs --raw >> data.txt 2>> log.txt
1+
./target/release/polymesh benchmark pallet -s 100 -r 5 -p=pallet_im_online -e=* --heap-pages 4096 --db-cache 512 --execution wasm --wasm-execution compiled --output ./pallets/weights/src/ --template ./.maintain/frame-weight-template.hbs --raw >> data.txt 2>> log.txt
2+
./target/release/polymesh benchmark pallet -s 100 -r 5 -p=pallet_compliance_manager -e=* --heap-pages 4096 --db-cache 512 --execution wasm --wasm-execution compiled --output ./pallets/weights/src/ --template ./.maintain/frame-weight-template.hbs --raw >> data.txt 2>> log.txt
3+
./target/release/polymesh benchmark pallet -s 100 -r 5 -p=pallet_sto -e=* --heap-pages 4096 --db-cache 512 --execution wasm --wasm-execution compiled --output ./pallets/weights/src/ --template ./.maintain/frame-weight-template.hbs --raw >> data.txt 2>> log.txt
4+
./target/release/polymesh benchmark pallet -s 100 -r 5 -p=pallet_relayer -e=* --heap-pages 4096 --db-cache 512 --execution wasm --wasm-execution compiled --output ./pallets/weights/src/ --template ./.maintain/frame-weight-template.hbs --raw >> data.txt 2>> log.txt
5+
./target/release/polymesh benchmark pallet -s 100 -r 5 -p=pallet_identity -e=* --heap-pages 4096 --db-cache 512 --execution wasm --wasm-execution compiled --output ./pallets/weights/src/ --template ./.maintain/frame-weight-template.hbs --raw >> data.txt 2>> log.txt
6+
./target/release/polymesh benchmark pallet -s 100 -r 5 -p=pallet_committee -e=* --heap-pages 4096 --db-cache 512 --execution wasm --wasm-execution compiled --output ./pallets/weights/src/ --template ./.maintain/frame-weight-template.hbs --raw >> data.txt 2>> log.txt
7+
./target/release/polymesh benchmark pallet -s 100 -r 5 -p=pallet_statistics -e=* --heap-pages 4096 --db-cache 512 --execution wasm --wasm-execution compiled --output ./pallets/weights/src/ --template ./.maintain/frame-weight-template.hbs --raw >> data.txt 2>> log.txt
8+
./target/release/polymesh benchmark pallet -s 100 -r 5 -p=pallet_protocol_fee -e=* --heap-pages 4096 --db-cache 512 --execution wasm --wasm-execution compiled --output ./pallets/weights/src/ --template ./.maintain/frame-weight-template.hbs --raw >> data.txt 2>> log.txt
9+
./target/release/polymesh benchmark pallet -s 100 -r 5 -p=pallet_group -e=* --heap-pages 4096 --db-cache 512 --execution wasm --wasm-execution compiled --output ./pallets/weights/src/ --template ./.maintain/frame-weight-template.hbs --raw >> data.txt 2>> log.txt
10+
./target/release/polymesh benchmark pallet -s 100 -r 5 -p=pallet_checkpoint -e=* --heap-pages 4096 --db-cache 512 --execution wasm --wasm-execution compiled --output ./pallets/weights/src/ --template ./.maintain/frame-weight-template.hbs --raw >> data.txt 2>> log.txt
11+
./target/release/polymesh benchmark pallet -s 100 -r 5 -p=frame_system -e=* --heap-pages 4096 --db-cache 512 --execution wasm --wasm-execution compiled --output ./pallets/weights/src/ --template ./.maintain/frame-weight-template.hbs --raw >> data.txt 2>> log.txt

0 commit comments

Comments
 (0)