---
title: Catch up notes
tags: staking, polkadot, frame
---
## 24/07/2023
- [ ] [`staking-ledger` refactoring PR](https://github.com/paritytech/substrate/pull/14582)
- goals: encapsulate mutations (and reads) of `Ledger`, `Bonded` and locks within `StakingLedger`
- Soon, with `stake-tracker`: events `OnStakingUpdate::on_stake_update`, etch are called within the `StakingLedger` methods (similar to when locks are set)
- no breaking changes/ no API changes/ no storage changes/migrations required
- `StakingLedger::get(&who)`, `ledger.update()`, `ledger.kill()`
- `get(&who)`, who can be a controller or stash, difference abstracted into `ledger`
- idea: prevent (or raise warning) at compile time certain storage items from being accessed
- eg annotate storage item as `#[pallet::storage(allow_access(StakingLedger))]`
- it's statically possible to check where the storage is being accessed => macro visitor pattern should work here.
- Opened issue for discussion here https://github.com/paritytech/substrate/issues/14623
- [ ] [`pallet-stake-tracker` PR](https://github.com/paritytech/substrate/pull/14620) (*ongoing*)
- should this pallet process events in a multiblock fashion? this would allow the voter and target lists to remain up to date automatically at `on_slash` and rewards.
- FIFO queued events would be processed `on_idle` by the stake tracker
- this can be a 2nd iteration of the pallet, after merging it
- [ ] [EPM storage bonds PR](https://github.com/paritytech/substrate/pull/14543)
- design decision: traits that return items that are supposed to be stored, should be returned bonded
- in this case, to bond the `Snapshot`, the return vec of `ElectionDataProvider::electable_targes/electing_voters` is now bonded by `MaxElectableTargets/MaxElectingVoters`.
- [ ] had a call with George from SP team to help with the collator selection work; will keep helping him.
## 5/06/2023 & 12/06/2023
**For this week**:
- [ ] Polish and practice Decoded talk + work on final steps (reviews, plots, etc) to publish long-format article;
- [ ] Wrap up
- [ ] variable deposit calculation PR
- [ ] minimum untrusted score PR
- [ ] address active ledger balance below issue/PRs
- [ ] reviving emergency phase throttling
- [ ] PR: introduce `MinBond` for all stakers and enforce active ledger balance to be either > `MinBond` or 0 (related to [issue#14246](https://github.com/paritytech/substrate/issues/14246))
- [ ] work with Raul to update staking-related configs and params
- [ ] FRAME reviews
### 1. Decoded Talk
- ~~I'm sharing today with~~ shared with Parity folks a [pre-recorded dry-run](https://drive.google.com/file/d/1Sx4LuH01i4nbiObSE-iHa0lVDG-xykBz/view) of the talk to get feedback.
- 25min without practicing
- will cut and refine based on the feedback
- The [long form post](https://hackmd.io/4vOW-dN4ToeMH-R2Y1KPuw?view) is done and ready for feedback/edits.
- Asked in Marcooms - where to publish it? help reviewing english + help with plots.
### 2. [Clear process to update `MinimumUntrustedScore`](https://github.com/paritytech/substrate/issues/11965)
- Got the go ahead from the research team to proceed with the on-chain update of the untrusted minimum score (btw, I think adding Fateme to the loop really helps with the team<>research comms).
- [PR ready for a first review](https://github.com/paritytech/substrate/pull/14328)
### 3. other PRs/issues
- [Implements a variable deposit base calculation for EPM signed submissions](https://github.com/paritytech/substrate/pull/13983)
- Will work today on parameterizing `GeometricDepositBase` instead of using the signed deposit base and increment factos as associated types.
- The feedback makes sense and I think I could use the same pattern in the [Clear process to update `MinimumUntrustedScore`](https://github.com/paritytech/substrate/issues/11965) PR too -- will revisit.
- [[NPoS] Implements dynamic number of nominators](https://github.com/paritytech/substrate/pull/12970)
- Added a few improvements to the PR and docs
- still waiting for audit
- [Revisit constants and config storage params of pallets related to staking](https://github.com/paritytech/substrate/issues/14321)
- Waiting for a few more thumbs ups on the new values and then will start preparing the gvt calls for Westend, Kusama and Polkadot and reach out to Raul to let him know of the upcoming changes.
- [Improves the EPM/Staking e2e test setup](https://github.com/paritytech/substrate/pull/14292)
- New PR ith improvements on the e2e tests for staking:
- more realistic block progression with OCW
- Refactors the mock config trait implementation to use the Default through `derive_impl`
- adds try-state checks
- Extrinsic deprecation in metadata
- Decided to not push too much for releasing this feature in V15 since there is no consensus yet on this feature and the V15 release is coming fast.
- I think we still should work on this to include in the next release with breaking changes.
- [Do not include voters that have zero voter weight in the election snapshot](https://github.com/paritytech/substrate/pull/14245)
- (more info last week's catch up notes)
- [Active ledger balance may fall below ED if account chills before unbounding](https://github.com/paritytech/substrate/issues/14246) (issue)
- (more info in last week's catch up notes)
### 4. others
- Trying to help with FRAME PR reviews
---
## 29/05/2023
### 1. Decoded Talk
- [Slides v1](https://docs.google.com/presentation/d/1w3vDlT3jYHai-q_kdvaIjEO2Q6GMzUe1/edit#slide=id.p1)
- Ready for dry-runs -- I'm talking with some folks from PBA & others outside the Staking team to do a dry-run next week to get feedback from people outside the staking bubble
- Finishing the [long form post](https://hackmd.io/4vOW-dN4ToeMH-R2Y1KPuw?view) tomorrow. Do you have any suggestion on who could review it? I think that it would be cool to release it before the talk.
### 3. PRs/issues
- [Do not include voters that have zero voter weight in the election snapshot](https://github.com/paritytech/substrate/pull/14245)
- Benchmarking issues resolved. There was a sync issue on how `add_targets` was implemented in EPM mock and in the bin/node runtime implementation. More info about this in the issue.
- (new PR needs another review/stamp since the previous PR got the history messed up due to local master merges -- it's unclear to me why this happens btw, but it did a couple times already)
- [Active ledger balance may fall below ED if account chills before unbounding](https://github.com/paritytech/substrate/issues/14246) (issue)
- Opened issue about `ledger.active` balance falling below ED (or = 0)
- Added e2e test reproducing the (non-slashing) case where this happens https://github.com/paritytech/substrate/pull/14247
- The way I read it, it seems that this is an expected behaviour. We probably should implement a `withdraw_unbounded_other` extrinsic (more on this in the issue).
- In any case, it seems that https://github.com/paritytech/substrate/pull/14186 should be merged
- Extrinsic deprecation in metadata
- Discussing with Alexandru Vasile about this, will share more details in https://github.com/paritytech/substrate/issues/13976 and keep pushing this fwd
- update: https://github.com/paritytech/substrate/issues/13976#issuecomment-1568538473 and in [Polkadot Forum](https://forum.polkadot.network/t/stablising-v15-metadata/2819/9)
## 22/05/2023
### 1. Decoded Talk
- [Slides v0.1](https://docs.google.com/presentation/d/1w3vDlT3jYHai-q_kdvaIjEO2Q6GMzUe1/edit#slide=id.p1)
- Almost ready for Decoded; needs cutting and update plots (last thing)
- Based on [election protocols and data](https://hackmd.io/4vOW-dN4ToeMH-R2Y1KPuw?both#Other-Nominator-based-PoS-Networks) from other NPoS blockchains, I changed the way the stake was distributed on DPoS
- Uses Pareto distribution (80% stake is allocated to 20% of validators)
- Numbers seem more realistic (gap between NPoS and DPoS lower)
- Let's go through the slides during the Staking meeting
- WDYT about doing a couple dry-runs with non-staking people once the slides are stable-ish?
- Publish the text version before Decoded?
### 2. PRs
- [Implements a variable deposit base calculation for EPM signed submissions](https://github.com/paritytech/substrate/pull/13983)
- Refactored the PR so that instead of introducing a new trait that calculates the base deposit, the type implements a `Convert<A, B>`
- [Deprecates the `chill_other` extrinsic in staking #14187](https://github.com/paritytech/substrate/pull/14187)
- [Do not include voters that have zero voter weight in the election snapshot](https://github.com/paritytech/substrate/pull/13946)
- having issues with the benchmarks (non reproducible on my machine), will wrap it up this week
- [Emergency solution cmd for staking-miner-v2](https://github.com/paritytech/staking-miner-v2/pull/557)
- Ready to go
- [`num_slashing_spans`](https://github.com/paritytech/substrate/pull/14185) docs -- thanks for the review, will update accordingly.
### 3. PRs others
- [Attackers may force off-chain worker into creating extremely bad solution via trimming](https://github.com/paritytech/srlabs_findings/issues/82) (support Niklas)
- [Multiple feasibility checks in one block at end of signed phase may lead to overweight blocks](https://github.com/paritytech/srlabs_findings/issues/273)
- Distribute feasibiity checks across multiple blocks
- Or better just doing implemeting the multi-block feasibility test?
- Or just close this issue?
- In audit process:
- [Implements dynamic number of nominators](https://github.com/paritytech/substrate/pull/12970)
- [EPM: Adds emergency phase throttling](https://github.com/paritytech/substrate/pull/13040)
### 5. Others
- Restart [Clear process to update MinimumUntrustedScore](https://github.com/paritytech/substrate/issues/11965) -- still waiting for feedback from W3F folks
- [Staking updates Q2](https://docs.google.com/document/d/1zgQZ4TGEd5frZSGjvF_mNV3s5qGXEDJji1TCcDzwwG8/edit#heading=h.p8rpqau5akd)
## 15/05/2023
### 1. Decoded Talk
- Slide deck layout https://hackmd.io/@gpestana/H1MWqEyr2#
- Draft of main talking points/talk flow
- Revisit this with Ankan this week, I can quickly go through the slide deck and results next week in the staking meeting for initial feedback (10-15min)
- one more pass on https://hackmd.io/4vOW-dN4ToeMH-R2Y1KPuw (almost ready)
- New plots:
- ~1 y worth of Polkadot data
- `DesiredTargets` fixed for DPoS elections
- Results changed considerably from last week (difference: correct `MaxWinners`)
Interesting results:
- NPoS performs better than DPoS across all metrics (regardless of bounds)
- see https://hackmd.io/4vOW-dN4ToeMH-R2Y1KPuw?view#Minimal-stake
- Bounded pragmen vs unbounded phragmen performance is very similar
- unbounded phragmen is still better, but not crazy better
- number of `DesiredTargets` (winners) is 297, the same for both
- ➡️ hypothesis: unbounded phragmen will perform better in comparison if the `DesiredTargets` (winners) increases (TODO: check this)
- Even when assigning all stake to all candidates (i.e. total stake per nominator is used to back ALL the voted candidates), NPoS performs better in terms of `total_stake` (but worse better in terms of `minimal_stake`). Plots for this case:


## 08/05/2023
### 1. Decoded Talk
- https://hackmd.io/4vOW-dN4ToeMH-R2Y1KPuw
- Fixed text based on previous feedback + added more content
- Added NPoS vs DPoS bounded vs DPoS unbounded plots
- data sampling: 10 eras, each spaced over 5 eras
- I may add more, but the trends are clear to pass the points
- This week:
- Wrap up draft text v1
- Add unbounded NPoS data to the plots and remove phragmen-mms
- Add plot on active vs idle stake per era
- Add plot on validator churn (and nominator churn too?)
- Start data gathering from #15300000 backwards, to remove the drop in stake in the network
https://github.com/gpestana/substrate-etl
- Tool to extract and save externalities snaphots + perform operations in the runtime
- e.g. `min_active_stake` and `elections-analysis` (for the Decoded talk)
### 2. PRs for review
- [Implements a variable deposit base calculation for EPM signed submissions](https://github.com/paritytech/substrate/pull/13983)
- [Adds integration test for slashed/chilled validator with subsequent validation intention](https://github.com/paritytech/substrate/pull/13717)
- [Do not include voters that have zero voter weight in the election snapshot #13946](https://github.com/paritytech/substrate/pull/13946)
---
## 01/05/2023
### 1. Decoded Talk
- comments and feedback [here](https://readwise.io/reader/shared/01gyskfcq3xr1hqc9nqcbvnjna/)
- feedback on https://hackmd.io/4vOW-dN4ToeMH-R2Y1KPuw
- The main correction seems to be that NPoS *also* tries to maximize the stake backing validators. The difference is that it achieves it in a multi-approval nomination context, which is an NP optimization problem
- Is it fair to say that, on top of maximizing stake, it also optimizes for representativity and, due to the nature of multi-nominations, increases freedom of choice?
- We can also claim that NPoS also optimizes for capital efficiency, since nominators that have backed N validators will be exposed fully exposed if at least one validator is selected.
- Put in another way, there is a NP-hard optimization problem because of 1) the nominator freedom (multiple "cast votes" per voter), 2) capital efficiency maximization & 3) economic security maximization.
- CLI with 2 main cmds:
- **extract**: creates externalities for a set of given blocks and stores them to disk as an externalities snapshot.
- **transform**: loads a snapshot from disk, builds the externalities and do stuff
For the decoded data analyisis, *transform* extracts:
- phragmen election score
- phrag-mms election score
- dpos election score
- dpos unbounded election score
- min_active_stake
- snapshot size (voters, targets, encoded_len)
and stores it in a CSV for later processing.
- this week:
- build and store ext snapshots with election snapshot for each era in Polkadot.
- populate CSV
- plots + data analysis
- eventually clean up the code and perhaps start a new CLI outside of the staking-miner for this type of data analysis
btw, it would be great to build externalities snapshots directly from a node snapshot. I think this is what you mentioned in [try-runtime: Lazy Download #13562](https://github.com/paritytech/substrate/issues/13562), right?
Also, it would be nice to use the approvals voting npossolver implemented in https://github.com/paritytech/substrate/pull/13453 (let's try to merge it this week?)
Note: fetching keys with remote externalities through RPC with `const DEFAULT_PARALLELISM > 2` often results in an async error where threads are dropped and the runtime hangs. Will look into it later (`DEFAULT_PARALLELISM = 2`) seems to work though.
```
2023-04-27T12:59:28.350221Z INFO remote-ext: inserting keys progress = 5% [1 / 20]
thread '<unnamed>' panicked at 'dispatch dropped without returning error', /Users/parity_gpestana/.cargo/registry/src/github.com-1ecc6299db9ec823/hyper-0.14.20/src/client/conn.rs:329:35
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
```
### 2. Merge [Abstracts elections-phragmen pallet to use NposSolver](https://github.com/paritytech/substrate/pull/13453)
- Companion needs another pass (confirm that no changes have been made to election bounds in mocks introduced previously)
- Keep an eye on needing to roll-back the substrate PR again (but verified that at least the previously failed benchmarks will pass)
- plan?
### 3. PR: Variable deposit base for EPM signed submissions
- ready for review https://github.com/paritytech/substrate/pull/13983
- `BaseDeposit` associated type which implements the trait `trait DepositBase` that calculates the base deposit given a queue lenght (or any other runtime state, the current implementation is generic over T).
- There is an implementation of the trait that returns `deposit_base = fixed_deposit_base * (1 + increase_factor)^n`, where `n` is the term of the progression (i.e. the number of signed submissions in the queue).
### 4. PRs for review
- [Implements a variable deposit base calculation for EPM signed submissions](https://github.com/paritytech/substrate/pull/13983)
- [Adds integration test for slashed/chilled validator with subsequent validation intention](https://github.com/paritytech/substrate/pull/13717)
- [Do not include voters that have zero voter weight in the election snapshot #13946](https://github.com/paritytech/substrate/pull/13946)
### 5. Others
- [Staking Update: Q2 2023](https://docs.google.com/document/d/1zgQZ4TGEd5frZSGjvF_mNV3s5qGXEDJji1TCcDzwwG8/edit#heading=h.hsbchskwp6oe)
- 👀 Opened an issue on [Research and build testing infra with realistic scenarios for elections](https://github.com/paritytech/substrate/issues/14050) that we briefly discussed last week, may take a stab at writing some ideas down when I have some time.
- 👀 [Staking runtime API unified](https://github.com/paritytech/substrate/issues/13389)
- e.g inflation runtime API,
- specs, next steps
- 👀 I'm starting to [put together](https://hackmd.io/wosSdMVpTJa5e_vkVjtqEQ?view) ideas for improving the current FRAME testing framework
- ❓ whom to talk with to ask for a speaker from Parity for a crypto conference in Liech?
---
## 24/04/2023
### 1. Decoded Talk
- current draft https://hackmd.io/4vOW-dN4ToeMH-R2Y1KPuw
- in post format, will distill into slides once the main ideas are locked
- this week: focus on the section `NPoS compared` and fetch data
- historical `election_score` with NPoS vs DPoS
### 2. `MinimumActiveStake` is 0 in Kusama
- what to do with "zombie" ledger accounts?
- `ledger.active = 0` && `ledger.total > ED`
- thus not possible to `reap_stash`
- why? unbound was called before `MinNominatorBond` was set/enforced; withdraw was never called
- https://github.com/paritytech/substrate/pull/13946
### 3. `points_to_balance` / `balance_to_points` accuracy
- https://hackmd.io/OHDPAxEHQq6O6EP_9zzCag
- `div_ceil(A, B) = (A + B - 1) / B`
- checking for side-effects in current pools of pushing ceil_div after the fact
### 4. `trait DepositBase` for EPM
- draft PR https://github.com/paritytech/substrate/pull/13983
- more tests, implement type that increases deposit base by X% for each submission in the queue to be used in the runtime
### 5. Others
- FRAME related work
- [Automatic checking `try_state` hooks in tests #13463](https://github.com/paritytech/substrate/issues/13463)
- 👀 [Vision: `#[pallet::constant(non_volatile)]` #12583](https://github.com/paritytech/substrate/issues/12583)
- `min_untrusted_score` updated in Kusama through gvt https://kusama.polkassembly.io/referenda/151
- **Audit harvesting**
- [Dynamic number of nominators](https://github.com/paritytech/substrate/pull/12970)
- [Emergency throttling](https://github.com/paritytech/substrate/pull/13040)
- **Review harvesting**
- All these PRs are relatively safe and don't need your review, so no worries. I will keep pinging people in the team.
- [Adds integration test for slashed/chilled validator with subsequent validation intention #13717](https://github.com/paritytech/substrate/pull/13717)
- [Do not include voters that have zero voter weight in the election snapshot #13946](https://github.com/paritytech/substrate/pull/13717)
- [Implements try_state hook in elections and EPM pallets #13979](https://github.com/paritytech/substrate/pull/13979)
### meeting notes:
- Would a simple election algorithm been better? (in terms of what?)
- would an approval based system be better than phragmen if we consider ALL the voters/validators?
- potentially, we will may acknowldge that the boundaries used to make phragmen
- unbounded dpos VS current NPoS
- (easy to do dpos once the target list is implementd)
- How does slashing and rewards work with unbounded approval stake? could this be the reason why the main disadvantage of unbounded dpos?
- Add to hackmd that nominators are actually leveraging the NPoS and nominating innactive validators
- One benefit to have this algorithm.
- We should see more churn (innactive validators)
- 'Some' winning validator set churn is good. It's good for innactive validators to get in and be rewarded. NPoS do that.
- Potentially take over a Monday to shaer findings other blockchains.
- ⭐ Time to build on the testing infra needed to perform the election process in a dev chain in a realistic scenario.
- Simulate the snapshot creation, off-chain workers, etc..
- do memory profiling in WASM, etc
- have an integration test/check using this infrastructure in WASM (this is the crucial and hard part)
- Options:
- try-runtime CLI - 1) populate fake stake and 2) call what we want
- Check multidimentional-weight struct and how they implement gte, etc..
- ⭐ start the staking update now -- collaboratively.
- Tests should only traverse consistent paths.
- parameter type variable that skips the `try_state` for each test that is inconsistent.
- ⭐ old staking tests are beyond saving -- refactor some of the tests.
---
## 17/04/2023
### 1. `MinimumActiveStake` is 0 in Kusama
- More info @ https://hackmd.io/NCe-ZVJ2TOC6Tt78bU15BQ
- issue: https://github.com/paritytech/substrate/issues/13938
- PR (wip): https://github.com/paritytech/substrate/pull/13946
It's been reported that `MinimumActiveStake` is 0 in Kusama. There are a few reasons why this may happen: 1) the selected voters from `fn ElectionDataProvider::electing_voters` has len 0 (very unlikely to be the case), 2) call to `fn slashable_balance_of` (to calculate the voter weight) cannot decode the staking ledger entries due to failed migrations (changes in bounded vec bounds) and 3) voters linger in the staking ledger with active balance = 0 (or below minimum nominator bond) and there are not enough voters to fill in the snapshot.
In any case, the `MinimumActiveStake` should never be below `MinNominatorBond` and voters with voter_weight=0 due to decoding issues or lingering voters in the `VoterList`/`StakingLedger` should probably be dropped from the snapshot. PR to fix that https://github.com/paritytech/substrate/pull/13946.
- Was, at some point, `MinNominatorBond = 0` in Kusama? that would explain why there are some `ledger.active = 0` balances in the voter list and being added as part of the snapshot (note: with those stashes have unlocking chunks pending and we can't chill_other in kusama since upper bond of `MaxNominators` is not met and `ChillingThreshold` is not set)
### 2. `points_to_balance` / `balance_to_points` accuracy
- More info @ https://hackmd.io/OHDPAxEHQq6O6EP_9zzCag
Reproduced the error in tests but haven't figured out a clean way to avoid and perform `div_ceil` on type `U256`. Working on it (more info in hackmd above).
### 3. (SRLabs) staking-miner trimming issue
Started worked on the pre-election trimming but talked with Nikas yesterday in the staking-miner catch up and he will pick up this task.
### 4. Dynamic number of nominators
- More info @ https://hackmd.io/C71YHsgVRZKwsAZS6-Zk-w
Implemented the `size_hint` version of the static tracker and addressed most of the PR comments. The `size_hint` approach works as expected and is more accurate (it represents more accurately the size of the snapshot in the storage vs using `std::mem::size_of`).
### 5. Decoded talk
- Sharing the manuscript draft this week for feedback
---
## 11/04/2023
### 1. `MinimumUnstrustedScore` work
- https://github.com/paritytech/substrate/issues/11965
- https://kusama.polkassembly.io/referenda/151
- https://hackmd.io/IwJiYgMwRKer0e7khbLhUQ
#### Calculate next `MinimumUnstrustedScore`
- *thoughts on current way to calculate the election score avg with polkadot-scripts*: getting the election scored from the `submit`/`submit_unsigned` extrinsics may bias the final result if there are bad staking submissions or low submissions that have not been accepted (it doesn't seem to be happening at the time as we have only 1 staking miner in Kusama). However, it's not very ergonomic to fetch the election score from the events (namely `ElectionFinalize`) . In the near future, hopefully, we'll have the on-chain election score avg to set the minimum untrusted score (although having a robust polkadot-script for this may come in handy in emergency situations and we really don't want to mess up in those situations..).
- [ ] To finish this week
### 2. SRLabs: [Attackers may force off-chain worker into creating extremely bad solution via trimming](https://github.com/paritytech/srlabs_findings/issues/82)
- I'd like to answer this thread this week (close it / propose follow-up).
- Trimming may be harmful for score because the trimming happens after the phragmen has been calculated (attackers may leverage this).
- This attack is open for 24 nominations/nominator (Kusama), not so much for 16 nominators/nominator
- Possible solution:
- *If solution has been trimmed, submit and retry*
- 1. trim nominators (figure out a strategy -- least stake? other?)
- 2. re-try phragmen
- 3. re-submit if score is better
- 4. repeat 1-4 for a few steps until
- Do you have any thoughts on this? I will talk to Ankan about this mid week and asked Niklas his opinion.
- How does the reduction help with this? How much does it help?
- If not, why do we perform trimming?
- Figuring out: can we quantify the gains in reducing?
- How does reducing help this?
### 3. PR reviews
I'd like to merge these asap or at least get enough reviews to proceed with the audits. I get the impression the audits are not being prio over others due to the fact that the PRs don't have stamps.
- [Dynamic nominators](https://github.com/paritytech/substrate/pull/12970)
- [EPM emergency throttling](https://github.com/paritytech/substrate/pull/13040)
- [Elections/Solver refactoring v2](https://github.com/paritytech/substrate/pull/13453)
- Double checked locally that the previous failure in the CI does not happen again
- There is an issue to improve the EPM benchmarks https://github.com/paritytech/substrate/issues/12652, will look into it.
### 4. Others
- [Added `try_state` hook to elections pallet and EPM](https://github.com/paritytech/substrate/pull/13718)
- not as elegant as it could be to call the `try_state` hook at the end of the tests
- even more bloated if adding all the pallet's
- looking into atm: [Automatic checking try_state hooks in tests](https://github.com/paritytech/substrate/issues/13463)
- ⭐ each pallet could implement a builder that is pulled into the `ExtBuilder` implementation from Substrate.
- ⭐ imagine that each pallet has a default pallet builder
- builder pallet for the runtime (can be generated)
- `construct_runtime_with_ext!` macro that includes a standarized `ExtBuilder`.
- https://github.com/paritytech/substrate/issues/12331
### 5. Decoded Talk
- Share draft of the manuscript this week
- Possible to compare NPoS with other chains without mentioning economic security.
- How do other non-NPoS PoS protocols fare wrt to
- [ ] fair representation,
- [ ] nominator freedom
- [ ] economic efficiency
- These are metrics we deem important, but its importance is somewhat relative.
- ⭐ TLDR from Kian:
- Economic security is not very good BUT
- we can show how NPoS is actually improving the current state of things (compared to if we would not have it, basically).
- https://github.com/paritytech/polkadot/blob/master/utils/staking-miner/src/main.rs#L390
- PoS solver without the NPoS
- ⭐ add this code in the `--dry-run` (and improve it)
- ⭐ see this talk: https://www.youtube.com/watch?v=OZpQ2FouDOU
- NPoS is always better than not using NPoS
- We def should look at the piece of code and try to fit the argument that NPoS is better.
- watch https://www.youtube.com/watch?v=OZpQ2FouDOU
### 6. Nomination pool - inspect potential inaccuracy of `points_to_balance` runtime API
- [ ] https://hackmd.io/OHDPAxEHQq6O6EP_9zzCag?edit
### 7. Others
- Staking Update done
- Tuesday morning community time