This repository has been archived by the owner on Apr 8, 2022. It is now read-only.
session
implementation and genesis staking
#132
Draft
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.
A copy of Substrate's
pallet-staking
toremove pallet-balances
dependency.For this iteration, here are the following things I focused on:
nominators
session
related traits to increase the session number and the era numberA couple of things I made that has to be addressed:
pallet-staking
uses thetotal_issuance
to do elections and votings. Talking to Anton about it, we didn't really know where to start. So for now, I use the overall stake by all stash accounts and use that as basis.lock_for_staking
, it is better to call thespend()
function of Utxo. But given the problem of signing transactions inside the pallet, I took a shortcut and just inserted directly to the the storage ofUtxoStore
andLockedUtxos
.lock_for_staking
to work, but it is obviously the wrong way.^ Aside from those, more things to do:
StakingCount
from the UtxoStakingHelper
.locked_utxos
in the GenesisConfig of Utxolock_extra_for_staking
+ the other actionspallet-staking
that is not important.lock_for_staking
in the Utxo work, by connecting to mypallet-utxo-staking