- Oct 31, 2021
-
-
thiolliere authored
* implement automatic parts * ui tests * rename * remove unnecessary exclude * better doc * better doc * fix genesis config * fix UI tests * fix UI test * Revert "fix UI test" This reverts commit a910351c0b24cfe42195cfd97d83a416640e3259. * implemented used_parts * Update frame/support/procedural/src/construct_runtime/mod.rs Co-authored-by: Keith Yeung <[email protected]> * doc + fmt * Update frame/support/procedural/src/construct_runtime/parse.rs Co-authored-by: Keith Yeung <[email protected]> * add doc in the macro * remove yet some more parts * fix ui test * more determnistic error message + fix ui tests * fix ui test * Apply suggestions from code review Co-authored-by: Keith Yeung <[email protected]> * do refactor + fix ui tests * fmt * fix test * fix test * fix ui test * Apply suggestions from code review Co-authored-by: Keith Yeung <[email protected]> * refactor * remove even more part in node-runtime * fix test * Add flow chart for the construct_runtime! execution flow * Fix typo * Ignore snippets that don't contain code * Refactor some code in expand_after * Rename expand_after to match_and_insert * cargo fmt * Fix rename * Remove frame_support argument to construct_runtime_parts * Make use of tt-call to simplify intermediate expansions * cargo fmt * Update match_and_insert documentation * Reset cursor to 0 when no matching patterns are found * Reorder struct fields on MatchAndInsertDef * Add test for dependency renames and fix frame-support import * Add more doc comments * Update frame/support/test/compile_pass/src/lib.rs Co-authored-by: Guillaume Thiolliere <[email protected]> Co-authored-by: Keith Yeung <[email protected]> Co-authored-by: Shawn Tabrizi <[email protected]>
-
thiolliere authored
-
- Oct 30, 2021
-
-
Bastian Köcher authored
* pallet-utility: Fix possible mismatch between native/wasm The `batched_calls_limit` constant value includes the `size_of` of the runtime `Call`. As we compile the runtime for native/wasm, we need to align the call size to ensure that it is the same on wasm/native. This also solves the problem of different metadata outputs for the same runtime. * Review feedback
-
Shawn Tabrizi authored
* create and add baseline * fix import * try a different name * cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=frame_benchmarking --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/benchmarking/src/weights.rs --template=./.maintain/frame-weight-template.hbs * cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=frame_benchmarking --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/benchmarking/src/weights.rs --template=./.maintain/frame-weight-template.hbs * cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=frame_benchmarking --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/benchmarking/src/weights.rs --template=./.maintain/frame-weight-template.hbs * increase repeats * cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=frame_benchmarking --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/benchmarking/src/weights.rs --template=./.maintain/frame-weight-template.hbs * Update baseline.rs * Update baseline.rs * cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=frame_benchmarking --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/benchmarking/src/weights.rs --template=./.maintain/frame-weight-template.hbs * cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=frame_benchmarking --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/benchmarking/src/weights.rs --template=./.maintain/frame-weight-template.hbs * cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=frame_benchmarking --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/benchmarking/src/weights.rs --template=./.maintain/frame-weight-template.hbs * cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=frame_benchmarking --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/benchmarking/src/weights.rs --template=./.maintain/frame-weight-template.hbs * improve hash benchmark * cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=frame_benchmarking --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/benchmarking/src/weights.rs --template=./.maintain/frame-weight-template.hbs * cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=frame_benchmarking --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/benchmarking/src/weights.rs --template=./.maintain/frame-weight-template.hbs * cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=frame_benchmarking --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/benchmarking/src/weights.rs --template=./.maintain/frame-weight-template.hbs * cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=frame_benchmarking --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/benchmarking/src/weights.rs --template=./.maintain/frame-weight-template.hbs Co-authored-by: Parity Bot <[email protected]>
-
Alexander Theißen authored
* Add test to check account counter persistence * Fix bug that account counter wasn't properly persited * cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_contracts --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/contracts/src/weights.rs --template=./.maintain/frame-weight-template.hbs Co-authored-by: Parity Bot <[email protected]>
-
- Oct 29, 2021
-
-
Bastian Köcher authored
* pallet-scheduler: Introduce `OriginPrivilegeCmp` When a scheduled task should be canceled, the origin that tries to cancel the task is compared to the origin the task should be executed with. Before this pr this check only allowed that both origins are equal. However, this is problematic as this means that for example a council origin it needs to be have the same amount of yes votes to cancel the scheduled task. While a council origin with more yes votes should be able to cancel this task. This happened recently on Kusama and lead to a failed cancelation of a scheduled task. With this pr the two origins are compared and the cancelling origin needs to have greater or equal privileges as the origin that scheduled the task. What a greater, equal or less privilege is, can be configured in the runtime. For simplicity, a `EqualPrivilegeOnly` implementation is provided that only checks if two origins are equal. So, this mimics the old behaviour. * FMT * fix import * Small optimizations Co-authored-by: Shawn Tabrizi <[email protected]>
-
Liu-Cheng Xu authored
-
- Oct 25, 2021
-
-
Luke Schoen authored
* Update example-offchain-worker to include missing implementation for TestAuthId i tried to incorporate the off-chain worker callback demo as a custom pallet of my own Substrate-based blockchain implementation that's provided at the following links * https://www.parity.io/blog/substrate-off-chain-workers-secure-and-efficient-computing-intensive-tasks/ * https://gnunicorn.github.io/substrate-offchain-cb/ but when i build the code with `cargo build --release`, it gave me an error: ``` error[E0277]: the trait bound `AuthorityId: AppCrypto<MultiSigner, MultiSignature>` is not satisfied --> /Users/me/my_repo/node/runtime/src/lib.rs:1172:5 | 1172 | type AuthorityId = AuthorityId; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `AppCrypto<MultiSigner, MultiSignature>` is not implemented for `AuthorityId` | note: required by a bound in `offchaincb::Config::AuthorityId` --> /Users/me/my_repo/node/pallets/offchaincb/src/lib.rs:169:21 | 169 | type AuthorityId: AppCrypto<Self::Public, Self::Signature>; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `offchaincb::Config::AuthorityId` ``` where in my custom pallet i have: pallets/offchaincb/src/lib.rs ``` ... use offchaincb::{ crypto::{ TestAuthId, }, }; ... parameter_types! { pub const GracePeriod: BlockNumber = 1 * MINUTES; pub const UnsignedInterval: BlockNumber = 1 * MINUTES; pub const UnsignedPriority: BlockNumber = 1 * MINUTES; } impl offchaincb::Config for Runtime { type AuthorityId = TestAuthId; type Call = Call; type Currency = Balances; type Event = Event; type GracePeriod = GracePeriod; type UnsignedInterval = UnsignedInterval; type UnsignedPriority = UnsignedPriority; } ... ``` then i found another different off-chain workers Substrate Recipe demo from Jimmy Chu https://github.com/jimmychu0807/recipes/blob/master/pallets/ocw-demo/src/lib.rs#L73 which had an extra implementation for TestAuthId here https://github.com/jimmychu0807/recipes/blob/master/pallets/ocw-demo/src/lib.rs#L73, and when i added that it overcame the error. so i think this change should be included in the Substrate repository * Fix indentation * Fix formatting * Swap order
-
Bastian Köcher authored
* pallet-multisig: Improve opaque call handling Before the opaque call was just a type redefinition of `Vec<u8>`. With metadata v14 that was breaking external tools, as they stopped looking at the type name. To improve the situation the `WrapperKeepOpaque` type is introduced that communicates to the outside the correct type info. * Cleanup * Fix benchmarks * FMT
-
- Oct 22, 2021
-
-
Grachev Mikhail authored
* Fix broken links in Nicks Pallet * Update frame/nicks/src/lib.rs * Update frame/nicks/src/lib.rs Co-authored-by: Bastian Köcher <[email protected]>
-
- Oct 21, 2021
-
-
Gavin Wood authored
* Allow pallet's info to be enumerated * Fixes * Formatting * Flat tuple for getting all pallet instances * Renaming and fixing reversedness * Formatting * Fixes * Back to nesting * Back to nestingx * Revert executive lib * Reversions * Reversions * Fixes * Fixes * Formatting * Fixes * Spelling * Comments
-
- Oct 18, 2021
-
-
Dan Shields authored
* Clarify wieght traits needed to impl in example * Update frame/example/src/lib.rs * Update frame/example/src/lib.rs Co-authored-by: Guillaume Thiolliere <[email protected]> * fmt Co-authored-by: Squirrel <[email protected]> Co-authored-by: Guillaume Thiolliere <[email protected]>
-
thiolliere authored
* update lowest unbaked * fix format * add note * fmt
-
Cheng JIANG authored
-
- Oct 15, 2021
-
-
Cheng JIANG authored
-
- Oct 14, 2021
-
-
Gavin Wood authored
* More lenient StashOf finder * Slightly safer version of the change * Slightly safer version of the change * Tests * Formatting
-
- Oct 13, 2021
-
-
Dan Shields authored
* all reverences of substrate.dev replaced with *correct* docs.substrate.io links * fix links in non-cargo files, errors in replace * homepage https://substrate.io * cargo +nightly fmt * FMT Co-authored-by: Bastian Köcher <[email protected]>
-
zjb0807 authored
* add TypeInfo for DispatchTime * add TypeInfo for BoundedBTreeSet * add skip_type_params * add TypeInfo for BoundedSlice * add skip_type_params
-
dependabot[bot] authored
* Bump parity-scale-codec from 2.2.0 to 2.3.1 Bumps [parity-scale-codec](https://github.com/paritytech/parity-scale-codec) from 2.2.0 to 2.3.1. - [Release notes](https://github.com/paritytech/parity-scale-codec/releases) - [Changelog](https://github.com/paritytech/parity-scale-codec/blob/master/CHANGELOG.md) - [Commits](https://github.com/paritytech/parity-scale-codec/compare/v2.2...parity-scale-codec-v2.3.1) --- updated-dependencies: - dependency-name: parity-scale-codec dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> * Update UI test expectations * Update UI test expectations Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Keith Yeung <[email protected]>
-
- Oct 12, 2021
-
-
Kian Paimani authored
* documentation for recovery of emergency phase * Update frame/election-provider-multi-phase/src/lib.rs Co-authored-by: Alexander Popiak <[email protected]> * Update frame/election-provider-multi-phase/src/lib.rs Co-authored-by: Alexander Popiak <[email protected]> Co-authored-by: Alexander Popiak <[email protected]>
-
- Oct 11, 2021
-
-
Alexander Popiak authored
* add Deposit and Withdraw events to balances + add deposit_event() calls where appropriate to signal fund movement + adjust and extend tests * line length * move events to the end to avoid changing indices * bump spec_version * cargo fmt * adjust block import bench to new event count * fix node executor tests * adjust import bench comment * fix typo and formatting * adjust event number * fix copy pasta * fix contracts pallets tests * cargo fmt * WIP fix events in tests * fix offences tests * fix tests * cargo +nightly fmt * fix contracts pallets tests * cargo +nightly fmt * fix offences tests * formatting and compile fixes Co-authored-by: Shawn Tabrizi <[email protected]>
-
dependabot[bot] authored
Bumps [syn](https://github.com/dtolnay/syn) from 1.0.76 to 1.0.80. - [Release notes](https://github.com/dtolnay/syn/releases) - [Commits](https://github.com/dtolnay/syn/compare/1.0.76...1.0.80) --- updated-dependencies: - dependency-name: syn dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
-
dependabot[bot] authored
Bumps [quote](https://github.com/dtolnay/quote) from 1.0.9 to 1.0.10. - [Release notes](https://github.com/dtolnay/quote/releases) - [Commits](https://github.com/dtolnay/quote/compare/1.0.9...1.0.10) --- updated-dependencies: - dependency-name: quote dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
-
- Oct 09, 2021
-
-
dependabot[bot] authored
Bumps [hex-literal](https://github.com/RustCrypto/utils) from 0.3.1 to 0.3.3. - [Release notes](https://github.com/RustCrypto/utils/releases) - [Commits](https://github.com/RustCrypto/utils/compare/hex-literal-v0.3.1...hex-literal-v0.3.3) --- updated-dependencies: - dependency-name: hex-literal dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
-
zjb0807 authored
-
- Oct 07, 2021
-
-
Eric Miller authored
* Rebased with master. Resolved merge conflict in frame/support/test/tests/pallet.rs * Switching Account ID to SomeType1, as SomeType3 was giving me conversion error. * Wrong indent config. Fixed. * These tabs look fine locally, but look different on Github. Trying to get the style config right. * Parsing pallet::constant_name. Passing unit tests, which is confusing because I didn't change `ident` in the ExtraConstantDef initialization. * Finalized parsing of extra constant name by adding optional metadata field. Added expansion logic that replaces respective `idents` where they exist. * Erasing this to try to keep the format the same across the source code. * Another formatting change for consistency. * Update frame/support/procedural/src/pallet/expand/constants.rs strictly more idiomatic. Co-authored-by: Guillaume Thiolliere <[email protected]> * Update frame/support/procedural/src/pallet/parse/extra_constants.rs strictly idiomatic change. Co-authored-by: Guillaume Thiolliere <[email protected]> * Fixing formatting and CI warnings. * switched to nightly compiler to use rustfmt.toml Co-authored-by: Eric Miller <[email protected]> Co-authored-by: Guillaume Thiolliere <[email protected]>
-
thiolliere authored
Root origin always bypass all filter, other origin cannot bypass BaseCallFilter even when constructed from Root origin (#9948) * improve root filter bypass * improve doc * fmt * refactor test for more understandable flow * Update frame/support/procedural/src/construct_runtime/expand/origin.rs Co-authored-by: Keith Yeung <[email protected]> * match Co-authored-by: Keith Yeung <[email protected]>
-
girazoki authored
* Add ERC20 compatible trait to retrieve name, symbol, decimals and allowance * delegate instead of spender * Remove erc20 trait and divide it into lower level traits * add import * approvals and metadata depend on fungibles Co-authored-by: Shawn Tabrizi <[email protected]>
-
Squirrel authored
(Moving further to 0.7 would require upgrading rand first)
-
- Oct 06, 2021
-
-
Squirrel authored
-
André Silva authored
* session: remove disabled validators threshold logic * staking: add logic to track offending validators * staking: disable validators for the whole era * frame: fix tests * staking: add tests for disabling validators handling * staking: fix adding offending validator when already slashed in era * address review comments * session, staking: add comments about sorted vecs Co-authored-by: Andronik Ordian <[email protected]>
-
Albrecht authored
* fix: use fully qualified syntax to disambiguate * add instance generic * line length < 100
-
- Oct 05, 2021
-
-
Bastian Köcher authored
This value is not really meant to be "constant".
-
Kian Paimani authored
* dont read events in elections anymore. * Update frame/election-provider-multi-phase/src/lib.rs * Fix test for Substrate#9898 (#9907) Co-authored-by: Shawn Tabrizi <[email protected]> Co-authored-by: Zeke Mostov <[email protected]>
-
- Oct 04, 2021
-
-
Tomasz Drwięga authored
* Add transaction validity docs. * Re-work priority calculation. * Fix tests. * Update frame/transaction-payment/src/lib.rs Co-authored-by: Alexander Popiak <[email protected]> * cargo +nightly fmt --all * Fix an obvious mistake :) * Re-work again. * Fix test. * cargo +nightly fmt --all * Make VirtualTip dependent on the transaction size. * cargo +nightly fmt --all * Update frame/transaction-payment/src/lib.rs Co-authored-by: Alexander Popiak <[email protected]> * Fix compilation. * Update bin/node/runtime/src/lib.rs Co-authored-by: Bastian Köcher <[email protected]> Co-authored-by: Alexander Popiak <[email protected]> Co-authored-by: Bastian Köcher <[email protected]>
-
Jaco Greeff authored
Tiny quotes fix that snuck in lately (something I picked up elsewhere in document generation)
-
- Oct 03, 2021
-
-
Squirrel authored
* Focus on correctness lints. This relies on a compiler patch that landed 8th July 2021. If people are using an earlier version of the compiler everything will still work unless they try and run clippy. Co-authored-by: Bastian Köcher <[email protected]> Co-authored-by: Denis Pisarev <[email protected]>
-
- Oct 02, 2021
-
-
Jay Pavlina authored
-
- Oct 01, 2021
-
-
ucover authored
* Generate one #[test] fn per bench case. * Update benchmark macro syntax in frame pallets. * Explain new benchmark macro syntax in example pallet. * support with and without a semicolon * update pallets to use individual tests * migrate staking too * migrate more pallets * fix up democracy and use individual tests * Fix comment * Put println message in panic * Remove `another_set_dummy` from doc `another_set_dummy` is not present in the benchmarking.rs (anymore). * Update doc for benchmarks macro * Update doc for impl_benchmark_test_suite macro Co-authored-by: Shawn Tabrizi <[email protected]>
-
- Sep 30, 2021
-
-
Shawn Tabrizi authored
* simple trait to inspect metadata * import vec
-