mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 14:37:57 +00:00
cd8741c8b591407a78fdfef1dccdd3b5d03e13f4
198 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
60c77a2e9a |
Adds syntax for marking calls feeless (#1926)
Fixes https://github.com/paritytech/polkadot-sdk/issues/1725 This PR adds the following changes: 1. An attribute `pallet::feeless_if` that can be optionally attached to a call like so: ```rust #[pallet::feeless_if(|_origin: &OriginFor<T>, something: &u32| -> bool { *something == 0 })] pub fn do_something(origin: OriginFor<T>, something: u32) -> DispatchResult { .... } ``` The closure passed accepts references to arguments as specified in the call fn. It returns a boolean that denotes the conditions required for this call to be "feeless". 2. A signed extension `SkipCheckIfFeeless<T: SignedExtension>` that wraps a transaction payment processor such as `pallet_transaction_payment::ChargeTransactionPayment`. It checks for all calls annotated with `pallet::feeless_if` to see if the conditions are met. If so, the wrapped signed extension is not called, essentially making the call feeless. In order to use this, you can simply replace your existing signed extension that manages transaction payment like so: ```diff - pallet_transaction_payment::ChargeTransactionPayment<Runtime>, + pallet_skip_feeless_payment::SkipCheckIfFeeless< + Runtime, + pallet_transaction_payment::ChargeTransactionPayment<Runtime>, + >, ``` ### Todo - [x] Tests - [x] Docs - [x] Prdoc --------- Co-authored-by: Nikhil Gupta <> Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by: Francisco Aguirre <franciscoaguirreperez@gmail.com> Co-authored-by: Liam Aharon <liam.aharon@hotmail.com> |
||
|
|
8ba7a6aba8 |
chain-spec: getting ready for native-runtime-free world (#1256)
This PR prepares chains specs for _native-runtime-free_ world. This PR has following changes: - `substrate`: - adds support for: - JSON based `GenesisConfig` to `ChainSpec` allowing interaction with runtime `GenesisBuilder` API. - interacting with arbitrary runtime wasm blob to[ `chain-spec-builder`](https://github.com/paritytech/substrate/blob/3ef576eaeb3f42610e85daecc464961cf1295570/bin/utils/chain-spec-builder/src/lib.rs#L46) command line util, - removes [`code`](https://github.com/paritytech/substrate/blob/3ef576eaeb3f42610e85daecc464961cf1295570/frame/system/src/lib.rs#L660) from `system_pallet` - adds `code` to the `ChainSpec` - deprecates [`ChainSpec::from_genesis`](https://github.com/paritytech/substrate/blob/3ef576eaeb3f42610e85daecc464961cf1295570/client/chain-spec/src/chain_spec.rs#L263), but also changes the signature of this method extending it with `code` argument. [`ChainSpec::builder()`](https://github.com/paritytech/substrate/blob/20bee680ed098be7239cf7a6b804cd4de267983e/client/chain-spec/src/chain_spec.rs#L507) should be used instead. - `polkadot`: - all references to `RuntimeGenesisConfig` in `node/service` are removed, - all `(kusama|polkadot|versi|rococo|wococo)_(staging|dev)_genesis_config` functions now return the JSON patch for default runtime `GenesisConfig`, - `ChainSpecBuilder` is used, `ChainSpec::from_genesis` is removed, - `cumulus`: - `ChainSpecBuilder` is used, `ChainSpec::from_genesis` is removed, - _JSON_ patch configuration used instead of `RuntimeGenesisConfig struct` in all chain specs. --------- Co-authored-by: command-bot <> Co-authored-by: Javier Viola <javier@parity.io> Co-authored-by: Davide Galassi <davxy@datawok.net> Co-authored-by: Francisco Aguirre <franciscoaguirreperez@gmail.com> Co-authored-by: Kevin Krone <kevin@parity.io> Co-authored-by: Bastian Köcher <git@kchr.de> |
||
|
|
ca5f10567a |
sc-block-builder: Remove BlockBuilderProvider (#2099)
The `BlockBuilderProvider` was a trait that was defined in `sc-block-builder`. The trait was implemented for `Client`. This basically meant that you needed to import `sc-block-builder` any way to have access to the block builder. So, this trait was not providing any real value. This pull request is removing the said trait. Instead of the trait it introduces a builder for creating a `BlockBuilder`. The builder currently has the quite fabulous name `BlockBuilderBuilder` (I'm open to any better name 😅). The rest of the pull request is about replacing the old trait with the new builder. # Downstream code changes If you used `new_block` or `new_block_at` before you now need to switch it over to the new `BlockBuilderBuilder` pattern: ```rust // `new` requires a type that implements `CallApiAt`. let mut block_builder = BlockBuilderBuilder::new(client) // Then you need to specify the hash of the parent block the block will be build on top of .on_parent_block(at) // The block builder also needs the block number of the parent block. // Here it is fetched from the given `client` using the `HeaderBackend` // However, there also exists `with_parent_block_number` for directly passing the number .fetch_parent_block_number(client) .unwrap() // Enable proof recording if required. This call is optional. .enable_proof_recording() // Pass the digests. This call is optional. .with_inherent_digests(digests) .build() .expect("Creates new block builder"); ``` --------- Co-authored-by: Sebastian Kunert <skunert49@gmail.com> Co-authored-by: command-bot <> |
||
|
|
495d24d730 |
Add ci check for parity-publish and fix current check issues (#1887)
Co-authored-by: Sergejs Kostjucenko <85877331+sergejparity@users.noreply.github.com> Co-authored-by: Bastian Köcher <info@kchr.de> |
||
|
|
a808a3a091 |
Mixnet integration (#1346)
See #1345, <https://github.com/paritytech/substrate/pull/14207>. This adds all the necessary mixnet components, and puts them together in the "kitchen-sink" node/runtime. The components added are: - A pallet (`frame/mixnet`). This is responsible for determining the current mixnet session and phase, and the mixnodes to use in each session. It provides a function that validators can call to register a mixnode for the next session. The logic of this pallet is very similar to that of the `im-online` pallet. - A service (`client/mixnet`). This implements the core mixnet logic, building on the `mixnet` crate. The service communicates with other nodes using notifications sent over the "mixnet" protocol. - An RPC interface. This currently only supports sending transactions over the mixnet. --------- Co-authored-by: David Emett <dave@sp4m.net> Co-authored-by: Javier Viola <javier@parity.io> |
||
|
|
dcda0e50f5 |
Fix build profiles (#1229)
* Fix build profiles Closes https://github.com/paritytech/polkadot-sdk/issues/1155 Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Manually set version to 1.0.0 Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Use workspace repo Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * 'Authors and Edition from workspace Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> --------- Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> |
||
|
|
f441a5fc93 |
Diener workspacify
Signed-off-by: alvicsam <alvicsam@gmail.com> |
||
|
|
3710edfedc |
[FRAME Core] New pallets: safe-mode and tx-pause (#12092)
* Add safe-mode Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Update pallet Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Add to kitchensink-runtime Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Spelling Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Rename to tx-pause Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Add SafeMode pallet Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * fmt Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Automatically disable safe-mode in on_init… Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Add permissionless enable+extend Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Add repay+slash stake methods Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Add docs Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Fix stakes storage Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Genesis config for safe-mode pallet Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Genesis config for safe-mode pallet Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Rename ExtrinsicName to FunctionName Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Origin variable duration Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Rename FunctionName -> CallName Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Rename and docs Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Pallet safe mode tests (#12148) * Add safe-mode mock runtime * Add safe-mode tests * Add ForceEnable- and ForceExtendOrigin * Start dummy benchmarks Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Tests for `pallet-tx-pause` (#12259) * mock added * tests added * dummy benchmarks started * rename to active/inactive tests broken, in progress * Runtime types, fix tests * WIP safe mode and tx pause {continued} (#12371) * test coverage on safe mode and tx pause * benchmarks & tests * tests passing, use FullNameOf to check tx-pause unfilterables * naming updates Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Set block number Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * dummy weights generated, safe mode * add repay_reservation call with RepaymentDelay per #10033 feature requirements * make call name optional to allow pausing pallets, handle `Contains` correctly for this throughout, doc comments started * move to full_name notation for all interfaces, last commit introduced 1 more storage read. * refactor is_paused * safe math on safe mode * Make stuff compile Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Compile Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Cleanup & renames Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Cleanup TxPause pallet Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Fix benches Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * fmt Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Refactor to fungibles::* and rename stuf Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Make compile Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Fix node config Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Typos Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Remove CausalHoldReason Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Refactor benchmarks and runtime configs Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Add traits Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Remove old code Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Cleanup safe-mode benches Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Update frame/safe-mode/Cargo.toml Co-authored-by: Liam Aharon <liam.aharon@hotmail.com> * Update frame/safe-mode/Cargo.toml Co-authored-by: Liam Aharon <liam.aharon@hotmail.com> * Docs Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Remove getters Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Update Cargo.lock Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Remove phantom Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Fix test Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Remove phantom Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Apply suggestions from code review Co-authored-by: Liam Aharon <liam.aharon@hotmail.com> * Use new as Origin benchmarking syntax Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Docs Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Fix node Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Fix tx-pause benches Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Renames * Remove duplicate test * Add docs * docs * Apply suggestions from code review Co-authored-by: Liam Aharon <liam.aharon@hotmail.com> Co-authored-by: Muharem Ismailov <ismailov.m.h@gmail.com> Co-authored-by: Gonçalo Pestana <g6pestana@gmail.com> * Cleanup tests * docs * Cleanup GenesisConfigs * Doc traits * Remove PauseTooLongNames * docs * Use V2 benchmarking Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Use RuntimeHoldReason * Fix kitchensink runtime * Fix CI Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Fix CI Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Review Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Rename Stake to Deposit Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Add docs Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Add Notify and test it Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Fix kitchensink Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Update frame/safe-mode/src/tests.rs Co-authored-by: Liam Aharon <liam.aharon@hotmail.com> * Update frame/safe-mode/src/tests.rs Co-authored-by: Liam Aharon <liam.aharon@hotmail.com> * Update frame/support/src/traits/safe_mode.rs Co-authored-by: Liam Aharon <liam.aharon@hotmail.com> * Update frame/support/src/traits/safe_mode.rs Co-authored-by: Liam Aharon <liam.aharon@hotmail.com> * Update frame/support/src/traits/safe_mode.rs Co-authored-by: Liam Aharon <liam.aharon@hotmail.com> * Update frame/support/src/traits/tx_pause.rs Co-authored-by: Liam Aharon <liam.aharon@hotmail.com> * Update frame/tx-pause/src/lib.rs Co-authored-by: Liam Aharon <liam.aharon@hotmail.com> * Update frame/tx-pause/src/lib.rs Co-authored-by: Liam Aharon <liam.aharon@hotmail.com> * Update frame/tx-pause/src/mock.rs Co-authored-by: Liam Aharon <liam.aharon@hotmail.com> * Update frame/support/src/traits/safe_mode.rs Co-authored-by: Liam Aharon <liam.aharon@hotmail.com> * Simplify code * Update frame/support/src/traits/safe_mode.rs Co-authored-by: Liam Aharon <liam.aharon@hotmail.com> * Update frame/support/src/traits/safe_mode.rs Co-authored-by: Liam Aharon <liam.aharon@hotmail.com> * Update frame/support/src/traits/safe_mode.rs Co-authored-by: Liam Aharon <liam.aharon@hotmail.com> * Fixup merge Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Make stuff compile Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Make tx-pause compile again Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Fix features Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Fix more features Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * ".git/.scripts/commands/bench/bench.sh" --subcommand=pallet --runtime=dev --target_dir=substrate --pallet=pallet_safe_mode * Update weights Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> --------- Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by: Dan Shields <35669742+NukeManDan@users.noreply.github.com> Co-authored-by: Dan Shields <nukemandan@protonmail.com> Co-authored-by: Liam Aharon <liam.aharon@hotmail.com> Co-authored-by: Muharem Ismailov <ismailov.m.h@gmail.com> Co-authored-by: Gonçalo Pestana <g6pestana@gmail.com> Co-authored-by: command-bot <> |
||
|
|
ecf8035da6 |
Set StateBackend::Transaction to PrefixedMemoryDB (#14612)
* Yep * Try to get it working everywhere * Make `from_raw_storage` start with an empty db * More fixes! * Make everything compile * Fix `child_storage_root` * Fix after merge * Cleanups * Update primitives/state-machine/src/overlayed_changes/mod.rs Co-authored-by: Davide Galassi <davxy@datawok.net> * Review comments * Fix issues * Silence warning * FMT * Clippy --------- Co-authored-by: Davide Galassi <davxy@datawok.net> |
||
|
|
6a29a70a92 |
Replace system config Index for Nonce (#14290)
* replace Index by Nonce * replace Index by Nonce * replace Index by Nonce * replace Index by Nonce * replace Index by Nonce * wip * remove index in lieu of nonce * wip * remove accountnonce in lieu of nonce * add minor improvement * rebase and merge conflicts |
||
|
|
87d41d0a89 |
GenesisBuild<T,I> deprecated. BuildGenesisConfig added. (#14306)
* frame::support: GenesisConfig types for Runtime enabled * frame::support: macro generating GenesisBuild::build for RuntimeGenesisConfig * frame: ambiguity BuildStorage vs GenesisBuild fixed * fix * RuntimeGenesisBuild added * Revert "frame: ambiguity BuildStorage vs GenesisBuild fixed" This reverts commit 950f3d019d0e21c55a739c44cc19cdabd3ff0293. * Revert "fix" This reverts commit a2f76dd24e9a16cf9230d45825ed28787211118b. * Revert "RuntimeGenesisBuild added" This reverts commit 3c131b618138ced29c01ab8d15d8c6410c9e128b. * Revert "Revert "frame: ambiguity BuildStorage vs GenesisBuild fixed"" This reverts commit 2b1ecd467231eddec69f8d328039ba48a380da3d. * Revert "Revert "fix"" This reverts commit fd7fa629adf579d83e30e6ae9fd162637fc45e30. * Code review suggestions * frame: BuildGenesisConfig added, BuildGenesis deprecated * frame: some pallets updated with BuildGenesisConfig * constuct_runtime: support for BuildGenesisConfig * frame::support: genesis_build macro supports BuildGenesisConfig * frame: BuildGenesisConfig added, BuildGenesis deprecated * Cargo.lock update * test-runtime: fixes * Revert "fix" This reverts commit a2f76dd24e9a16cf9230d45825ed28787211118b. * Revert "frame: ambiguity BuildStorage vs GenesisBuild fixed" This reverts commit 950f3d019d0e21c55a739c44cc19cdabd3ff0293. * self review * doc fixed * ui tests fixed * fmt * tests fixed * genesis_build macrto fixed for non-generic GenesisConfig * BuildGenesisConfig constraints added * warning fixed * some duplication removed * fmt * fix * doc tests fix * doc fix * cleanup: remove BuildModuleGenesisStorage * self review comments * fix * Update frame/treasury/src/tests.rs Co-authored-by: Sebastian Kunert <skunert49@gmail.com> * Update frame/support/src/traits/hooks.rs Co-authored-by: Sebastian Kunert <skunert49@gmail.com> * doc fix: GenesisBuild exposed * ".git/.scripts/commands/fmt/fmt.sh" * frame: more serde(skip) + cleanup * Update frame/support/src/traits/hooks.rs Co-authored-by: Davide Galassi <davxy@datawok.net> * frame: phantom fields moved to the end of structs * chain-spec: Default::default cleanup * test-runtime: phantom at the end * merge master fixes * fix * fix * fix * fix * fix (facepalm) * Update frame/support/procedural/src/pallet/expand/genesis_build.rs Co-authored-by: Bastian Köcher <git@kchr.de> * fmt * fix * fix --------- Co-authored-by: parity-processbot <> Co-authored-by: Sebastian Kunert <skunert49@gmail.com> Co-authored-by: Davide Galassi <davxy@datawok.net> Co-authored-by: Bastian Köcher <git@kchr.de> |
||
|
|
5eb816d7a6 |
Removal of execution strategies (#14387)
* Start * More work! * Moar * More changes * More fixes * More worrk * More fixes * More fixes to make it compile * Adds `NoOffchainStorage` * Pass the extensions * Small basti making small progress * Fix merge errors and remove `ExecutionContext` * Move registration of `ReadRuntimeVersionExt` to `ExecutionExtension` Instead of registering `ReadRuntimeVersionExt` in `sp-state-machine` it is moved to `ExecutionExtension` which provides the default extensions. * Fix compilation * Register the global extensions inside runtime api instance * Fixes * Fix `generate_initial_session_keys` by passing the keystore extension * Fix the grandpa tests * Fix more tests * Fix more tests * Don't set any heap pages if there isn't an override * Fix small fallout * FMT * Fix tests * More tests * Offchain worker custom extensions * More fixes * Make offchain tx pool creation reusable Introduces an `OffchainTransactionPoolFactory` for creating offchain transactions pools that can be registered in the runtime externalities context. This factory will be required for a later pr to make the creation of offchain transaction pools easier. * Fixes * Fixes * Set offchain transaction pool in BABE before using it in the runtime * Add the `offchain_tx_pool` to Grandpa as well * Fix the nodes * Print some error when using the old warnings * Fix merge issues * Fix compilation * Rename `babe_link` * Rename to `offchain_tx_pool_factory` * Cleanup * FMT * Fix benchmark name * Fix `try-runtime` * Remove `--execution` CLI args * Make clippy happy * Forward bls functions * Fix docs * Update UI tests * Update client/api/src/execution_extensions.rs Co-authored-by: Michal Kucharczyk <1728078+michalkucharczyk@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Koute <koute@users.noreply.github.com> * Update client/cli/src/params/import_params.rs Co-authored-by: Koute <koute@users.noreply.github.com> * Update client/api/src/execution_extensions.rs Co-authored-by: Koute <koute@users.noreply.github.com> * Pass the offchain storage to the MMR RPC * Update client/api/src/execution_extensions.rs Co-authored-by: Sebastian Kunert <skunert49@gmail.com> * Review comments * Fixes --------- Co-authored-by: Michal Kucharczyk <1728078+michalkucharczyk@users.noreply.github.com> Co-authored-by: Koute <koute@users.noreply.github.com> Co-authored-by: Sebastian Kunert <skunert49@gmail.com> |
||
|
|
ede49c7ae6 | Remove unused dependencies (#14464) | ||
|
|
be7c654c42 |
Pay tx fee with assets by using the asset conversion pallet (#14340)
* Pay tx by swapping the assets * Change liquidity structure * Uncomment the event * Update frame/transaction-payment/asset-tx-payment/src/payment.rs Co-authored-by: Squirrel <gilescope@gmail.com> * New approach * Fix bounds * Clearer version * Change IsType with Into and From * Enable event * Check ED + fix the logic * Add temp comments * Rework the refund * Clean up * Improve readability * Getting closer * fix * Use fungible instead of Currency * Test account without ed * Final push * Fixed * Rename to pallet-asset-conversion-tx-payment * Bring back the old pallet * Update versions * Update docs * Update readme * Wrong readme updated * Revert back doc change * Fix import * Fix kitchensink * Fix * One more time.. * Wait pls * Update frame/asset-conversion/src/lib.rs Co-authored-by: Squirrel <gilescope@gmail.com> * Update frame/support/src/traits/tokens/fungibles/regular.rs Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com> * Update docs/comments * Docs improvement * Update frame/transaction-payment/asset-conversion-tx-payment/src/lib.rs Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com> * Update frame/transaction-payment/asset-conversion-tx-payment/src/lib.rs Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com> * Update frame/transaction-payment/asset-conversion-tx-payment/src/lib.rs Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com> * Update frame/transaction-payment/asset-conversion-tx-payment/src/lib.rs Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com> * Update frame/transaction-payment/asset-conversion-tx-payment/src/lib.rs Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com> * Payed -> paid * Docs * Update frame/transaction-payment/asset-conversion-tx-payment/README.md Co-authored-by: Muharem Ismailov <ismailov.m.h@gmail.com> * Rewrite docs * Try to clean the deps * Add debug assert * Return back frame-benchmarking * Update cargo * Update frame/transaction-payment/asset-conversion-tx-payment/src/mock.rs Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com> * Rename * clearer error message * Docs for Pay by Swap (#14445) * docs * better error name * more comments * more docs on swap trait * Fix compile errors * Another fix * Refactoring * Update frame/transaction-payment/asset-conversion-tx-payment/src/payment.rs Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com> * Emit an error if we fail to swap the refund back * Add integrity_test * Update frame/asset-conversion/src/lib.rs Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> * Fmt * Use defensive_ok_or * child PR: Tidy swap event (#14441) * Dedup raising swap event * use expect rather than unwrap * Additional checks for future defence. * cargo fmt * Update frame/asset-conversion/src/lib.rs Co-authored-by: Jegor Sidorenko <5252494+jsidorenko@users.noreply.github.com> --------- Co-authored-by: Jegor Sidorenko <5252494+jsidorenko@users.noreply.github.com> --------- Co-authored-by: Squirrel <gilescope@gmail.com> Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com> Co-authored-by: Muharem Ismailov <ismailov.m.h@gmail.com> Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> |
||
|
|
9d1741eb3c |
Bump parity-scale-codec to 3.6.1 (#14428)
|
||
|
|
33a6536299 |
Society v2 (#11324)
* New Society * More logic drafting * More work * Building * Some tests * Fixes * Improvements to the voting process * More tests * Test number 20 * Tests * 30 tests * Another test] * All tests enabled * Minor stuff * generate_storage_alias: Rewrite as proc macro attribute This rewrites the `generate_storage_alias!` declarative macro as proc-macro attribute. While doing this the name is changed to `storage_alias`. The prefix can now also be the name of a pallet. This makes storage aliases work in migrations for all kind of chains and not just for the ones that use predefined prefixes. * Maintenance operations don't pay fee * Fix compilation and FMT * Moare fixes * Migrations * Fix tests and add migration testing * Introduce lazy-cleanup and avoid unbounded prefix removal * Fixes * Fixes * [WIP][Society] Adding benchmarking to the v2. (#11776) * [Society] Adding benchmarking to the v2. * [Society] Code review. * [Society] Better code. * Using clear() + clear_prefix() and adding more tests. * Benchmarking again... * Fix Cargo * Fixes * Fixes * Spelling * Fix benchmarks * Another fix * Remove println --------- Co-authored-by: Bastian Köcher <info@kchr.de> Co-authored-by: Artur Gontijo <arturgontijo@users.noreply.github.com> |
||
|
|
cadc92b893 |
fix new warning in nightly (#14334)
* fix new warning * Too soon * Explicitly import |
||
|
|
3da9449067 |
Bump sp-crates from latest crates.io version + release (#14265)
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> |
||
|
|
98a0550ea2 |
Release: Bump SP crates to release on crates.io (#14237)
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> |
||
|
|
34b2a56af1 |
Soft deprecate GenesisConfig (#14210)
* soft deprecate genesisconfig * temporarily add a deprecation attr * update tests * update mocks * update genesis config * update genesis config * update genesis config * update genesis config * remove deprecation warning * update deprecation comment --------- Co-authored-by: parity-processbot <> |
||
|
|
ef1e4e8b2b |
Asset Conversion pallet (#12984)
* Add pallet dex
* Fmt
* Add RPC endpoint
* Fix RPC
* Fix the build
* Some more fixes
* Add a method to topup pallet's account
* Add support for multi-currency into Uniques
* Fix the build
* Add [transactional] + setup() + fix balances
* Improve tests
* Fix price quotation
* Code clean up
* Validate swaps
* Fmt
* Update README
* add test
* mint LP assets in a different instance
* remove transactional as now the default
AssetsLocal renamed to Assets
* merge master
* Revert "Merge master"
* fix tests post merge.
* attempt to set create origin
* Internally allocate lp asset id.
* Simplify
* Bump to be in line
* additional bumps to make compile
* fix compile
* less bounds
* use fungible crates
* multiasset enum
* only allow native currency pairs
* added slippage tests
* transfer into separate method
(Also fee not set in 2 places now.)
Added test where lp and user are different users.
* Add benchmarks + weights
* Typos
* Clean up
* More tests,
split error into two because it wasn't clear which parameter.
renamed liquidity to lp_tokens_minted or lp_tokens_burned in events.
* tighten up naming
* Default, zero, square root traits not needed
Also let's not force people to be compact
* add keep-alive param
* add insufficient liquidity test
* Fix quote() to support u64
* Avoid recording balances twice
* cargo fmt
* Didn't mean to change error type
* temp
* Less
* Rework get_amount_in/get_amount_out
* Convert other places
* Rework the last piece
* Typo
* Fix benchmarks
* use hash trait
* Extract a native asset check into the runtime setting
* Don't set the metadata
* Remove spec file
* Enable multi-assets swaps by default
* Refactor conversion into u128
* Add path param to swap_token_for_exact_tokens
* Fix typo + a bit of refactoring
* Implement path param for swap_exact_tokens_for_tokens()
* Deref
* Minor fixes
* Add test with sensible scale values
* Use .windows()
* Fix benchmarks
* update docs
* Fix everything :)
* Chore
* Revert
* Chore
* prev way of creating sub accounts lead to collisions
* Update frame/dex/src/lib.rs
Co-authored-by: Jegor Sidorenko <5252494+jsidorenko@users.noreply.github.com>
* Update frame/dex/src/lib.rs
Co-authored-by: Jegor Sidorenko <5252494+jsidorenko@users.noreply.github.com>
* Chore
* Fmt fix on Uniques
* add call_index
bring code up to date with latest master
* revert readme changes
* add cr
* revert uniques changes
* reducing noise
* no need for deadline (#12990)
(there's generic transaction deadline functionality already)
* fix kitchen sink (#12991)
* fix kitchen sink
* Only the dex can mint lp_tokens
* add BenchmarkHelper for second instance (#12998)
* update mock to latest master
* less indirections (#13012)
* remove dex PR's custom RPC (#13050)
* As we have state_call we don't need a custom RPC
* fix docs
* no longer a need to upgrade rpc version (#13053)
* add CallbackHadle
* quote bugfix (#13191)
quote was giving same price in both directions as we were inverting needlessly.
* merging in dex specific changes due to pay by dex
* update lock file
* merging in kitchen sink changes
* Add get_reserves() api method
* Partial updating of the benchmarks
* Fix tests
* clippy
* Temp fix weights
* Fix benchmarks
* Add pool setup fee
* Money upfront
* Address some comments
* Use u128 in mock
* Fix benchmarks
* Change error message
* Update comments
* Change error names
* Implement PartialOrd for NativeOrAssetId
* add note
* Update errors
* More tests for assets sorting
* ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_dex
* Change the way we generate pool accounts
* Improve the liquidity removal method
* Extract MintMinLiquidity to config, rework all tests
* Add comments
* Validate provided amount
* Rename to asset-conversion
* Validate ED
* Improve handling the ED related errors
* typos
* Try to fix benchmarks
* Another try
* Another day, another try
* Fix benchmarks
* Expose fee related params
* Validate token's minimal amount the same way as ED
* fix typo
* Use longer path for swaps in benchmarks
* need to ref sp_std's vec.
* Remove From<u32> requirement when benchmarking
* impl BenchmarkHelper for ()
* only for runtime benchmarks
* MultiLocation: !MaybeDisplay
Looks like we might not need this bound from initial testing.
* Update frame/asset-conversion/src/lib.rs
Co-authored-by: Jegor Sidorenko <5252494+jsidorenko@users.noreply.github.com>
* Update frame/asset-conversion/src/lib.rs
Co-authored-by: Jegor Sidorenko <5252494+jsidorenko@users.noreply.github.com>
* Add documentation links
* add collision test
* Revert "[Enhancement] Throw an error when there are too many pallets (#13763)"
This reverts commit
|
||
|
|
0cf9f3b4f2 |
Add genesis config to Glutton pallet (#14188)
* glutton gensis config added * Glutton pallet updates (#14192) * Add admin origin and other fixes Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Remove magic number Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Typo Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> --------- Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * fix genesis_build * Fix docs Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Fix kitchensink runtime Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * fix twox_256 * fmt * twox_256 clean * nitpick Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com> --------- Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com> |
||
|
|
56940bc874 |
Staking::{bond, set_controller} to set controllers to stash only. (#14039)
* update set_controller * clone * bond uses `stash` * remove controller from bond(), chill_other test works * remove ctlr from testing_utils & dead ctlr -> dead payee * mvs controllers to stashes for 3 tests * migrate mock bond fns & fix 1 test * mvs controllers to stashes for 7 tests * mvs controllers to stashes for 9 tests * remove double_controlling_should_fail * remove double_staking_should_fail * mvs controllers to stashes for 10 tests * mvs controllers to stashes for 2 tests * remove payout_creates_controller * mvs controllers to stashes for 27 tests * remove println! * fix rewards_should_work * fix test_payout_stakers * fix bond benchmark * clone * rm unused import * rm unused var * rm controller from create_offender * fix GenesisConfig stakers * fix controllers in consensus pallets * fix unqiue controller in chain_spec * fmt * fix create_offender * fix set_controller benchmark * add TODO * create_unique_stash_controller * staking benchmarks working * fmt * fix args * rm println * import * import * fix fast unstake tests * fix staking-tests-e2e * fix root-offenses * fmt * differentiate controller to stash * bring back change_controller_works w. unique ctrl * bring back double_staking_should_fail * double_controlling_attempt_should_fail * bring back payout_creates_controller * add commnet to controller balances * + set_controller call description * fmt * rm clones * fmt * clippy fixes * fmt * update README * small fixes * use controller_to_be_deprecated * .comment * comment * bump zombienet version * ci --------- Co-authored-by: parity-processbot <> Co-authored-by: Javier Viola <javier@parity.io> |
||
|
|
d5e460b3bf |
refactor(sc-executor): use wasm executor builder instead of old apis (#13740)
* refactor: use builder api for all executors * improve a lot * remove unused args * cleanup deps * fix inconsistency about heap alloc * add `heap_pages` back to try-runtime * fix * chore: reduce duplicated code for sc-service-test * cleanup code * fmt * improve test executor * improve * use #[deprecated] * set runtime_cache_size: 4 * fix and improve * refactor builder * fix * fix bench * fix tests * fix warnings * fix warnings * fix * fix * update by suggestions * update name |
||
|
|
495773f96d |
Move registration of ReadRuntimeVersionExt to ExecutionExtension (#13820)
Instead of registering `ReadRuntimeVersionExt` in `sp-state-machine` it is moved to `ExecutionExtension` which provides the default extensions. |
||
|
|
5d81f23f8f |
Deprecate Currency; introduce holds and freezing into fungible traits (#12951)
* First reworking of fungibles API * New API and docs * More fungible::* API improvements * New ref-counting logic for old API * Missing files * Fixes * Use the new transfer logic * Use fungibles for the dispatchables * Use shelve/restore names * Locking works with total balance. * repotting and removal * Separate Holds from Reserves * Introduce freezes * Missing files * Tests for freezing * Fix hold+freeze combo * More tests * Fee-free dispatchable for upgrading accounts * Benchmarks and a few fixes * Another test * Docs and refactor to avoid blanket impls * Repot * Fit out ItemOf fully * Add events to Balanced traits * Introduced events into Hold traits * Fix Assets pallet tests * Assets benchmarks pass * Missing files and fixes * Fixes * Fixes * Benchmarks fixes * Fix balance benchmarks * Formatting * Expose fungible sub modules * Move NIS to fungible API * Fix broken impl and add test * Fix tests * API for `transfer_and_hold` * Use composite APIs * Formatting * Upgraded event * Fixes * Fixes * Fixes * Fixes * Repot tests and some fixed * Fix some bits * Fix dust tests * Rename `set_balance` - `Balances::set_balance` becomes `Balances::force_set_balance` - `Unbalanced::set_balance` becomes `Unbalances::write_balance` * becomes * Move dust handling to fungibles API * Formatting * Fixes and more refactoring * Fixes * Fixes * Fixes * Fixes * Fixes * Fixes * Fixes * Fixes * Fixes * Use reducible_balance for better correctness on fees * Reducing hold to zero should remove entry. * Add test * Docs * Update frame/support/src/traits/tokens/fungibles/hold.rs Co-authored-by: Muharem Ismailov <ismailov.m.h@gmail.com> * Update frame/support/src/traits/tokens/fungibles/regular.rs Co-authored-by: Muharem Ismailov <ismailov.m.h@gmail.com> * Update frame/support/src/traits/tokens/fungible/hold.rs Co-authored-by: Muharem Ismailov <ismailov.m.h@gmail.com> * Update frame/support/src/traits/tokens/fungible/regular.rs Co-authored-by: Muharem Ismailov <ismailov.m.h@gmail.com> * Docs * Docs * Docs * Fix NIS benchmarks * Doc comment * Remove post_mutation * Fix some tests * Fix some grumbles * Enumify bool args to fungible(s) functions * Fix up assets and balances * Formatting * Fix contracts * Fix tests & benchmarks build * Typify minted boolean arg * Typify on_hold boolean arg; renames * Fix numerous tests * Fix dependency issue * Privatize dangerous API mutate_account * Fix contracts (@alext - please check this commit) * Remove println * Fix tests for contracts * Fix broken rename * Fix broken rename * Fix broken rename * Docs * Update frame/support/src/traits/tokens/fungible/hold.rs Co-authored-by: Anthony Alaribe <anthonyalaribe@gmail.com> * remove from_ref_time * Update frame/executive/src/lib.rs Co-authored-by: Anthony Alaribe <anthonyalaribe@gmail.com> * Update frame/executive/src/lib.rs Co-authored-by: Anthony Alaribe <anthonyalaribe@gmail.com> * Reenable test * Update frame/support/src/traits/tokens/fungibles/hold.rs Co-authored-by: Anthony Alaribe <anthonyalaribe@gmail.com> * Update frame/support/src/traits/tokens/fungible/hold.rs Co-authored-by: Anthony Alaribe <anthonyalaribe@gmail.com> * Update frame/support/src/traits/tokens/fungible/hold.rs Co-authored-by: Anthony Alaribe <anthonyalaribe@gmail.com> * Update frame/support/src/traits/tokens/fungible/hold.rs Co-authored-by: Anthony Alaribe <anthonyalaribe@gmail.com> * Update frame/support/src/traits/tokens/currency.rs Co-authored-by: Anthony Alaribe <anthonyalaribe@gmail.com> * Update frame/lottery/src/tests.rs Co-authored-by: Anthony Alaribe <anthonyalaribe@gmail.com> * Update frame/support/src/traits/tokens/fungible/mod.rs Co-authored-by: Anthony Alaribe <anthonyalaribe@gmail.com> * Update frame/support/src/traits/tokens/fungible/regular.rs Co-authored-by: Anthony Alaribe <anthonyalaribe@gmail.com> * Update frame/support/src/traits/tokens/fungibles/freeze.rs Co-authored-by: Anthony Alaribe <anthonyalaribe@gmail.com> * Update frame/support/src/traits/tokens/fungible/regular.rs Co-authored-by: Anthony Alaribe <anthonyalaribe@gmail.com> * Update frame/support/src/traits/tokens/fungibles/hold.rs Co-authored-by: Anthony Alaribe <anthonyalaribe@gmail.com> * Update frame/support/src/traits/tokens/fungibles/hold.rs Co-authored-by: Anthony Alaribe <anthonyalaribe@gmail.com> * Update frame/support/src/traits/tokens/fungibles/hold.rs Co-authored-by: Anthony Alaribe <anthonyalaribe@gmail.com> * Rename UnwantedRemoval to UnwantedAccountRemoval * Docs * Formatting * Update frame/balances/src/lib.rs Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Update primitives/runtime/src/lib.rs Co-authored-by: Keith Yeung <kungfukeith11@gmail.com> * handle_raw_dust oes nothing * Formatting * Fixes * Grumble * Fixes * Add test * Add test * Tests for reducible_balance * Fixes * Fix Salary * Fixes * Disable broken test * Disable nicely * Fixes * Fixes * Fixes * Rename some events * Fix nomination pools breakage * Add compatibility stub for transfer tx * Reinstate a safely compatible version of Balances set_balance * Fixes * Grumble * Update frame/nis/src/lib.rs Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> * ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_balances * disable flakey tests * Update frame/balances/src/lib.rs Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> * Grumbles * Grumble --------- Co-authored-by: Muharem Ismailov <ismailov.m.h@gmail.com> Co-authored-by: Alexander Theißen <alex.theissen@me.com> Co-authored-by: Anthony Alaribe <anthonyalaribe@gmail.com> Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by: Keith Yeung <kungfukeith11@gmail.com> Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> Co-authored-by: command-bot <> |
||
|
|
13b0f24abd |
consensus: remove caching functionality from block import pipeline (#13551)
* consensus: remove caching functionality from block import pipeline * client: update docs on Verifier::verify * node: fix block production benchmark |
||
|
|
bc53b9a03a |
Remove years from copyright notes. (#13415)
* Change copyright year to 2023 from 2022 * Fix incorrect update of copyright year * Remove years from copy right header * Fix remaining files * Fix typo in a header and remove update-copyright.sh |
||
|
|
7a10154188 |
BlockId removal: runtime-api refactor (#13255)
* BlockId removal: refactor of runtime API It changes the arguments of: - `ApiExt` methods: `has_api`, `has_api_with`, `api_version` - `CallApiAt` method: `runtime_version_at` from: `BlockId<Block>` to: `Block::Hash` It also changes the first argument of all generated runtime API calls from: `BlockId<Block>` to: `Block::Hash` This PR is part of BlockId::Number refactoring analysis (paritytech/substrate#11292) * BlockId removal: refactor of runtime API - tests - tests adjusted to new runtime API, - some tests migrated from block number to block hash * benchmarking-cli: BlockId(0) migrated to info().genesis_hash `runtime_api.call()` now requires the block hash instead of BlockId::Number. To access the genesis hash widely used in benchmarking engine the Client was constrained to satisfy `sp_blockchain::HeaderBackend<Block>` trait which provides `info().genesis_hash`. * trivial: api.call(BlockId) -> api.call(Hash) - Migrated all `runtime_api.calls` to use Hash - Noteworthy (?): -- `validate_transaction_blocking` in transaction pool, * CallApiAtParams::at changed to Block::Hash * missed doc updated * Apply suggestions from code review Co-authored-by: Bastian Köcher <git@kchr.de> * ".git/.scripts/commands/fmt/fmt.sh" * BlockId removal: Benchmark::consumed_weight Little refactor around `Benchmark::consumed_weight`: `BlockId` removed. * at_hash renamed * wrong merge fixed * beefy worker: merged with master * beefy: tests: missing block problem fixed * Apply review suggestion * fix --------- Co-authored-by: Bastian Köcher <git@kchr.de> Co-authored-by: command-bot <> |
||
|
|
36480b158d |
BlockId removal: Client::runtime_version_at (#13393)
* BlockId removal: Client::runtime_version_at It changes the arguments of `Client::runtime_version_at` from: `BlockId<Block>` to: `Block::Hash` * Apply suggestions from code review Co-authored-by: Anton <anton.kalyaev@gmail.com> --------- Co-authored-by: Anton <anton.kalyaev@gmail.com> Co-authored-by: parity-processbot <> |
||
|
|
2d7fa18e73 |
Make DispatchError impl MEL (#13169)
* Make DispatchError impl MEL * Upgrade SCALE codec to support `codec(skip)` for MEL Co-authored-by: Bastian Köcher <info@kchr.de> |
||
|
|
b92aa3dbdc |
Support custom genesis block (#12291)
* Set genesis block data using the built genesis block * Make resolve_state_version_from_wasm a separate function and some small refactorings Useful for the commit following. * Introduce trait BuildGenesisBlock Substrate users can use this trait to implement their custom genesis block when constructing the client. * Make call_executor test compile * cargo +nightly fmt --all * Fix test * Remove unnecessary clone * FMT * Apply review suggestions * Revert changes to new_full_client() and new_full_parts() signature * Remove needless `Block` type in `resolve_state_version_from_wasm` |
||
|
|
8751f88fc7 |
Implement crate publishing on CI (#12768)
* implement crate publishing from CI * fix indentation * use resource_group for job exclusivity ensure that at most one instance of the publish-crates job is running at any given time to prevent race conditions * correct publish = false * Remove YAML anchors as GitLab's `extends:` doesn't need it * Temporarily force cache upload for the new jobs * Revert `RUSTY_CACHIER_FORCE_UPLOAD` * pin libp2p-tcp=0.37.0 for sc-telemetry * Revert "pin libp2p-tcp=0.37.0 for sc-telemetry" This reverts commit 29146bfad6c31e8cf0e2f17ad92a71bb81a373af. * always collect generated crates * increase timeout for publish-crates-template * Force upload the new job cache again * Revert "Force upload the new job cache again" This reverts commit 5a5feee1b2c51fdef768b25a76be4c3949ec1c99. * reformat * improve timeout explanation * s/usual/average Co-authored-by: Vladimir Istyufeev <vladimir@parity.io> |
||
|
|
2a0e53d11a |
Non-Interactive Staking (#12610)
* Improve naming. * More improvements to naming * Fungible counterpart * Shared pot instead of reserve * Transferable receipts * Better naming * Use u128 for counterpart * Partial thawing * Docs * Remove AdminOrigin * Integrate into Kitchen Sink * Thaw throttling * Remove todo * Docs * Fix benchmarks * Building * Tests work * New benchmarks * Benchmarking tests * Test new defensive_saturating_* functions Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * fmt Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Formatting * Update frame/nis/src/lib.rs Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Apply suggestions from code review Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Events added * Fix kitchensink * Update frame/nis/src/lib.rs Co-authored-by: Xiliang Chen <xlchen1291@gmail.com> * Review niggles * Remove genesis build requirements * Grumbles * Fixes * Fixes * Fixes * Update frame/nis/src/lib.rs Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> * Update primitives/runtime/src/traits.rs Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> * Formatting * Fixes * Fix node genesis config Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Fix node chain specs Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Use free asset ID as counterpart Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Account for rounding errors in fund_deficit bench Relaxes the check for the NIS account balance in the fund_deficit bench from equality from to checking for 99.999% equality. The exact deviation for the kitchensink runtime config is 1.24e-10 percent but could vary if the config is changed. Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * clippy Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * fmt Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Fix * Rename * Fixes * Fixes * Formatting Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by: Xiliang Chen <xlchen1291@gmail.com> Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> |
||
|
|
4214bc527c |
Remove the wasmtime feature flag (#12684)
* Remove the `wasmtime` feature flag * rustfmt |
||
|
|
d5a5f3673e |
Release sp-keyring and pallet-contracts-primitives 7.0.0 (#12716)
* Bump sp-keyring * Bump pallet-contracts-primitives * Cargo.lock |
||
|
|
2b8af8cb1a |
release sp-core 7.0.0 and sp-runtime 7.0.0 (#12599)
* chore(release): sp-core v7.0.0 * chore(release): sp-runtime v7.0.0 * fix bad merge |
||
|
|
11fa9af104 |
Remove discarded blocks and states from database by default (#11983)
* 1.Add pruning param "canonical" in sc-cli. 2.Make PruningMode's default value to ArchiveCanonical. * Update tests in sc-state-db. * Update tests in sc-state-db. * 1.Add a new value `AllWithNonFinalized` in `enum BlocksPruning` which Corresponds to `blocks_pruning 0` in CLI . 2.Change value `All` to `AllFinalized` in `enum BlocksPruning` and make it to keep full finalized block history. * Make some corresponding adjustments based on the content in the conversation. * Update client/db/src/lib.rs Co-authored-by: Bastian Köcher <git@kchr.de> * Apply suggestions from code review. * 1.Change `blocks_pruning` to be like `state_pruning` . * Fmt and add some doc. * Update client/cli/src/params/pruning_params.rs Co-authored-by: Bastian Köcher <git@kchr.de> * Update client/cli/src/params/pruning_params.rs Co-authored-by: Bastian Köcher <git@kchr.de> * Update doc. * Change `new_test_with_tx_storage` to take `BlocksPruning`. * Fmt Co-authored-by: Bastian Köcher <git@kchr.de> |
||
|
|
6e8795afe6 |
BREAKING: Rename Call & Event (#11981)
* rename Event to RuntimeEvent * rename Call * rename in runtimes * small fix * rename Event * small fix & rename RuntimeCall back to Call for now * small fixes * more renaming * a bit more renaming * fmt * small fix * commit * prep for renaming associated types * fix * rename associated Event type * rename to RuntimeEvent * commit * merge conflict fixes & fmt * additional renaming * fix. * fix decl_event * rename in tests * remove warnings * remove accidental rename * . * commit * update .stderr * fix in test * update .stderr * TRYBUILD=overwrite * docs * fmt * small change in docs * rename PalletEvent to Event * rename Call to RuntimeCall * renamed at wrong places :P * rename Call * rename * rename associated type * fix * fix & fmt * commit * frame-support-test * passing tests * update docs * rustdoc fix * update .stderr * wrong code in docs * merge fix * fix in error message * update .stderr * docs & error message * . * merge fix * merge fix * fmt * fmt * merge fix * more fixing * fmt * remove unused * fmt * fix Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com> |
||
|
|
73d9ae3284 |
Introduce trie level cache and remove state cache (#11407)
* trie state cache
* Also cache missing access on read.
* fix comp
* bis
* fix
* use has_lru
* remove local storage cache on size 0.
* No cache.
* local cache only
* trie cache and local cache
* storage cache (with local)
* trie cache no local cache
* Add state access benchmark
* Remove warnings etc
* Add trie cache benchmark
* No extra "clone" required
* Change benchmark to use multiple blocks
* Use patches
* Integrate shitty implementation
* More stuff
* Revert "Merge branch 'master' into trie_state_cache"
This reverts commit 947cd8e6d43fced10e21b76d5b92ffa57b57c318, reversing
changes made to
|
||
|
|
20c49b20a7 |
Rename --pruning and --keep-blocks to be more similar to one another (#11934)
* rename prunning and keep-blocks flags * Add aliases in keep-blocks and pruning for backward compatibility * Rename in code variables from and to and |
||
|
|
103f770e75 |
Rename node-runtime to node-kitchensink-runtime (#11930)
* Rename node=runtime to kithensink-runtime * Undo md formatting |
||
|
|
f9ea8b8d0f |
Make it possible to disable RocksDB completely (#11537)
* Make it possible to disable RocksDB completely * Make ParityDB non-optional * Address review comments |
||
|
|
5788461196 |
pallet alliance (#11112)
* Add pallet-alliance Signed-off-by: koushiro <koushiro.cqx@gmail.com> * Update multihash/cid and format Signed-off-by: koushiro <koushiro.cqx@gmail.com> * Remove useless deps Signed-off-by: koushiro <koushiro.cqx@gmail.com> * Add pallet-alliance into node runtime Signed-off-by: koushiro <koushiro.cqx@gmail.com> * Fix has_identity Signed-off-by: koushiro <koushiro.cqx@gmail.com> * Add TooMantBlacklist Error Signed-off-by: koushiro <koushiro.cqx@gmail.com> * Add TooLongWebsiteUrlLength Error Signed-off-by: koushiro <koushiro.cqx@gmail.com> * Add remove_announcement Signed-off-by: koushiro <koushiro.cqx@gmail.com> * Derive pallet_identity::Config and Fix test/benchmarking Signed-off-by: koushiro <koushiro.cqx@gmail.com> * Add part weight for call of pallet-alliance Signed-off-by: koushiro <koushiro.cqx@gmail.com> * Remove pallet_identity Config trait Signed-off-by: koushiro <koushiro.cqx@gmail.com> * Fix propose arguments Signed-off-by: koushiro <koushiro.cqx@gmail.com> * Some nits Signed-off-by: koushiro <koushiro.cqx@gmail.com> * cargo fmt Signed-off-by: koushiro <koushiro.cqx@gmail.com> * Fix benchmarking of add_blacklist/remove_blacklist Signed-off-by: koushiro <koushiro.cqx@gmail.com> * Some nits Signed-off-by: koushiro <koushiro.cqx@gmail.com> * Add benchmarking for init_members Signed-off-by: koushiro <koushiro.cqx@gmail.com> * Add benchmarking for propose/vote/veto Signed-off-by: koushiro <koushiro.cqx@gmail.com> * Fix benchmarking Signed-off-by: koushiro <koushiro.cqx@gmail.com> * Remove some useless Signed-off-by: koushiro <koushiro.cqx@gmail.com> * fix some compile issue * more fix * all checks * refactor * refactor event * refactor * cleanup * cleanup * fix benchmarking * fix warning * fmt * fix benchmarks * with storage info * fmt * add new config * fix benchmarks * fix * fmt * Apply suggestions from code review Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> * improvements * fix * update docs * rename events, errors, and functions * make kicking events clearer * fix * fix tests * fix tests * fix runtime * fix build * remove unneeded change * remove Candidate role from Alliance * fmt grumbles * update lock * update recursion limit * benchmarks * convert-try * benchmark assertions * fmt , * cargo lock * Update frame/alliance/src/benchmarking.rs Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> * add docs to public interfaces * Apply suggestions from code review Co-authored-by: Squirrel <gilescope@gmail.com> * fix build (node) * review * use EitherOfDiverse * update cargo toml * make all dispatch class Normal * change blacklist to unscrupulous * formatting * fmt oops * rename benchmarking unscrupulous account creator Co-authored-by: koushiro <koushiro.cqx@gmail.com> Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> Co-authored-by: joepetrowski <joe@parity.io> Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com> Co-authored-by: Squirrel <gilescope@gmail.com> |
||
|
|
dd854c16e2 |
Switch to pooling copy-on-write instantiation strategy for WASM (#11232)
* Switch to pooling copy-on-write instantiation strategy for WASM * Fix benchmark compilation * Fix `cargo fmt` * Fix compilation of another benchmark I've missed * Cleanups according to review comments * Move `max_memory_size` to `Semantics` * Set `memory_guaranteed_dense_image_size` to `max_memory_size` * Rename `wasm_instantiation_strategy` to `wasmtime_instantiation_strategy` * Update the doc-comments regarding the instantiation strategy * Extend the integration tests to test every instantiation strategy * Don't drop the temporary directory until the runtime is dropped in benchmarks * Don't drop the temporary directory until the runtime is dropped in tests |
||
|
|
4a3758d9b8 |
Bump log from 0.4.16 to 0.4.17 (#11369)
* Bump log from 0.4.16 to 0.4.17 Bumps [log](https://github.com/rust-lang/log) from 0.4.16 to 0.4.17. - [Release notes](https://github.com/rust-lang/log/releases) - [Changelog](https://github.com/rust-lang/log/blob/master/CHANGELOG.md) - [Commits](https://github.com/rust-lang/log/commits/0.4.17) --- updated-dependencies: - dependency-name: log dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * Update Cargo.lock Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com> |
||
|
|
729cba9d9e |
Remove the --unsafe-pruning CLI-argument (step 1) (#10995)
* sc-client-db: utils::open_database(...) — return OpenDbError so that the caller could tell the `OpenDbError::DoesNotExist` clearly * sc-client-db: utils::open_database(..) — accept the `create: bool` argument * sc-client-db: pruning — optional argument in the DatabaseSettings * sc-state-db: Split `Error<E>` into separate `Error<E>` and `StateDbError` * StateDb::open: choose the pruning-mode depending on the requested and stored values * sc-state-db: test for different combinations of stored and requested pruning-modes * CLI-argument: mark the unsafe-pruning as deprecated * Fix tests * tests: do not specify --pruning when running the substrate over the existing storage * fix types for benches * cargo fmt * Check whether the pruning-mode and sync-mode are compatible * cargo fmt * parity-db: 0.3.11 -> 0.3.12 * sc-state-db: MetaDb::set_meta — a better doc-test * cargo fmt * make MetaDb read-only again! * Remove the stray newline (and run the CI once again please) * Last nitpicks * A more comprehensive error message |
||
|
|
7d5202341b |
Basic TOML Lint (#11348)
* basic lint * lint ordering |
||
|
|
b581604aa7 |
Apply some clippy lints (#11154)
* Apply some clippy hints * Revert clippy ci changes * Update client/cli/src/commands/generate.rs Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> * Update client/cli/src/commands/inspect_key.rs Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> * Update client/db/src/bench.rs Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> * Update client/db/src/bench.rs Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> * Update client/service/src/client/block_rules.rs Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> * Update client/service/src/client/block_rules.rs Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> * Update client/network/src/transactions.rs Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> * Update client/network/src/protocol.rs Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> * Revert due to missing `or_default` function. * Fix compilation and simplify code * Undo change that corrupts benchmark. * fix clippy * Update client/service/test/src/lib.rs Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> * Update client/state-db/src/noncanonical.rs Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> * Update client/state-db/src/noncanonical.rs remove leftovers! * Update client/tracing/src/logging/directives.rs Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> * Update utils/fork-tree/src/lib.rs Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> * added needed ref * Update frame/referenda/src/benchmarking.rs * Simplify byte-vec creation * let's just not overlap the ranges * Correction * cargo fmt * Update utils/frame/benchmarking-cli/src/shared/stats.rs Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> * Update utils/frame/benchmarking-cli/src/pallet/command.rs Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> * Update utils/frame/benchmarking-cli/src/pallet/command.rs Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> Co-authored-by: Giles Cope <gilescope@gmail.com> |
||
|
|
247f33dc0b |
Nomination Pools (#10694)
* Update frame/nomination-pools/src/lib.rs Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> * Add admin roles and make some calls permissionless * Destroy pool in withdraw unbonded * Add docs on pool admin * Fixup tests * Test unbond_other permissionless scenarios * Test withdraw unbonded permissionless * Test only can join open pools * Move unsafe set state to mock * Test: nominate_works * Add bounds: MinJoinBond, MinCreateBond, MaxPools * Test MinCreateBond, MinJoinBond, MaxPools * Add post checks to tests * Remove some TODOs * Setup weight infrastructure * Benchmark claim_payout * Benchmark create * Benchmark nominate * Benchmark join * Benchmark unbond_other * Refactor join benchmark to use scenario setup * Clean up and address warnings * Basic withdraw unbonded benchmarks * Refactor nominate benchmark * Refactor claim payout * Add feature sp-staking/runtime-benchmarks * Get node runtime to compile * Get node to run * Make claim_payout bench work with node * Make pool_withdraw_unbonded bench work with node * Make withdraw_unbonded_other work with node runtime' * Make create benchmark work with node * Make nominate benchmark work with node runtime * WiP new benchmark crate * Implement initial mock for benchmarks * Establish benchmark setup logic * Get claim payout and nominate benchmarks working * Remove pool bench utils; make struct fields pub insteaad * Get more benchmarks to work; trim interface trait * Some more top level docs * Finish tranistion benchmarks to crate * Hook up benchmark pallet to node runtime * Get benches to work with node runtime * cargo run --quiet --profile=production --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_nomination_pools --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/nomination-pools/src/weights.rs --template=./.maintain/frame-weight-template.hbs * Benchmark withdraw_unbonded_other_kill * Delete old benchmarking files * Refunds for withdraw_unbonded * Remove some TODOs * 'Don't return an option for the current_era' * Streamline extrinsic docs * small docs tweaks * Refactor ledger::slash * Add on_slash impl for nomination pools * slash refactor wip * WIP slash working * DRY Ledger::stash * Fix slash saturation * Remove unused param from slash * Docs and warnings * Test ledger::slash * save progress * Introduce counter for delegators * Add tests for max delegator errors * Reproducible account ids * Adapt tests to new account id format * Simplify create_accounts api * Fix staking tests * Save PerBill slash impl before removing * Rever ledger slash test * Get node runtime to work * Organize sub pools by unbond era, not curren era * staking: Proportional ledger slashing * Some comment cleanup * Add more test post checks * Update frame/staking/src/pallet/mod.rs Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> * Tests: account for storing unbond era * Improve docs for staking interface * Add events Created, Destroyed * withdraw_unbonded: Remove useless withdraw dust check * Test: withdraw_unbonded_other_handles_faulty_sub_pool_accounting * Add extrinsics: set_state_other, set_metadata * Test: set_state_other_works * Test: set_metadata_works * Add benchmarks for set_state_other, set_metadata * Fix benchmarks * Add weight info for new extrinsics * Some feedback * duo feedback * Incorporate some more feedback * integrate more kian feedback * integrate more kian feedback * More improvements * Add destroying_mul * Make do_reward_payout take refs * Remove some TODOs * Add test for saturating * feedback * Fix join test * use `inner` for nested types in nomination pools (#11030) * Use nested inner type for pool * make tests and benchmarks work * remove feat * all tests work now * fix node-runtime * nomination-pools: update benches for new account format (#11033) * Update benches to new account format * More sensible seeds * bring back rward account sanity check * Comment * Add extrinsic set_configs (#11038) * Better sanity checks for nomination pools (#11042) * new sanity checks, few other changes * Update frame/nomination-pools/src/lib.rs Co-authored-by: Zeke Mostov <z.mostov@gmail.com> * nomination-pools: Fix state event regression + benches (#11045) * new sanity checks, few other changes * Fix benches, improve sanity check * Remove useless clear storage in benchmarking * Set state * Save * Doc * Update frame/nomination-pools/src/lib.rs Co-authored-by: kianenigma <kian@parity.io> * FMT * Try fill in all staking configs * Fix build * More changes to nomination pools (#11050) * new sanity checks, few other changes * some last touches as a whole * Apply suggestions from code review * Remove redundant event * Improve unbond_other error handling * Remove comment Co-authored-by: Zeke Mostov <z.mostov@gmail.com> Co-authored-by: emostov <32168567+emostov@users.noreply.github.com> * Remove sanity module and some TODOs * round of feedback and imp from kian * Add TODO for ED QoL at reward pool creation * Make sure reward pool never gets dusted * Improve error type * demonstrate per_thing usage * Update sanity check & fix create_works * Improve test ext pool creation & fix some more tests * Try revert * Revert "Try revert" This reverts commit c044c94730e1a370eecd8f5b2c4f632835913063. * Revert "Improve test ext pool creation & fix some more tests" This reverts commit 1e862a64a7423479260c6e5ad1bd4c8c95651f3a. * Revert "Update sanity check & fix create_works" This reverts commit 568a7b727687e4d585e2796afc638df97b83c632. Roll back reward account funding * Revert "Improve error type" This reverts commit 4b993ee601a037e7a44e4a49bbfd60cf45b38b78. * Revert "Make sure reward pool never gets dusted" This reverts commit e7a3eb45bdfd156d3f6d94d194e988032ebbc593. revert * Update some tests * FMT * Test that era offset works correctly * Update mocks * Remove unnescary docs * Doc updates * Update calculate_delegator_payout_works_with_a_pool_of_1 * Fix test: claim_payout_works * do_reward_payout_correctly_sets_pool_state_to_destroying * Remove test do_reward_payout_errors_correctly * Fix test: do_reward_payout_works * Fix test: create_errors_correctly * Fix test: create works * Fix test: unbond_other_of_3_works * Ensure that ED is transferred into reward pool upon creation * WIP pool lifecycle test * Fix benchmarks * Add sanity check for ED + reward pools * `bond_extra` for nomination pools (#11100) * bond_extra for nomination pools * Update frame/nomination-pools/src/lib.rs * Update frame/nomination-pools/src/lib.rs * Update frame/nomination-pools/src/lib.rs Co-authored-by: Zeke Mostov <z.mostov@gmail.com> * Update frame/nomination-pools/src/lib.rs Co-authored-by: Zeke Mostov <z.mostov@gmail.com> * add benchmarks * remove the min logic of bond_extra Co-authored-by: Zeke Mostov <z.mostov@gmail.com> * FMT * Update frame/nomination-pools/src/lib.rs Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> * Update frame/nomination-pools/src/lib.rs Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> * Update frame/nomination-pools/src/lib.rs Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> * Update frame/nomination-pools/src/lib.rs Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> * make it compile end to end * Update some type viz * Update kick terminology * Update frame/nomination-pools/src/lib.rs Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> * Update frame/nomination-pools/src/lib.rs * Cache bonded account when creating pool * Add bond extra weight stuff * Update frame/nomination-pools/src/lib.rs Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> * Update docs for pool withdraw unbonded * Update docs for unbond * Improve Doc * Update frame/nomination-pools/src/lib.rs Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Update frame/nomination-pools/Cargo.toml Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Update frame/nomination-pools/src/lib.rs Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Update frame/nomination-pools/src/lib.rs Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Update frame/nomination-pools/src/lib.rs Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Improve Docs * Some docs improvements * fmt * Remove unlock_era * Fix accidental frame-support regression * Fix issue with transactions in tests * Fix doc links * Make sure result in test is used * Update frame/nomination-pools/src/lib.rs Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Fix can toggle state * Account for new_funds in ok to be open * Update docs: ok_to_withdraw_unbonded_other_with * Update frame/nomination-pools/src/lib.rs Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Update frame/nomination-pools/src/lib.rs Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Remove some staking comments * Rename SubPoolsWithEra to UnbondingPoolsWithEra * Use validators length for benchmarks * Use metadata length for benchmarks * Remove debug assert eq * docs * Fix test: withdraw_unbonded_other_errors_correctly * Fix check for having enough balance to create the pool * Bond event for pool creation * Ok to be open * FMT * Remove _other postfix * Update frame/staking/src/lib.rs * Adjust tests to account for only remove when < ED * Remove stale TODOs * Remove dupe test * Fix build * Make sure to convert to u256 so we don't saturate * Refund depositor with reward pool fee * FMT * Remove reachable defensive * Use compact encoding for relevant extrinsics * Remove unnescary make_free_be for cleaning reward account * Add not to maintainers for reward account accounting * Remove note to maintainers from public doc * Make sure all configs have currency balance * Avoid saturation in balance_to_unbond * Partial Unbonding for Nomination Pools (#11212) * first draft of partial unbonding for pools * remove option * Add some more tests and fix issues * Fix all tests * simplify some tests * Update frame/nomination-pools/src/mock.rs * remove clone * rename to delegator_unbonding_eras * Update frame/nomination-pools/src/tests.rs Co-authored-by: Zeke Mostov <z.mostov@gmail.com> * Update frame/nomination-pools/src/tests.rs Co-authored-by: Zeke Mostov <z.mostov@gmail.com> * Update frame/nomination-pools/src/tests.rs Co-authored-by: Zeke Mostov <z.mostov@gmail.com> * remove pub * Update frame/nomination-pools/src/lib.rs Co-authored-by: Zeke Mostov <z.mostov@gmail.com> * Update frame/nomination-pools/src/lib.rs Co-authored-by: Zeke Mostov <z.mostov@gmail.com> * undo * Update frame/nomination-pools/src/lib.rs Co-authored-by: Zeke Mostov <z.mostov@gmail.com> * Update frame/nomination-pools/src/lib.rs Co-authored-by: Zeke Mostov <z.mostov@gmail.com> * leftovers * fix invariant * Fix the depositor assumption * round of self-review * little bit more cleanup * Update frame/nomination-pools/src/mock.rs * Apply suggestions from code review * Update frame/nomination-pools/src/lib.rs Co-authored-by: Zeke Mostov <z.mostov@gmail.com> * Fix interpretation of MinCreateBond * controvesial refactor * rename * make everything build * add TODO about killing the reward account * Update frame/nomination-pools/src/lib.rs Co-authored-by: Zeke Mostov <z.mostov@gmail.com> * Update frame/nomination-pools/src/lib.rs * last self-review Co-authored-by: Zeke Mostov <z.mostov@gmail.com> * Update Cargo.lock * Rename Delegator to PoolMember * fmt * Get runtime to build with runtime-benchmarks feature * Update Cargo.lock * Fix asserts to work in more scenarios * gte not gt * cargo run --quiet --profile=production --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark pallet --chain=dev --steps=50 --repeat=20 --pallet=pallet_nomination_pools --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/nomination-pools/src/weights.rs --template=./.maintain/frame-weight-template.hbs * Update frame/staking/src/mock.rs * Update frame/nomination-pools/src/lib.rs * Update frame/staking/src/slashing.rs * Apply suggestions from code review * fmt * Fix some tests Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> Co-authored-by: Parity Bot <admin@parity.io> Co-authored-by: kianenigma <kian@parity.io> Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com> |