-
Notifications
You must be signed in to change notification settings - Fork 1.2k
[NPoS] Fix for Reward Deficit in the pool #1255
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
Merged
Merged
Changes from all commits
Commits
Show all changes
116 commits
Select commit
Hold shift + click to select a range
7429f0b
make total reward payout counter never decrease
Ank4n fc135d7
improve comments
Ank4n a580bc1
new call to top up the pool
Ank4n aace388
format
Ank4n 66b593d
topped up funds are not rewardeable to delegators
Ank4n 56cafc4
test for top up function
Ank4n 767cc3a
check user has enough balance and limit max transfer to their free ba…
Ank4n 626f544
Merge branch 'master' into ankan/fix-np-reward-deficit
Ank4n c4c7e96
contracts: Update to wasmi 0.31 (#1350)
athei a1a6d3e
substrate: chain-spec paths corrected in zombienet tests (#1362)
michalkucharczyk bda10a8
Ensure cumulus/bridges is ignored by formatter and run it (#1369)
gavofyork 60895d0
feat: add futures api to `TransactionPool` (#1348)
yjhmelody 86f0cc1
Bump proc-macro-warning from 0.4.1 to 0.4.2 (#1376)
dependabot[bot] 0423b0d
Bump the known_good_semver group with 1 update (#1375)
dependabot[bot] 2b89df6
Update `fmt` file and some authors (#1379)
ggwpez d3ba197
Markdown linter (#1309)
chevdor b14a908
[xcm-emulator] Redo Parachain init (#1356)
NachoPal 5d37b81
add Treasurer to SchedulerOrigin (#1325)
xlc 3d4089c
Cleanup repo (a tiny bit) (#1382)
ggwpez 79edd91
approval-voting: use proper hash when querying session info (#1387)
ordian daf6141
[ci] Remove runtime-benchmarks from tests (#1335)
alvicsam c08d14d
Extract block announce validation from `ChainSync` (#1170)
dmitry-markin 8e484a8
Contracts: Update read_sandbox (#1390)
pgherveou b5433ff
rust docs: add simple analytics (#1377)
liamaharon b1a3223
Move Relay-Specific Shared Code to One Place (#1193)
joepetrowski 5bec497
Bump thiserror from 1.0.47 to 1.0.48 (#1396)
dependabot[bot] 25f30b8
Bump actions/checkout from 3 to 4 (#1398)
dependabot[bot] d5565d3
Get rid of polling in `WarpSync` (#1265)
dmitry-markin 23926b7
Remove redundant calls to `borrow()` (#1393)
mrcnski c292021
Remove dynamic dispatch using `Ext` (#1399)
athei d129363
Enforce a decoding limit in MultiAssets (#1395)
franciscoaguirre 3e4576f
fmt fixes (#1413)
chevdor 37161ee
Add PRdoc check (#1408)
chevdor a27e24e
RFC 14: Improve locking mechanism for parachains (#1290)
xlc 425a72d
Bump enumn from 0.1.11 to 0.1.12 (#1412)
dependabot[bot] 7520e04
Fix the wasm runtime substitute caching bug (#1416)
a317ef9
Fix PRdoc check (#1419)
chevdor c725bbe
Remove deprecated `pallet_balances`'s `set_balance_deprecated` and `t…
juangirini 5e56b1a
pallet asset-conversion additional quote tests (#1371)
gilescope 1be427e
GHW for building and publishing docker images (#1391)
EgorPopelyaev 2f31a4c
Fix nothing scheduled on session boundary (#1403)
eskimor 43d7a8c
Prevent a fail prdoc check to block (#1433)
chevdor 433bc9d
zombienet: use another collator image for the slashing test (#1386)
ordian c6f1b9f
Adds base benchmark for do_tick in broker pallet (#1235)
gupnik 7f2ae6e
Forgotten `polkadot-core-primitives/std` (#1440)
bkontur 024210b
remove unused `keystore_uri` (#1421)
yjhmelody 3ff561f
[ci] Enable flacky collector for tests (#1439)
alvicsam 329df04
polkadot: pin one block per session (#1220)
ordian 5fb02e7
[ci] Return publish-rustdoc (#1402)
alvicsam 301c438
[ci] change image for prdoc gha (#1452)
alvicsam cbc1d0d
Update Chrono to 0.4.30 (#1451)
chevdor 1089fe8
Bump actions/cache from 3.3.1 to 3.3.2 (#1456)
dependabot[bot] 15898c3
Bump hex-literal from 0.3.4 to 0.4.1 (#1438)
dependabot[bot] eae53d5
Update ed25519-dalek to v2 (#1446)
chevdor f5d911a
Switch prdoc to the latest image (#1460)
chevdor 675e7da
does not compile as balance is not serializable and used in genesis c…
Ank4n f3e8a4f
remove balance dependency in genesis config altogether
Ank4n 8a3891e
compiles
Ank4n 5848428
allow 1 holds
Ank4n 84b6246
freezing currency is more appropriate here
Ank4n 4d34b59
all tests pass
Ank4n c5fc61d
use Currency trait to read free balance
Ank4n 22fd5de
verify ed is frozen
Ank4n b535954
format
Ank4n 4a3387b
impl for adjusting ED
Ank4n 36a87a4
use Runtime Freeze Reason
Ank4n de12c8f
add tests for adjusting ED
Ank4n 138ecb2
fmt
Ank4n 6a3bfc3
Merge branch 'master' into ankan/fix-np-reward-deficit
Ank4n a1c4970
added by mistake while merging, reverting
Ank4n 29465b1
basic migration
Ank4n 05592c7
migrations
Ank4n b147cfe
add weights to new call
Ank4n 8bfef28
use fungible traits in np bench
Ank4n e705898
bench for new instruction
Ank4n b0202e2
allow fn with runtime benchmarks
Ank4n 05f4bd8
Merge branch 'master' into ankan/fix-np-reward-deficit
Ank4n b0c00fe
Merge branch 'master' into ankan/fix-np-reward-deficit
Ank4n d432fba
pending rewards for pools
Ank4n d960582
add missing features
Ank4n d3d8ef4
add a note about using Currency::balance()
Ank4n bb00d8d
rename misspelling in the function
Ank4n d4cd942
fix staking np integration test
Ank4n 51a44c7
fix unused warning
Ank4n 9b1042e
fix kitchensink runtime
Ank4n d54f029
use default config for node cli np chain spec
Ank4n 14d4530
fmt
Ank4n ca17f83
remove unused imports
Ank4n 88c8959
fix feature scopes
Ank4n 3af90e9
minor
Ank4n 4303bb5
make balances serde for genesis config
Ank4n 809236e
add migration for pools to all runtimes
Ank4n e538a0f
Merge branch 'master' into ankan/fix-np-reward-deficit
Ank4n ba9e53c
use balance everywhere in benchmark
Ank4n caac4e1
allow freezes in the kitchensink runtime
Ank4n d939a82
Merge branch 'master' into ankan/fix-np-reward-deficit
Ank4n c138e17
add docs and minor refactor
Ank4n 34541b2
comment
Ank4n 5628881
Merge branch 'master' of https://github.com/paritytech/polkadot-sdk i…
d20138a
".git/.scripts/commands/bench/bench.sh" --subcommand=pallet --runtime…
7de37d3
PR comments
Ank4n 7969fdf
defensive assert while dissolving pool
Ank4n 1e993eb
make unversioned migration private
Ank4n a15af2b
fix migrations in runtime
Ank4n 58612c3
migration fix and name the new call better
Ank4n 04f89b7
rename freeze unfreeze functions
Ank4n be4a86c
fmt
Ank4n f1425c3
Merge branch 'master' into ankan/fix-np-reward-deficit
Ank4n dd1ad02
Merge branch 'master' into ankan/fix-np-reward-deficit
Ank4n 0395a4c
".git/.scripts/commands/bench/bench.sh" --subcommand=runtime --runtim…
7b40492
Merge branch 'master' into ankan/fix-np-reward-deficit
Ank4n 9eee4f6
add pr doc
Ank4n 7ea6b34
make adjust ed permissionless
Ank4n 6bb9425
Merge branch 'master' into ankan/fix-np-reward-deficit
Ank4n 8d4361a
Merge branch 'master' into ankan/fix-np-reward-deficit
Ank4n 5f072c5
Merge branch 'master' into ankan/fix-np-reward-deficit
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 hidden or 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
842 changes: 431 additions & 411 deletions
842
polkadot/runtime/westend/src/weights/pallet_nomination_pools.rs
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or 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,22 @@ | ||
| # Schema: Parity PR Documentation Schema (prdoc) | ||
| # See doc at https://github.com/paritytech/prdoc | ||
|
|
||
| title: Fix for Reward Deficit in the pool | ||
|
|
||
| doc: | ||
| - audience: Core Dev | ||
| description: Instead of fragile calculation of current balance by looking at free balance - ED, Nomination Pool now freezes ED in the pool reward account to restrict an account from going below minimum balance. This also has a nice side effect that if ED changes, we know how much is the imbalance in ED frozen in the pool and the current required ED. A pool operator can diligently top up the pool with the deficit in ED or vice versa, withdraw the excess they transferred to the pool. | ||
| notes: | ||
| - Introduces new call `adjust_pool_deposit` that allows to top up the deficit or withdraw the excess deposit for the pool. | ||
| - Switch to using Fungible trait from Currency trait. | ||
|
|
||
| migrations: | ||
| db: [] | ||
|
|
||
| runtime: | ||
| - { pallet: "pallet-nomination-pools", description: "One time migration of freezing ED from each of the existing pools."} | ||
|
|
||
| crates: | ||
| - name: pallet-nomination-pools | ||
|
|
||
| host_functions: [] |
This file contains hidden or 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 hidden or 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 hidden or 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.
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.
Uh oh!
There was an error while loading. Please reload this page.