- Feb 03, 2024
-
-
Cyrill Leutwiler authored
Can this API be marked stable? Implemented in [solang here](https://github.com/hyperledger/solang/pull/1620) --------- Signed-off-by: Cyrill Leutwiler <[email protected]>
-
- Jan 31, 2024
-
-
Branislav Kontur authored
[frame] `#[pallet::composite_enum]` improved variant count handling + removed `pallet_balances`'s `MaxHolds` config (#2657) I started this investigation/issue based on @liamaharon question [here](https://github.com/paritytech/polkadot-sdk/pull/1801#discussion_r1410452499). ## Problem The `pallet_balances` integrity test should correctly detect that the runtime has correct distinct `HoldReasons` variant count. I assume the same situation exists for RuntimeFreezeReason. It is not a critical problem, if we set `MaxHolds` with a sufficiently large value, everything should be ok. However, in this case, the integrity_test check becomes less useful. **Situation for "any" runtime:** - `HoldReason` enums from different pallets: ```rust /// from pallet_nis #[pallet::composite_enum] pub enum HoldReason { NftReceipt, } /// from pallet_preimage #[pallet::composite_enum] pub enum HoldReason { Preimage, } // from pallet_state-trie-migration #[pallet::composite_enum] pub enum HoldReason { SlashForContinueMigrate, SlashForMigrateCustomTop, SlashForMigrateCustomChild, } ``` - generated `RuntimeHoldReason` enum looks like: ```rust pub enum RuntimeHoldReason { #[codec(index = 32u8)] Preimage(pallet_preimage::HoldReason), #[codec(index = 38u8)] Nis(pallet_nis::HoldReason), #[codec(index = 42u8)] StateTrieMigration(pallet_state_trie_migration::HoldReason), } ``` - composite enum `RuntimeHoldReason` variant count is detected as `3` - we set `type MaxHolds = ConstU32<3>` - `pallet_balances::integrity_test` is ok with `3`(at least 3) However, the real problem can occur in a live runtime where some functionality might stop working. This is due to a total of 5 distinct hold reasons (for pallets with multi-instance support, it is even more), and not all of them can be used because of an incorrect `MaxHolds`, which is deemed acceptable according to the `integrity_test`: ``` // pseudo-code - if we try to call all of these: T::Currency::hold(&pallet_nis::HoldReason::NftReceipt.into(), &nft_owner, deposit)?; T::Currency::hold(&pallet_preimage::HoldReason::Preimage.into(), &nft_owner, deposit)?; T::Currency::hold(&pallet_state_trie_migration::HoldReason::SlashForContinueMigrate.into(), &nft_owner, deposit)?; // With `type MaxHolds = ConstU32<3>` these two will fail T::Currency::hold(&pallet_state_trie_migration::HoldReason::SlashForMigrateCustomTop.into(), &nft_owner, deposit)?; T::Currency::hold(&pallet_state_trie_migration::HoldReason::SlashForMigrateCustomChild.into(), &nft_owner, deposit)?; ``` ## Solutions A macro `#[pallet::*]` expansion is extended of `VariantCount` implementation for the `#[pallet::composite_enum]` enum type. This expansion generates the `VariantCount` implementation for pallets' `HoldReason`, `FreezeReason`, `LockId`, and `SlashReason`. Enum variants must be plain enum values without fields to ensure a deterministic count. The composite runtime enum, `RuntimeHoldReason` and `RuntimeFreezeReason`, now sets `VariantCount::VARIANT_COUNT` as the sum of pallets' enum `VariantCount::VARIANT_COUNT`: ```rust #[frame_support::pallet(dev_mode)] mod module_single_instance { #[pallet::composite_enum] pub enum HoldReason { ModuleSingleInstanceReason1, ModuleSingleInstanceReason2, } ... } #[frame_support::pallet(dev_mode)] mod module_multi_instance { #[pallet::composite_enum] pub enum HoldReason<I: 'static = ()> { ModuleMultiInstanceReason1, ModuleMultiInstanceReason2, ModuleMultiInstanceReason3, } ... } impl self::sp_api_hidden_includes_construct_runtime::hidden_include::traits::VariantCount for RuntimeHoldReason { const VARIANT_COUNT: u32 = 0 + module_single_instance::HoldReason::VARIANT_COUNT + module_multi_instance::HoldReason::<module_multi_instance::Instance1>::VARIANT_COUNT + module_multi_instance::HoldReason::<module_multi_instance::Instance2>::VARIANT_COUNT + module_multi_instance::HoldReason::<module_multi_instance::Instance3>::VARIANT_COUNT; } ``` In addition, `MaxHolds` is removed (as suggested [here](https://github.com/paritytech/polkadot-sdk/pull/2657#discussion_r1443324573)) from `pallet_balances`, and its `Holds` are now bounded to `RuntimeHoldReason::VARIANT_COUNT`. Therefore, there is no need to let the runtime specify `MaxHolds`. ## For reviewers Relevant changes can be found here: - `substrate/frame/support/procedural/src/lib.rs` - `substrate/frame/support/procedural/src/pallet/parse/composite.rs` - `substrate/frame/support/procedural/src/pallet/expand/composite.rs` - `substrate/frame/support/procedural/src/construct_runtime/expand/composite_helper.rs` - `substrate/frame/support/procedural/src/construct_runtime/expand/hold_reason.rs` - `substrate/frame/support/procedural/src/construct_runtime/expand/freeze_reason.rs` - `substrate/frame/support/src/traits/misc.rs` And the rest of the files is just about removed `MaxHolds` from `pallet_balances` ## Next steps Do the same for `MaxFreezes` https://github.com/paritytech/polkadot-sdk/issues/2997. --------- Co-authored-by: command-bot <> Co-authored-by: Bastian Köcher <[email protected]> Co-authored-by: Dónal Murray <[email protected]> Co-authored-by: gupnik <[email protected]>
-
- Jan 26, 2024
-
-
Alexander Theißen authored
Printing the `Schedule` is a useful debugging tool and general sanity check. It is much more easy to interpret than the raw weights. The printing relied on using `println` and hence was only available from the native runtime. This is no longer available. This is why in this PR we switch to using `log` which works from Wasm. I made sure that the `WeightDebug` is only derived when `runtime-benchmarks` is set so that we don't increase the size of the binary. Some other changes were necessary to make this actually work inside the runtime. For example, I needed to remove `format!` and usage of floats. Please note that this removed the decimal from the number because truncating the fraction without using floats would not be easy and would require custom code. I think the precision here is sufficient. This is how the output looks like now: ``` Schedule { limits: Limits { event_topics: 4, globals: 256, locals: 1024, parameters: 128, memory_pages: 16, table_size: 4096, br_table_size: 256, subject_len: 32, payload_len: 16384, runtime_memory: 134217728, }, instruction_weights: InstructionWeights { base: 2565, _phantom: PhantomData<kitchensink_runtime::Runtime>, }, host_fn_weights: HostFnWeights { caller: 322 ns, 6 bytes, is_contract: 28 µs, 2684 bytes, code_hash: 29 µs, 2688 bytes, own_code_hash: 400 ns, 6 bytes, caller_is_origin: 176 ns, 3 bytes, caller_is_root: 158 ns, 3 bytes, address: 315 ns, 6 bytes, gas_left: 355 ns, 6 bytes, balance: 1 µs, 6 bytes, value_transferred: 314 ns, 6 bytes, minimum_balance: 318 ns, 6 bytes, block_number: 313 ns, 6 bytes, now: 325 ns, 6 bytes, weight_to_fee: 1 µs, 14 bytes, input: 263 ns, 6 bytes, input_per_byte: 989 ps, 0 bytes, r#return: 0 ps, 45 bytes, return_per_byte: 320 ps, 0 bytes, terminate: 1 ms, 5266 bytes, random: 1 µs, 10 bytes, deposit_event: 1 µs, 10 bytes, deposit_event_per_topic: 127 µs, 2508 bytes, deposit_event_per_byte: 501 ps, 0 bytes, debug_message: 226 ns, 7 bytes, debug_message_per_byte: 1 ns, 0 bytes, set_storage: 131 µs, 293 bytes, set_storage_per_new_byte: 576 ps, 0 bytes, set_storage_per_old_byte: 184 ps, 1 bytes, set_code_hash: 297 µs, 3090 bytes, clear_storage: 131 µs, 289 bytes, clear_storage_per_byte: 92 ps, 1 bytes, contains_storage: 29 µs, 289 bytes, contains_storage_per_byte: 213 ps, 1 bytes, get_storage: 29 µs, 297 bytes, get_storage_per_byte: 980 ps, 1 bytes, take_storage: 131 µs, 297 bytes, take_storage_per_byte: 921 ps, 1 bytes, transfer: 156 µs, 2520 bytes, call: 484 µs, 2721 bytes, delegate_call: 406 µs, 2637 bytes, call_transfer_surcharge: 607 µs, 5227 bytes, call_per_cloned_byte: 970 ps, 0 bytes, instantiate: 1 ms, 2731 bytes, instantiate_transfer_surcharge: 131 µs, 2549 bytes, instantiate_per_input_byte: 1 ns, 0 bytes, instantiate_per_salt_byte: 1 ns, 0 bytes, hash_sha2_256: 377 ns, 8 bytes, hash_sha2_256_per_byte: 1 ns, 0 bytes, hash_keccak_256: 767 ns, 8 bytes, hash_keccak_256_per_byte: 3 ns, 0 bytes, hash_blake2_256: 443 ns, 8 bytes, hash_blake2_256_per_byte: 1 ns, 0 bytes, hash_blake2_128: 440 ns, 8 bytes, hash_blake2_128_per_byte: 1 ns, 0 bytes, ecdsa_recover: 45 µs, 77 bytes, ecdsa_to_eth_address: 11 µs, 42 bytes, sr25519_verify: 41 µs, 112 bytes, sr25519_verify_per_byte: 5 ns, 1 bytes, reentrance_count: 174 ns, 3 bytes, account_reentrance_count: 248 ns, 40 bytes, instantiation_nonce: 154 ns, 3 bytes, add_delegate_dependency: 131 µs, 2606 bytes, remove_delegate_dependency: 130 µs, 2568 bytes, }, } ############################################### Lazy deletion weight per key: Weight(ref_time: 126109302, proof_size: 70) Lazy deletion keys per block: 15859 ```
-
- Jan 22, 2024
-
-
joe petrowski authored
Clean up all the old syntax. --------- Co-authored-by: command-bot <> Co-authored-by: gupnik <[email protected]> Co-authored-by: Nikhil Gupta <[email protected]> Co-authored-by: Maksym H <[email protected]>
-
- Jan 19, 2024
-
-
Robin Freyler authored
In https://github.com/paritytech/polkadot-sdk/pull/2941 we found out that the new Wasmi (register) is very effective at optimizing away certain benchmark bytecode constructs in a way that created an unfair advantage over Wasmi (stack) which yielded our former benchmarks to be ineffective at properly measuring the performance impact. This PR adjusts both affected benchmarks to fix the stated problems. Affected are - `instr_i64const` -> `instr_i64add`: Renamed since it now measures the performance impact of the Wasm `i64.add` instruction with locals as inputs and outputs. This makes it impossible for Wasmi (register) to aggressively optimize away the entire function body (as it previously did) but still provides a way for Wasmi (register) to shine with its register based execution model. - `call_with_code_per_byte`: Now uses `local.get` instead of `i32.const` for the `if` condition which prevents Wasmi (register) to aggressively optimizing away whole parts of the `if` creating an unfair advantage. cc @athei --------- Co-authored-by: command-bot <> Co-authored-by: Alexander Theißen <[email protected]> Co-authored-by: Ignacio Palacios <[email protected]>
-
- Jan 18, 2024
-
-
Bastian Köcher authored
Apparently they changed detection for visibility identifiers on traits, which broke more than it should. There is an issue open: https://github.com/rust-lang/rust/issues/119924 The easy solution for us is to move the declaration of the global variable outside of the trait. Closes: https://github.com/paritytech/polkadot-sdk/issues/2960
- Jan 16, 2024
-
-
Francisco Aguirre authored
# Note for reviewer Most changes are just syntax changes necessary for the new version. Most important files should be the ones under the `xcm` folder. # Description Added XCMv4. ## Removed `Multi` prefix The following types have been renamed: - MultiLocation -> Location - MultiAsset -> Asset - MultiAssets -> Assets - InteriorMultiLocation -> InteriorLocation - MultiAssetFilter -> AssetFilter - VersionedMultiAsset -> VersionedAsset - WildMultiAsset -> WildAsset - VersionedMultiLocation -> VersionedLocation In order to fix a name conflict, the `Assets` in `xcm-executor` were renamed to `HoldingAssets`, as they represent assets in holding. ## Removed `Abstract` asset id It was not being used anywhere and this simplifies the code. Now assets are just constructed as follows: ```rust let asset: Asset = (AssetId(Location::new(1, Here)), 100u128).into(); ``` No need for specifying `Concrete` anymore. ## Outcome is now a named fields struct Instead of ```rust pub enum Outcome { Complete(Weight), Incomplete(Weight, Error), Error(Error), } ``` we now have ```rust pub enum Outcome { Complete { used: Weight }, Incomplete { used: Weight, error: Error }, Error { error: Error }, } ``` ## Added Reanchorable trait Now both locations and assets implement this trait, making it easier to reanchor both. ## New syntax for building locations and junctions Now junctions are built using the following methods: ```rust let location = Location { parents: 1, interior: [Parachain(1000), PalletInstance(50), GeneralIndex(1984)].into() }; ``` or ```rust let location = Location::new(1, [Parachain(1000), PalletInstance(50), GeneralIndex(1984)]); ``` And they are matched like so: ```rust match location.unpack() { (1, [Parachain(id)]) => ... (0, Here) => ..., (1, [_]) => ..., } ``` This syntax is mandatory in v4, and has been also implemented for v2 and v3 for easier migration. This was needed to make all sizes smaller. # TODO - [x] Scaffold v4 - [x] Port github.com/paritytech/polkadot/pull/7236 - [x] Remove `Multi` prefix - [x] Remove `Abstract` asset id --------- Co-authored-by: command-bot <> Co-authored-by: Keith Yeung <[email protected]>
-
- Jan 15, 2024
-
-
PG Herveou authored
Integration tests in ink!: https://github.com/paritytech/ink/tree/master/integration-tests/sr25519-verification
-
- Jan 12, 2024
-
-
PG Herveou authored
- Translate all pallet-contracts fixtures from `wat` to Rust files. - Fix read_sandbox_memory_as to not use MaxEncodedLen as this could break if used with types with a non-fixed encoded len. --------- Co-authored-by: alvicsam <[email protected]> Co-authored-by: Alexander Samusev <[email protected]> Co-authored-by: Alexander Theißen <[email protected]> Co-authored-by: command-bot <>
-
- Dec 20, 2023
-
-
Dónal Murray authored
Many clippy lints usually enforced by `-Dcomplexity` and `-Dcorrectness` are not caught by CI as they are gated by `features`, like `runtime-benchmarks`, while the clippy CI job runs with only the default features for all targets. This PR also adds a CI step to run clippy with `--all-features` to ensure the code quality is maintained behind feature gates from now on. To improve local development, clippy lints are downgraded to warnings, but they still will result in an error at CI due to the `-Dwarnings` rustflag. --------- Co-authored-by: Liam Aharon <[email protected]>
-
- Dec 18, 2023
-
-
Branislav Kontur authored
This PR contains just a few clippy fixes and nits, which are, however, relaxed by workspace clippy settings here: https://github.com/paritytech/polkadot-sdk/blob/master/Cargo.toml#L483-L506 --------- Co-authored-by: Dmitry Sinyavin <[email protected]> Co-authored-by: ordian <[email protected]> Co-authored-by: command-bot <> Co-authored-by: Bastian Köcher <[email protected]>
-
- Nov 29, 2023
-
-
PG Herveou authored
see #2189 This PR does the following: - Bring the user api functions into a new pallet-contracts-uapi (They are currently defined in ink! [here])(https://github.com/paritytech/ink/blob/master/crates/env/src/engine/on_chain/ext.rs) - Add older api versions and unstable to the user api trait. - Remove pallet-contracts-primitives and bring the types it defined in uapi / pallet-contracts - Add the infrastructure to build fixtures from Rust files and test it works by replacing `dummy.wat` and `call.wat` - Move all the doc from wasm/runtime.rs to pallet-contracts-uapi. This will be done in a follow up: - convert the rest of the test from .wat to rust - bring risc-v uapi up to date with wasm - finalize the uapi host fns, making sure everything is codegen from the source host fns in pallet-contracts --------- Co-authored-by: Alexander Theißen <[email protected]>
-
- Nov 28, 2023
-
-
Aaro Altonen authored
This commit introduces a new concept called `NotificationService` which allows Polkadot protocols to communicate with the underlying notification protocol implementation directly, without routing events through `NetworkWorker`. This implies that each protocol has its own service which it uses to communicate with remote peers and that each `NotificationService` is unique with respect to the underlying notification protocol, meaning `NotificationService` for the transaction protocol can only be used to send and receive transaction-related notifications. The `NotificationService` concept introduces two additional benefits: * allow protocols to start using custom handshakes * allow protocols to accept/reject inbound peers Previously the validation of inbound connections was solely the responsibility of `ProtocolController`. This caused issues with light peers and `SyncingEngine` as `ProtocolController` would accept more peers than `SyncingEngine` could accept which caused peers to have differing views of their own states. `SyncingEngine` would reject excess peers but these rejections were not properly communicated to those peers causing them to assume that they were accepted. With `NotificationService`, the local handshake is not sent to remote peer if peer is rejected which allows it to detect that it was rejected. This commit also deprecates the use of `NetworkEventStream` for all notification-related events and going forward only DHT events are provided through `NetworkEventStream`. If protocols wish to follow each other's events, they must introduce additional abtractions, as is done for GRANDPA and transactions protocols by following the syncing protocol through `SyncEventStream`. Fixes https://github.com/paritytech/polkadot-sdk/issues/512 Fixes https://github.com/paritytech/polkadot-sdk/issues/514 Fixes https://github.com/paritytech/polkadot-sdk/issues/515 Fixes https://github.com/paritytech/polkadot-sdk/issues/554 Fixes https://github.com/paritytech/polkadot-sdk/issues/556 --- These changes are transferred from https://github.com/paritytech/substrate/pull/14197 but there are no functional changes compared to that PR --------- Co-authored-by: Dmitry Markin <[email protected]> Co-authored-by: Alexandru Vasile <[email protected]>
-
gupnik authored
Step in https://github.com/paritytech/polkadot-sdk/issues/171 This PR adds `derive_impl` on all `frame_system` config impls for mock runtimes. The overridden configs are maintained as of now to ensure minimal changes. --------- Co-authored-by: Oliver Tale-Yazdi <[email protected]>
-
- Nov 23, 2023
-
-
Bastian Köcher authored
This moves the macro related re-exports to `__private` to make it more obvious for downstream users that they are using an internal api. --------- Co-authored-by: command-bot <>
-
- Nov 14, 2023
-
-
PG Herveou authored
This PR introduces: - XCM host functions `xcm_send`, `xcm_execute` - An Xcm trait into the config. that proxy these functions to to `pallet_xcm`, or disable their usage by using `()`. - A mock_network and xcm_test files to test the newly added xcm-related functions. --------- Co-authored-by: Keith Yeung <[email protected]> Co-authored-by: Sasha Gryaznov <[email protected]> Co-authored-by: command-bot <> Co-authored-by: Francisco Aguirre <[email protected]> Co-authored-by: Alexander Theißen <[email protected]>
-
- Nov 10, 2023
-
-
PG Herveou authored
Small PR that introduce a new crate that will host RISC-V & wasm fixtures for testing pallet-contracts
-
- Nov 02, 2023
-
-
Piotr Mikołajczyk authored
# Description We derive few useful traits on `ErrorOrigin` and `ExecError`, including `codec::Encode` and `codec::Decode`, so that `ExecResult` is en/decodable as well. This is required for a contract mocking feature (already prepared in drink: https://github.com/Cardinal-Cryptography/drink/pull/61). In more detail: `ExecResult` must be passed from runtime extension, through runtime interface, back to the pallet, which requires that it is serializable to bytes in some form (or implements some rare, auxiliary traits). **Impact on runtime size**: Since most of these traits is used directly in the pallet now, compiler should be able to throw it out (and thus we bring no new overhead). However, they are very useful in secondary tools like drink or other testing libraries. # Checklist - [x] My PR includes a detailed description as outlined in the "Description" section above - [ ] My PR follows the [labeling requirements](CONTRIBUTING.md#Process) of this project (at minimum one label for `T` required) - [x] I have made corresponding changes to the documentation (if applicable) - [x] I have added tests that prove my fix is effective or that my feature works (if applicable)
-
- Oct 31, 2023
-
-
PG Herveou authored
Restore fix from #2077
-
- Oct 30, 2023
-
-
Liam Aharon authored
Runtime migration CI is currently failing (https://gitlab.parity.io/parity/mirrors/polkadot-sdk/builds/4122083) for the contracts testnet due to unnecessary panicing in a `pre_upgrade` hook. Soon idempotency will be enforced https://github.com/paritytech/try-runtime-cli/issues/42, in the mean time we need to manually fix these issues as they arise. --- also removes backticks from the string in `echo`, which caused a 'command not found' error in ci output
-
- Oct 24, 2023
-
-
Kian Paimani authored
closes https://github.com/paritytech/polkadot-sdk/issues/1882 ## Breaking Changes This PR introduces a new item to `pallet_balances::Config`: ```diff trait Config { ++ type RuntimeFreezeReasons; } ``` This value is only used to check it against `type MaxFreeze`. A similar check has been added for `MaxHolds` against `RuntimeHoldReasons`, which is already given to `pallet_balances`. In all contexts, you should pass the real `RuntimeFreezeReasons` generated by `construct_runtime` to `type RuntimeFreezeReasons`. Passing `()` would also work, but it would imply that the runtime uses no freezes at all. --------- Signed-off-by: Oliver Tale-Yazdi <[email protected]> Co-authored-by: Oliver Tale-Yazdi <[email protected]>
-
- Oct 11, 2023
-
-
Mira Ressel authored
Co-authored-by: command-bot <>
-
- Sep 29, 2023
-
-
Piotr Mikołajczyk authored
# Description This PR introduces two changes: - the previous `Tracing` trait has been modified to accept contract address instead of code hash (seems to be way more convenient) - a new trait `CallInterceptor` that allows intercepting contract calls; in particular the default implementation for `()` will just proceed in a standard way (after compilation optimizations, there will be no footprint of that); however, implementing type might decide to mock invocation and return `ExecResult` instead Note: one might try merging `before_call` and `intercept_call`. However, IMHO this would be bad, since it would mix two completely different abstractions - tracing without any effects and actual intervention into execution process. This will unblock working on mocking contracts utility in drink and similar tools (https://github.com/Cardinal-Cryptography/drink/issues/33) # Checklist - [x] My PR includes a detailed description as outlined in the "Description" section above - [ ] My PR follows the [labeling requirements](https://github.com/paritytech/polkadot-sdk/blob/master/docs/CONTRIBUTING.md#process) of this project (at minimum one label for `T` required) - [x] I have made corresponding changes to the documentation (if applicable) - [x] I have added tests that prove my fix is effective or that my feature works (if applicable)
-
- Sep 25, 2023
-
-
Kevin Wang authored
# Description We are recently trying to upgrade our Substrate version from `polkadot-v0.9.43` to `polkadot-v1.0.0` and we noticed a critical issue: all deployed contracts seem to be experiencing a `CodeNotFound` error. After a thorough investigation, it appears that the root cause of this issue lies in the mismatch between the storage alias of `CodeInfoOf<T>` in the migration and its original definition. This PR corrects the storage alias to align it with its original definition I am uncertain about the proper approach for adding tests to this change. Would the team consider taking over this PR to bring it to completion? --------- Co-authored-by: pgherveou <[email protected]>
-
- Sep 11, 2023
-
-
Alexander Theißen authored
Fixes #116 Start function wasn't allowed in a contract. Now it is allowed and is being run. It was disallowed because it is not used by Rust and supporting it made the code more complex. However, not running the start function violates the wasm standard. This makes life harder for some languages (see linked ticket).
-
- Sep 05, 2023
-
-
Alexander Theißen authored
-
- Sep 04, 2023
-
-
PG Herveou authored
* Update runtime.rs * Fix * Revert "Update runtime.rs" This reverts commit 808f026a. * nit mono-repo fixes
-
- Sep 02, 2023
-
-
Alexander Theißen authored
* contracts: Update to wasmi 0.31 * ".git/.scripts/commands/bench/bench.sh" --subcommand=pallet --runtime=dev --target_dir=substrate --pallet=pallet_contracts --------- Co-authored-by: command-bot <>
-
- Sep 01, 2023
-
-
Cyrill Leutwiler authored
-
- Aug 31, 2023
-
-
juangirini authored
* restructure dispatch macro related exports * moved Dispatchable to lib.rs * fix .gitignore final newline * ".git/.scripts/commands/fmt/fmt.sh" * fix rustdocs * wip --------- Co-authored-by: Liam Aharon <[email protected]> Co-authored-by: command-bot <> Co-authored-by: ordian <[email protected]>
-
- Aug 30, 2023
-
-
Przemek Rzad authored
* Add missing Cumulus licenses * Typo * Add missing Substrate licenses * Single job checking the sub-repos in steps * Remove dates * Remove dates * Add missing (C) * Update FRAME UI tests Signed-off-by: Oliver Tale-Yazdi <[email protected]> * Update more UI tests Signed-off-by: Oliver Tale-Yazdi <[email protected]> --------- Signed-off-by: Oliver Tale-Yazdi <[email protected]> Co-authored-by: Oliver Tale-Yazdi <[email protected]>
-
- Aug 24, 2023
-
-
PG Herveou authored
* Update Debug trait * Rename * tweak * fmt * Better namings * rm unsafe-debug * rework doc * nit * fix comment * clippy * update naming * Rename file * fmt fixes * rename * Move tracing behind umbrella Debugging trait * fix * fix comment * reorder imports * comment * update doc * add missing doc * add missing doc * Update Debugging -> Debugger * Update bin/node/runtime/Cargo.toml
-
- Aug 23, 2023
-
-
juangirini authored
* make reexports private * make reexports private 2 * make reexports private for runtime-benchmarking * make reexports private for try-runtime * fix for try-runtime * make reexports private for tests * fmt * make reexports private for tests * make reexports private for experimental * fix beefy * fix ui test * fix ui test * fix benches * ".git/.scripts/commands/fmt/fmt.sh" * fix contracts use * wip * wip * do not reexport sp_api::metadata_ir * fix CI checks * fix support tests * ".git/.scripts/commands/fmt/fmt.sh" * Update frame/support/src/lib.rs Co-authored-by: Bastian Köcher <[email protected]> * import codec directly * fmt * fix node-cli tests --------- Co-authored-by: command-bot <> Co-authored-by: Bastian Köcher <[email protected]>
-
Alexander Theißen authored
* Expose environment types for offchain tooling * Use EnvironmentType wrapper * Add type impl to test config --------- Co-authored-by: parity-processbot <>
-
- Aug 18, 2023
-
-
juangirini authored
* contracts: refactor currency to use fungible traits * contracts: refactor currency to use fungible traits * contracts: add minor improvements * contracts: max holds config set * contracts: fix some typos * contracts: map token errors * fix typo * contracts: add 0 balance transfer to test * contracts: not transfer if value is zero * contracts: [WIP] add StorageDepositHold * contracts: add storage deposit held event * contracts: clean up some code and comments * contracts: add deposit storage released event * contracts: update comment * contracts: update slash cannot kill account test * contracts: fix tests * contracts: add some comments to the slashing test * contracts: add some comments to the slashing test * contracts: remove references to Currency * contracts: do not transfer if from equals to * bound BalanceOf<T> * added FixedPointOperand to Balance trait * move migrate sequence to config * remove commented out code * Update frame/contracts/src/lib.rs Co-authored-by: PG Herveou <[email protected]> * remove Migrations generic * make runtime use noop migrations * restrict is_upgrade_supported * undo is_upgrade_supported change * Update bin/node/runtime/src/lib.rs Co-authored-by: PG Herveou <[email protected]> * add rust doc example for `Migrations` * feature gate NoopMigration * fix example code * improve example * wip * remove FixedPointOperand from trait * trait bound BalanceOf * more trait bound BalanceOf * update to use RuntimeHoldReason * replace Fungible for Currency * update runtime * WIP * make v10 benchmark generic over currency * solve merge conflicts * make v12 migration benchmarking generic over DepositPerItem and DepositPerByte * give some format * fix tests and old migrations * add migration v13 placholder * wip * wip * add benchmarking * add weights * wip * [pallet_collective] Enforce prime is a valid member of collective in set_members extrinsic (#14354) * Updated set_members extrinsic to enforce prime is valid member of collective * Added additional tests for set_members extrinsic * applied the code review suggestions * update to docify 0.2.0 / crate-relative embed paths (#14570) * Fix Society v2 migration (#14421) * fix society v2 migration * Update frame/society/src/migrations.rs * Update frame/society/src/migrations.rs Co-authored-by: Bastian Köcher <[email protected]> * Update frame/society/src/migrations.rs Co-authored-by: Bastian Köcher <[email protected]> * update for versioned upgrade * fix society v2 migration * remove references to members being sorted from commnets * fix type * fix can_migrate check * add sanity log * fix sanity check * kick ci * kick ci * run tests with --experimental flag * versioned migration cleanup * revert pipeline change * use defensive! * semicolons * defensive and doc comment * address pr comment * feature gate the versioned migration * defensive_unwrap_or * fix test * fix doc comment * change defensive to a log warning * remove can_migrate anti-pattern * Update frame/society/Cargo.toml Co-authored-by: Bastian Köcher <[email protected]> * add experimental feature warning to doc comment * update doc comment * bump ci * kick ci * kick ci * kick ci --------- Co-authored-by: Kian Paimani <[email protected]> Co-authored-by: Bastian Köcher <[email protected]> * Moves `Block` to `frame_system` instead of `construct_runtime` and removes `Header` and `BlockNumber` (#14437) * Initial setup * Adds node block * Uses UncheckedExtrinsic and removes Where section * Updates frame_system to use Block * Adds deprecation warning * Fixes pallet-timestamp * Removes Header and BlockNumber * Addresses review comments * Addresses review comments * Adds comment about compiler bug * Removes where clause * Refactors code * Fixes errors in cargo check * Fixes errors in cargo check * Fixes warnings in cargo check * Formatting * Fixes construct_runtime tests * Uses import instead of full path for BlockNumber * Uses import instead of full path for Header * Formatting * Fixes construct_runtime tests * Fixes imports in benchmarks * Formatting * Fixes construct_runtime tests * Formatting * Minor updates * Fixes construct_runtime ui tests * Fixes construct_runtime ui tests with 1.70 * Fixes docs * Fixes docs * Adds u128 mock block type * Fixes split example * fixes for cumulus * ".git/.scripts/commands/fmt/fmt.sh" * Updates new tests * Fixes fully-qualified path in few places * Formatting * Update frame/examples/default-config/src/lib.rs Co-authored-by: Juan <[email protected]> * Update frame/support/procedural/src/construct_runtime/mod.rs Co-authored-by: Juan <[email protected]> * ".git/.scripts/commands/fmt/fmt.sh" * Addresses some review comments * Fixes build * ".git/.scripts/commands/fmt/fmt.sh" * Update frame/democracy/src/lib.rs Co-authored-by: Oliver Tale-Yazdi <[email protected]> * Update frame/democracy/src/lib.rs Co-authored-by: Oliver Tale-Yazdi <[email protected]> * Update frame/support/procedural/src/construct_runtime/mod.rs Co-authored-by: Oliver Tale-Yazdi <[email protected]> * Update frame/support/procedural/src/construct_runtime/mod.rs Co-authored-by: Oliver Tale-Yazdi <[email protected]> * Addresses review comments * Updates trait bounds * Minor fix * ".git/.scripts/commands/fmt/fmt.sh" * Removes unnecessary bound * ".git/.scripts/commands/fmt/fmt.sh" * Updates test * Fixes build * Adds a bound for header * ".git/.scripts/commands/fmt/fmt.sh" * Removes where block * Minor fix * Minor fix * Fixes tests * ".git/.scripts/commands/update-ui/update-ui.sh" 1.70 * Updates test * Update primitives/runtime/src/traits.rs Co-authored-by: Bastian Köcher <[email protected]> * Update primitives/runtime/src/traits.rs Co-authored-by: Bastian Köcher <[email protected]> * Updates doc * Updates doc --------- Co-authored-by: command-bot <> Co-authored-by: Juan <[email protected]> Co-authored-by: Oliver Tale-Yazdi <[email protected]> Co-authored-by: Bastian Köcher <[email protected]> * Refactor the asset-conversion-tx-payment pallet (#14558) * Code refactoring * Fix imports * Typo * Update frame/asset-conversion/src/types.rs Co-authored-by: joe petrowski <[email protected]> * Sync docs --------- Co-authored-by: parity-processbot <> Co-authored-by: joe petrowski <[email protected]> * wip * wip * wip * improve try-runtime imports * remove deposit account * wip * wip * fix benchmark test * improved rustdocs * improved rustdocs * remove log * ignore variable * reduce caller funding * wip * fix tests * fix tests * move v13 out * add v14 * update v13 migration * v13 migration * benchmark v13_migration * fix broken compilation * ".git/.scripts/commands/bench/bench.sh" --subcommand=pallet --runtime=dev --target_dir=substrate --pallet=pallet_contracts * remove all the `where BalanceOf` * add Balance to Config * improve docs * add new deposit storage error * remove todo message * wip * rename migration v13 pre rebase * fix tests * add missing migration; * bump storage version * apply review suggestions * improved comment * remove unnecessary code * simplify migrations * mock balance * mock more for benchmarks * make room for rebaes * make room for rebase * fix benchmarking tests * fix benchmarking tests with caller * improve cargo toml * solve nit * Update frame/contracts/src/lib.rs Co-authored-by: Alexander Theißen <[email protected]> * Update frame/contracts/src/exec.rs Co-authored-by: Alexander Theißen <[email protected]> * Update frame/contracts/src/exec.rs Co-authored-by: Alexander Theißen <[email protected]> * Update frame/contracts/src/storage/meter.rs Co-authored-by: Alexander Theißen <[email protected]> * review improvements * remove extra events * update cargo * undo update cargo * review updates * wip * wip * fix test * remove type Balance * add extra fields to events * fix zepter ci * fix tests * remove commented out code * remove deposit_account from benchmarking * update v15 migration * wip * remove deposit account from codebase * add contract info to v15 * make try-runtime fixes * fix wrong v14 logs * add extra post upgrade steps * remove old comments * wip * fix delegate deposit test * ".git/.scripts/commands/bench/bench.sh" --subcommand=pallet --runtime=dev --target_dir=substrate --pallet=pallet_contracts * wip * wip * wip * implement review updates * ".git/.scripts/commands/bench/bench.sh" --subcommand=pallet --runtime=dev --target_dir=substrate --pallet=pallet_contracts * fix documentation * fix consumers/providers * fix consumers/providers * do not check consumers in migration * review comments addressed * update fully qualified System * wip * wip * Transfer to beneficiary after `transfer_on_hold` (#14767) * transfer to beneficiary after transfer_on_hold * wip * add consumer comment * review updates * fix typo * make clippy happy * refactor `Terminated` * rename ContractStatus to ContractState * rename status to state * replace Contribution::Alive to ContractState::Alive * defer storage deposit charge * ".git/.scripts/commands/fmt/fmt.sh" * remove unused imports * Update frame/contracts/src/migration/v15.rs Co-authored-by: Sasha Gryaznov <[email protected]> * Update frame/contracts/src/storage/meter.rs Co-authored-by: Sasha Gryaznov <[email protected]> --------- Co-authored-by: PG Herveou <[email protected]> Co-authored-by: Toufeeq Pasha <[email protected]> Co-authored-by: Sam Johnson <[email protected]> Co-authored-by: Liam Aharon <[email protected]> Co-authored-by: Kian Paimani <[email protected]> Co-authored-by: Bastian Köcher <[email protected]> Co-authored-by: gupnik <[email protected]> Co-authored-by: Oliver Tale-Yazdi <[email protected]> Co-authored-by: Jegor Sidorenko <[email protected]> Co-authored-by: joe petrowski <[email protected]> Co-authored-by: command-bot <> Co-authored-by: Alexander Theißen <[email protected]> Co-authored-by: Sasha Gryaznov <[email protected]>
-
- Aug 17, 2023
-
-
PG Herveou authored
* Contracts: expose charge_storage to chain_extension * fix typo * export Diff
-
- Aug 14, 2023
-
-
Piotr Mikołajczyk authored
* Types in the pallet * Primitives
-
- Aug 05, 2023
-
-
Piotr Mikołajczyk authored
* Provide basic breakpoints * Rename to Observer * Rename feature. Single trait. Borrow-checker * : frame_system::Config * Confused type name * Minor bugs * pub trait * No unnecessary cloning * Make node compile with all features * Move everything debug-related to a single module * Add docs and implementation for () * fmt * Make it feature-gated or for tests * Prepare testing kit * Testcase * Fmt * Use feature in dev-deps * ? * feature propagation * AAAA * lol, that doesn't make much sense to me * Turn on * clippy * Remove self dep * fmt, feature-gating test * Noop to trigger CI * idk * add feature to pipeline * Corrupt test to see if it is actually being run * Revert change * Doc for conf type * Review * Imports * ... * Remove debug for kitchen-sink * Move test * Fix imports * I must have already tried this one...
-
- Aug 02, 2023
-
-
juangirini authored
* contracts: refactor currency to use fungible traits * contracts: refactor currency to use fungible traits * contracts: add minor improvements * contracts: max holds config set * contracts: fix some typos * contracts: map token errors * fix typo * contracts: add 0 balance transfer to test * contracts: not transfer if value is zero * contracts: [WIP] add StorageDepositHold * contracts: add storage deposit held event * contracts: clean up some code and comments * contracts: add deposit storage released event * contracts: update comment * contracts: update slash cannot kill account test * contracts: fix tests * contracts: add some comments to the slashing test * contracts: add some comments to the slashing test * contracts: remove references to Currency * contracts: do not transfer if from equals to * bound BalanceOf<T> * added FixedPointOperand to Balance trait * move migrate sequence to config * remove commented out code * Update frame/contracts/src/lib.rs Co-authored-by: PG Herveou <[email protected]> * remove Migrations generic * make runtime use noop migrations * restrict is_upgrade_supported * undo is_upgrade_supported change * Update bin/node/runtime/src/lib.rs Co-authored-by: PG Herveou <[email protected]> * add rust doc example for `Migrations` * feature gate NoopMigration * fix example code * improve example * wip * remove FixedPointOperand from trait * trait bound BalanceOf * more trait bound BalanceOf * update to use RuntimeHoldReason * replace Fungible for Currency * update runtime * WIP * make v10 benchmark generic over currency * solve merge conflicts * make v12 migration benchmarking generic over DepositPerItem and DepositPerByte * give some format * fix tests and old migrations * add migration v13 placholder * wip * wip * add benchmarking * add weights * wip * [pallet_collective] Enforce prime is a valid member of collective in set_members extrinsic (#14354) * Updated set_members extrinsic to enforce prime is valid member of collective * Added additional tests for set_members extrinsic * applied the code review suggestions * update to docify 0.2.0 / crate-relative embed paths (#14570) * Fix Society v2 migration (#14421) * fix society v2 migration * Update frame/society/src/migrations.rs * Update frame/society/src/migrations.rs Co-authored-by: Bastian Köcher <[email protected]> * Update frame/society/src/migrations.rs Co-authored-by: Bastian Köcher <[email protected]> * update for versioned upgrade * fix society v2 migration * remove references to members being sorted from commnets * fix type * fix can_migrate check * add sanity log * fix sanity check * kick ci * kick ci * run tests with --experimental flag * versioned migration cleanup * revert pipeline change * use defensive! * semicolons * defensive and doc comment * address pr comment * feature gate the versioned migration * defensive_unwrap_or * fix test * fix doc comment * change defensive to a log warning * remove can_migrate anti-pattern * Update frame/society/Cargo.toml Co-authored-by: Bastian Köcher <[email protected]> * add experimental feature warning to doc comment * update doc comment * bump ci * kick ci * kick ci * kick ci --------- Co-authored-by: Kian Paimani <[email protected]> Co-authored-by: Bastian Köcher <[email protected]> * Moves `Block` to `frame_system` instead of `construct_runtime` and removes `Header` and `BlockNumber` (#14437) * Initial setup * Adds node block * Uses UncheckedExtrinsic and removes Where section * Updates frame_system to use Block * Adds deprecation warning * Fixes pallet-timestamp * Removes Header and BlockNumber * Addresses review comments * Addresses review comments * Adds comment about compiler bug * Removes where clause * Refactors code * Fixes errors in cargo check * Fixes errors in cargo check * Fixes warnings in cargo check * Formatting * Fixes construct_runtime tests * Uses import instead of full path for BlockNumber * Uses import instead of full path for Header * Formatting * Fixes construct_runtime tests * Fixes imports in benchmarks * Formatting * Fixes construct_runtime tests * Formatting * Minor updates * Fixes construct_runtime ui tests * Fixes construct_runtime ui tests with 1.70 * Fixes docs * Fixes docs * Adds u128 mock block type * Fixes split example * fixes for cumulus * ".git/.scripts/commands/fmt/fmt.sh" * Updates new tests * Fixes fully-qualified path in few places * Formatting * Update frame/examples/default-config/src/lib.rs Co-authored-by: Juan <[email protected]> * Update frame/support/procedural/src/construct_runtime/mod.rs Co-authored-by: Juan <[email protected]> * ".git/.scripts/commands/fmt/fmt.sh" * Addresses some review comments * Fixes build * ".git/.scripts/commands/fmt/fmt.sh" * Update frame/democracy/src/lib.rs Co-authored-by: Oliver Tale-Yazdi <[email protected]> * Update frame/democracy/src/lib.rs Co-authored-by: Oliver Tale-Yazdi <[email protected]> * Update frame/support/procedural/src/construct_runtime/mod.rs Co-authored-by: Oliver Tale-Yazdi <[email protected]> * Update frame/support/procedural/src/construct_runtime/mod.rs Co-authored-by: Oliver Tale-Yazdi <[email protected]> * Addresses review comments * Updates trait bounds * Minor fix * ".git/.scripts/commands/fmt/fmt.sh" * Removes unnecessary bound * ".git/.scripts/commands/fmt/fmt.sh" * Updates test * Fixes build * Adds a bound for header * ".git/.scripts/commands/fmt/fmt.sh" * Removes where block * Minor fix * Minor fix * Fixes tests * ".git/.scripts/commands/update-ui/update-ui.sh" 1.70 * Updates test * Update primitives/runtime/src/traits.rs Co-authored-by: Bastian Köcher <[email protected]> * Update primitives/runtime/src/traits.rs Co-authored-by: Bastian Köcher <[email protected]> * Updates doc * Updates doc --------- Co-authored-by: command-bot <> Co-authored-by: Juan <[email protected]> Co-authored-by: Oliver Tale-Yazdi <[email protected]> Co-authored-by: Bastian Köcher <[email protected]> * Refactor the asset-conversion-tx-payment pallet (#14558) * Code refactoring * Fix imports * Typo * Update frame/asset-conversion/src/types.rs Co-authored-by: joe petrowski <[email protected]> * Sync docs --------- Co-authored-by: parity-processbot <> Co-authored-by: joe petrowski <[email protected]> * wip * wip * wip * improve try-runtime imports * fix benchmark test * improved rustdocs * improved rustdocs * remove log * ignore variable * reduce caller funding * move v13 out * update v13 migration * v13 migration * benchmark v13_migration * fix broken compilation * ".git/.scripts/commands/bench/bench.sh" --subcommand=pallet --runtime=dev --target_dir=substrate --pallet=pallet_contracts * remove all the `where BalanceOf` * add Balance to Config * improve docs * add new deposit storage error * remove todo message * rename migration v13 pre rebase * fix tests * add missing migration; * bump storage version * apply review suggestions * improved comment * remove unnecessary code * simplify migrations * mock balance * mock more for benchmarks * fix benchmarking tests * fix benchmarking tests with caller * improve cargo toml * solve nit * Update frame/contracts/src/lib.rs Co-authored-by: Alexander Theißen <[email protected]> * Update frame/contracts/src/exec.rs Co-authored-by: Alexander Theißen <[email protected]> * Update frame/contracts/src/exec.rs Co-authored-by: Alexander Theißen <[email protected]> * Update frame/contracts/src/storage/meter.rs Co-authored-by: Alexander Theißen <[email protected]> * review improvements * remove extra events * update cargo * undo update cargo * review updates * remove type Balance * add extra fields to events * fix zepter ci --------- Co-authored-by: PG Herveou <[email protected]> Co-authored-by: Toufeeq Pasha <[email protected]> Co-authored-by: Sam Johnson <[email protected]> Co-authored-by: Liam Aharon <[email protected]> Co-authored-by: Kian Paimani <[email protected]> Co-authored-by: Bastian Köcher <[email protected]> Co-authored-by: gupnik <[email protected]> Co-authored-by: Oliver Tale-Yazdi <[email protected]> Co-authored-by: Jegor Sidorenko <[email protected]> Co-authored-by: joe petrowski <[email protected]> Co-authored-by: command-bot <> Co-authored-by: Alexander Theißen <[email protected]>
-