-
Notifications
You must be signed in to change notification settings - Fork 710
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Pools] Refactors and runtime apis for DelegateStake #4537
Merged
Merged
Changes from all commits
Commits
Show all changes
351 commits
Select commit
Hold shift + click to select a range
a48b651
fix imports
Ank4n 8df0f0f
Revert log level changes (#3913)
bkchr 8cd50d0
Fix two typos (#3812)
gemini132 398eb18
Removed `pallet::getter` usage from `pallet-alliance` (#3738)
muraca 140b0f5
network:bridge: fix peer_count metric (#3711)
alexggh 01d0b52
[parachain-template] pallet configurations into `mod configs` (#3809)
asiniscalchi c861b78
Improve `HostConfiguration` consistency check (#3897)
sandreim 2d82d2b
Pools: Make `PermissionlessWithdraw` the default claim permission (#3…
780e29d
Fix 0007-dispute-freshly-finalized.zndsl failing (#3893)
alexggh 5a8f14b
primitives: Move out of staging released APIs (#3925)
alexggh b4cb8d1
Fix links (#3928)
serban300 be8bd2d
pallet-scheduler: fix test (#3923)
sandreim 5e3d97e
`im-online` removal final cleanup (#3902)
s0me0ne-unkn0wn 8f2e654
Update derive syn parse 0.2.0 (+ docify) (#3920)
sam0x17 00529bc
pallet-xcm: fix weights for all XTs and deprecate unlimited weight on…
acatangiu 14603f2
Fix parachain upgrade scheduling when done by the owner/root (#3341)
bkchr e43f54f
chore(zombienet): bump version (#3933)
pepoviola ff1007e
Update bridges subtree (#3938)
serban300 3021cbc
beefy: error logs for validators with dummy keys (#3939)
acatangiu a1e6f04
chainHead: Allow methods to be called from within a single connection…
lexnv 8164280
Align dependencies with `parity-bridges-common` (#3937)
serban300 b659b7d
migrations: prevent accidentally using unversioned migrations instead…
dastansam 0a98610
Snowbridge: Synchronize from Snowfork repository (#3761)
claravanstaden 7d6679e
sp_runtime: TryFrom<RuntimeString> for &str (#3942)
michalkucharczyk 67de6ed
SortedMembers::add for pallet-membership benchmarks (#3729)
Dinonard c47d5f4
Remove nextest filtration (#3885)
AndreiEres e4cd533
statement-distribution: fix filtering of statements for elastic parac…
sandreim 5536d86
sp-wasm-interface: `wasmtime` should not be enabled by `std` (#3954)
bkchr 7e437ad
Added tests for XCM barriers: `AllowSubscriptions`, `WithUniqueTopic`…
bkontur 743cfee
chainHead: Ensure reasonable distance between leaf and finalized bloc…
lexnv c5a043f
Enable pov-reclaim on rococo and westend parachains (#3858)
skunert 5a1b92d
Add ClaimQueue wrapper (#3950)
sandreim 8518593
Renames `frame` crate to `polkadot-sdk-frame` (#3813)
codekitz 23860fc
Convince GitLab not to crop collapsed multiline strings (#3971)
rcny 73fdff8
Use 0.1.0 as minimum version for crates (#3941)
Morganamilo 63064e6
Fix Mermaid diagram rendering (#3875)
liamaharon 2f49bf6
[doc] Example MBM pallet (#2119)
juangirini fa02ada
XCM builder pattern improvement - Accept `impl Into<T>` instead of ju…
franciscoaguirre d199fd3
Migrate fee payment from `Currency` to `fungible` (#2292)
liamaharon e8db4e2
Added support for coretime-kusama/polkadot and people-kusama/polkadot…
bkontur 569a318
Make `BlockNumberProvider::set_block_number` available in tests / std…
shawntabrizi b159df1
`GenesisConfig` presets for runtime (#2714)
michalkucharczyk bb373ea
Add Helikon boot nodes for Coretime Westend and People Westend. (#3922)
kukabi 1ae6ec0
Update pr_3844.prdoc (#3988)
ermalkaleci bfd7ae2
Elastic scaling: add e2e test (#3929)
sandreim 04119b3
Revert "[prdoc] Require SemVer bump level" (#3987)
ggwpez 76f0ce7
Update pr_3302.prdoc (#3985)
ordian 047cfa8
[prdoc] Support multiple audiences (#3990)
ggwpez a961eb0
[pallet-broker] Fix claim revenue behaviour for zero timeslices (#3997)
seadanda 9d0a455
[parachain-template] benchmarks into `mod benchmarks` (#3818)
asiniscalchi 03ca23d
Rococo/Westend: publish `claim_queue` Runtime API (#4005)
sandreim a03040f
chore: fix some comments (#4004)
divdeploy ac4cd56
Bump h2 from 0.3.24 to 0.3.26 (#4008)
dependabot[bot] 65d1bb5
Broker: sale price runtime api (#3485)
Szegoo d9d4250
`pallet-uniques`: decrement `total_deposit` when clearing collection …
liamaharon c405c93
Improve frame umbrella crate doc experience (#4007)
liamaharon b7342b3
Major bump of tracing-subscriber version (#3891)
gilescope b95e605
Fix some typos (#4018)
HongKuang 7daeaca
Deprecate `para_id()` from `CoreState` in polkadot primitives (#3979)
tdimitrov 70fc335
sc-beefy-consensus: Remove unneeded stream. (#4015)
bkchr 7f2a59b
adder-collator: add velocity measurement and make elastic scaling tes…
sandreim 4db2dca
Add best block indicator to informant message + print parent block on…
skunert 561bfdd
Github workflow to automate release draft creation (#3978)
EgorPopelyaev 65a5d7b
[FRAME] Runtime Omni Bencher (#3512)
ggwpez 527e039
Integrate litep2p into Polkadot SDK (#2944)
altonen 0cc0af3
Adapt `RemoteExternalities` and its related types to be used with gen…
lean-apple 6284289
Merge branch 'ankan/02-pallet-delegated-staking' into ankan/03-np-del…
Ank4n d0d7977
add prdoc
Ank4n 765278a
prdoc
Ank4n e46b01b
prdoc
Ank4n 0376db7
mark strategy migration in storage
Ank4n 3ee339a
pre post upgrade checks for strategy adapter migration
Ank4n 0e41b01
Merge branch 'master' into ankan/01-prep-staking-for-delegation
Ank4n 67a541c
Merge branch 'ankan/01-prep-staking-for-delegation' into ankan/02-pal…
Ank4n 5457c40
Merge branch 'ankan/02-pallet-delegated-staking' into ankan/03-np-del…
Ank4n 17a4cf1
bench apply slash
Ank4n 4d48232
weights
Ank4n b9bd68a
fmt
Ank4n 09b85b3
apply slash pass with transfer stake strategy
Ank4n 6bf7432
fmt
Ank4n 92c9ef4
switch back to DelegateStake for bench
Ank4n 5886704
fix delegated staking
Ank4n b8d9739
add dummy weights
Ank4n 82f4a00
todo test
Ank4n 49fb272
fix bench
Ank4n 87d0bce
bench pool migration
Ank4n 749b729
claim delegation bench
Ank4n c6771ab
update weights for migration of pool
Ank4n 444dc76
add migrate to direct staker for testing
Ank4n 9e5bdfa
Merge branch 'ankan/01-prep-staking-for-delegation' into ankan/02-pal…
Ank4n b1312d7
minor refactor
Ank4n 49cfce1
Merge branch 'ankan/02-pallet-delegated-staking' into ankan/03-np-del…
Ank4n 9079d82
add migrate to direct staker for testing
Ank4n 616dfa7
doc comment
Ank4n 6bcf0ab
Merge branch 'ankan/01-prep-staking-for-delegation' into ankan/02-pal…
Ank4n c07a473
Merge branch 'ankan/02-pallet-delegated-staking' into ankan/03-np-del…
Ank4n 3579a88
fix import
Ank4n 84dd24f
move drop agent to stake adapter
Ank4n 99d34a2
fix compile
Ank4n afe8c87
pr feedback
Ank4n e7d65e2
add try state checks for virtual ledger
Ank4n 474c1de
fmt
Ank4n 6a019d6
Update substrate/frame/delegated-staking/src/lib.rs
kianenigma 8d481a6
Apply suggestions from code review
Ank4n 6940f88
Merge branch 'master' into ankan/01-prep-staking-for-delegation
Ank4n a884846
safe maths
Ank4n d4633c2
fix docs based on feedback
Ank4n c013cde
rename StakingUnsafe to StakingUnchecked
Ank4n b2588a5
Merge branch 'ankan/01-prep-staking-for-delegation' into ankan/02-pal…
Ank4n 22594af
Merge branch 'ankan/02-pallet-delegated-staking' into ankan/03-np-del…
Ank4n ac3cadf
use static mutate
Ank4n 8cee25c
Merge branch 'ankan/01-prep-staking-for-delegation' into ankan/02-pal…
Ank4n 0537e9c
Rename StakingUnsafe to StakingUnchecked
Ank4n fb5d64c
pr feedbacks
Ank4n bb93c8c
pr feedbacks
Ank4n cba250e
feedbacks
Ank4n 9897437
feedback
Ank4n 43d06b0
use static mutate
Ank4n abbc24d
Rename StakingUnsafe to StakingUnchecked
Ank4n b5fcc2f
pr feedbacks
Ank4n 839e294
pr feedbacks
Ank4n 53fab5b
feedbacks
Ank4n 3bb99b2
feedback
Ank4n b430f63
Merge branch 'ankan/02-pallet-delegated-staking' into ankan/03-np-del…
Ank4n 5895afb
fix tests
Ank4n 09d3359
Merge branch 'master' into ankan/01-prep-staking-for-delegation
Ank4n e75c2e6
Merge branch 'ankan/01-prep-staking-for-delegation' into ankan/02-pal…
Ank4n 383593c
Merge branch 'ankan/02-pallet-delegated-staking' into ankan/03-np-del…
Ank4n 9bcfb17
add license to inner
Ank4n 8fe83ca
adapters tested separately
Ank4n 9409c74
add migration for westend
Ank4n 5a3b8b2
add apply slash test to NP
Ank4n e31866e
inline locking
Ank4n 078cf5f
optimize stash kill
Ank4n 3790a40
Merge branch 'master' into ankan/01-prep-staking-for-delegation
Ank4n 796c848
Merge branch 'ankan/01-prep-staking-for-delegation' into ankan/02-pal…
Ank4n 666be52
Merge branch 'master' into ankan/02-pallet-delegated-staking
Ank4n ca232cd
Merge branch 'ankan/02-pallet-delegated-staking' into ankan/03-np-del…
Ank4n be76a6b
pr feedbacks
Ank4n c6070d8
check stash is killed before cleaning up agent
Ank4n 886a1a7
Merge branch 'master' into ankan/02-pallet-delegated-staking
Ank4n 7ca660d
Merge branch 'ankan/02-pallet-delegated-staking' into ankan/03-np-del…
Ank4n a69d620
Merge branch 'master' into ankan/02-pallet-delegated-staking
Ank4n b511a30
Merge branch 'ankan/02-pallet-delegated-staking' into ankan/03-np-del…
Ank4n 4b2daa2
withdraw delegation requires num slashing spans
Ank4n 0e17037
separate trait for migration
Ank4n 4e3b8cd
add a separate slash reward fraction for agent slashing
Ank4n ef10f48
Merge branch 'ankan/02-pallet-delegated-staking' into ankan/03-np-del…
Ank4n 804fa95
fix compile
Ank4n d3cf1b8
store only migration status
Ank4n a12f4c3
remove default strategy type
Ank4n b444c0e
rename claim_delegation to migrate_delegation
Ank4n a4ddc76
additional check for account destroy
Ank4n b09f8fb
less retricted trait bounds for bench balance conversion
Ank4n e848d8d
pr feedbacks
Ank4n 2a0b5c2
fix pool weight westend
Ank4n b1b1e1d
better docs pr feedback
Ank4n 1e6cdad
rename claim delegation to migrate delegation
Ank4n 3cef018
Merge branch 'master' into ankan/02-pallet-delegated-staking
Ank4n 44503ba
".git/.scripts/commands/bench/bench.sh" --subcommand=pallet --runtime…
619858d
Merge branch 'ankan/02-pallet-delegated-staking' of https://github.co…
2f65014
".git/.scripts/commands/bench/bench.sh" --subcommand=pallet --runtime…
24d05ad
fix docs
Ank4n 72b50da
Merge branch 'ankan/02-pallet-delegated-staking' into ankan/03-np-del…
Ank4n 495aa24
not allow reap stash for virtual stakers
Ank4n 732569a
fix test
Ank4n 142e3c7
full slash test
Ank4n 7dacae3
not passing yet
Ank4n bd56eb3
Merge branch 'master' into ankan/02-pallet-delegated-staking
Ank4n a988ec8
Merge branch 'ankan/02-pallet-delegated-staking' into ankan/03-np-del…
Ank4n d4ef271
Merge branch 'master' into ankan/02-pallet-delegated-staking
Ank4n fe0b657
fix migration, move free funds as well when migrating a nominator to …
Ank4n ca77189
Merge branch 'ankan/02-pallet-delegated-staking' into ankan/03-np-del…
Ank4n 0f6a3a0
fix migration errors, make it idempotent
Ank4n 36e9972
fix imports
Ank4n 6bf808a
remove slash test that will be fixed as a separate PR
Ank4n a1c5698
assert against right err
Ank4n 464cea0
Merge branch 'master' into ankan/02-pallet-delegated-staking
Ank4n 7782cab
pr feedbacks
Ank4n 6e3045f
use system events for pallet
Ank4n 0ff52fd
Merge branch 'ankan/02-pallet-delegated-staking' into ankan/03-np-del…
Ank4n 70e9b1f
fix mock config
Ank4n 159d1bf
run try state for staking
Ank4n 4b5e4fe
Merge branch 'ankan/02-pallet-delegated-staking' into ankan/03-np-del…
Ank4n 7323dd6
Merge branch 'master' into ankan/03-np-delegation-integration
Ank4n 587a2f1
restore Cargo.lock
Ank4n 978c02c
Merge branch 'master' into ankan/03-np-delegation-integration
Ank4n 31d4c6a
bump parity scale codec in delegate stake integration test
Ank4n 2d5fd2e
pr feedbacks
Ank4n c6d6f0f
fmt
Ank4n f9db499
update prdoc withh all crates changed
Ank4n d2ee1e9
Merge branch 'master' into ankan/03-np-delegation-integration
Ank4n 1634110
fix test
Ank4n 62df281
Contracts: Remove topics for internal events (#4510)
pgherveou a1a6c2e
chore: fix typos (#4515)
jimwfs ead90d1
`remote-externalities`: `rpc_child_get_keys` to use paged scraping (#…
liamaharon c7e9b9b
Remove usage of the pallet::getter macro from pallet-fast-unstake (#4…
PolkadotDom a771851
Remove the prospective-parachains subsystem from collators (#4471)
alindima bd35913
Merge branch 'master' into ankan/03-np-delegation-integration
Ank4n a2f984e
add fully unbonding and partially unbonding scenarios to pool migrati…
Ank4n 7a06567
fmt
Ank4n 9e89aa0
ensure migrate delegation is only called once
Ank4n 318d1a7
add new api to check if staker is virtual
Ank4n d0a9393
add extrinsic to migrate pool
Ank4n 20bbf18
fix compile and gate delegation related dispatchables
Ank4n a66beff
add test to ensure delegate stake dispatchables are gated
Ank4n 5eb6cfb
some more gate tests
Ank4n 7efdbf7
fix bench
Ank4n b9a7236
update migration with max pool bound
Ank4n 9bc3998
convert transferrable balance to need a PoolAccount type
Ank4n 7813afe
make field pub
Ank4n c58300d
fmt
Ank4n 452314f
wip
Ank4n 8cf6896
tests run
Ank4n 3759ba7
seems to compile everything
Ank4n f31e33a
Merge branch 'master' into ankan/np-newtype
Ank4n eb7292c
fmt
Ank4n 0e61f5a
revert bad merge changes
Ank4n 11792ce
clippy fix
Ank4n 508bc82
Merge branch 'master' into ankan/np-newtype
Ank4n 967f73f
make delegated staking apis type safe
Ank4n a9dc3ae
Merge branch 'master' into ankan/np-newtype
Ank4n 35a16cf
fix clippy errors
Ank4n 14d5f5e
add runtime apis
Ank4n 4d37e2a
Merge branch 'master' into ankan/np-newtype
Ank4n dd3cbf7
return none if agent or delegator does not exist
Ank4n 121cbdd
add runtime api to kitchensink runtime
Ank4n 9e47b75
hope everything passes now
Ank4n 31ca372
second hope ;)
Ank4n 91ed77f
only one of legacy adapter and actual assertion is true always
Ank4n 4817861
rust doc
Ank4n c7deb30
small cleanup
Ank4n db3740e
Merge branch 'master' into ankan/np-newtype
Ank4n c422b40
Merge branch 'master' into ankan/np-newtype
Ank4n b4eaa22
Merge branch 'master' into ankan/np-newtype
Ank4n 27e8081
add prdoc
Ank4n a9916f3
Merge branch 'master' into ankan/np-newtype
Ank4n d01d737
fix prdoc
Ank4n 85242bc
Update substrate/frame/nomination-pools/src/lib.rs
Ank4n 256098e
Update prdoc/pr_4537.prdoc
Ank4n 6f4e49b
use T for type param
Ank4n c265024
update prdoc
Ank4n 005f522
rename Agent to AgentLedgerOuter
Ank4n f437436
drop Account from Agent/Delegator
Ank4n 5eb311a
drop account from pool/member newtype
Ank4n 9c3a4ac
fmt
Ank4n c5bd9e7
make inner type private
Ank4n 92a17ac
minor
Ank4n 9c5712c
Merge branch 'master' into ankan/np-newtype
Ank4n f714587
Merge branch 'master' into ankan/np-newtype
Ank4n File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Schema: Polkadot SDK PRDoc Schema (prdoc) v1.0.0 | ||
# See doc at https://raw.githubusercontent.com/paritytech/polkadot-sdk/master/prdoc/schema_user.json | ||
|
||
title: Runtime apis to help with delegate-stake based Nomination Pools. | ||
|
||
doc: | ||
- audience: Runtime User | ||
description: | | ||
Introduces a new set of runtime apis to facilitate dapps and wallets to integrate with delegate-stake | ||
functionalities of Nomination Pools. These apis support pool and member migration, as well as lazy application of | ||
pending slashes of the pool members. | ||
|
||
crates: | ||
- name: pallet-nomination-pools | ||
bump: minor | ||
- name: westend-runtime | ||
bump: minor | ||
- name: kitchensink-runtime | ||
bump: minor | ||
- name: pallet-delegated-staking | ||
bump: minor | ||
- name: sp-staking | ||
bump: minor | ||
- name: pallet-nomination-pools-benchmarking | ||
bump: patch | ||
- name: pallet-nomination-pools-runtime-api | ||
bump: minor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a great refactor, the base
nomination-pools
pallet also has similar foot guns, maybe a goodmentor
issue if you describe it in one.