Skip to content
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

KTON staking #1408

Merged
merged 11 commits into from
Apr 15, 2024
Merged

KTON staking #1408

merged 11 commits into from
Apr 15, 2024

Conversation

AurevoirXavier
Copy link
Member

@AurevoirXavier AurevoirXavier commented Feb 21, 2024

Part of #1395.

Signed-off-by: Xavier Lau <[email protected]>
pallet/account-migration/src/lib.rs Outdated Show resolved Hide resolved
@AurevoirXavier AurevoirXavier added Bk-Storage [Break] This changes Storage; next release should be major. S-Need Audit PR contains changes to fund-managing logic that should be properly reviewed and externally audited C-Pallet [Component] Something about pallet labels Apr 2, 2024
@AurevoirXavier AurevoirXavier marked this pull request as ready for review April 2, 2024 17:13
@AurevoirXavier AurevoirXavier changed the title [Pending] KTON staking KTON staking Apr 2, 2024

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JayJay1024 Make sure you are aware of this changes, it needs some adopation in the staking app.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

Copy link
Member

@boundless-forest boundless-forest left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, it's clearer than before.

@hackfisher
Copy link
Contributor

unstake and claim will be merged in to one function in EIP-6, unstaking in ledger can be removed by then.

Copy link

Check d61a864 crab-dev

Check runtime version

Check runtime storage

Pallet AccountMigration
+ Entry: StorageEntryMetadata { name: "Ledgers", modifier: Optional, ty: Map { hashers: [Blake2_128Concat], key: UntrackedSymbol { id: 42, marker: PhantomData<fn() -> core::any::TypeId> }, value: UntrackedSymbol { id: 374, marker: PhantomData<fn() -> core::any::TypeId> } }, default: [0], docs: [" [`darwinia_staking::migration::v2::OldLedger`] data."] }
- Entry: StorageEntryMetadata { name: "Ledgers", modifier: Optional, ty: Map { hashers: [Blake2_128Concat], key: UntrackedSymbol { id: 42, marker: PhantomData<fn() -> core::any::TypeId> }, value: UntrackedSymbol { id: 372, marker: PhantomData<fn() -> core::any::TypeId> } }, default: [0], docs: [" [`darwinia_staking::Ledgers`] data."] }

Pallet DarwiniaStaking
+ Entry: StorageEntryMetadata { name: "ExposureCache0", modifier: Optional, ty: Map { hashers: [Twox64Concat], key: UntrackedSymbol { id: 0, marker: PhantomData<fn() -> core::any::TypeId> }, value: UntrackedSymbol { id: 386, marker: PhantomData<fn() -> core::any::TypeId> } }, default: [0], docs: [" Exposure cache 0."] }
- Entry: StorageEntryMetadata { name: "ExposureCache0", modifier: Optional, ty: Map { hashers: [Twox64Concat], key: UntrackedSymbol { id: 0, marker: PhantomData<fn() -> core::any::TypeId> }, value: UntrackedSymbol { id: 383, marker: PhantomData<fn() -> core::any::TypeId> } }, default: [0], docs: [" Exposure cache 0."] }
+ Entry: StorageEntryMetadata { name: "ExposureCache1", modifier: Optional, ty: Map { hashers: [Twox64Concat], key: UntrackedSymbol { id: 0, marker: PhantomData<fn() -> core::any::TypeId> }, value: UntrackedSymbol { id: 386, marker: PhantomData<fn() -> core::any::TypeId> } }, default: [0], docs: [" Exposure cache 1."] }
- Entry: StorageEntryMetadata { name: "ExposureCache1", modifier: Optional, ty: Map { hashers: [Twox64Concat], key: UntrackedSymbol { id: 0, marker: PhantomData<fn() -> core::any::TypeId> }, value: UntrackedSymbol { id: 383, marker: PhantomData<fn() -> core::any::TypeId> } }, default: [0], docs: [" Exposure cache 1."] }
+ Entry: StorageEntryMetadata { name: "ExposureCache2", modifier: Optional, ty: Map { hashers: [Twox64Concat], key: UntrackedSymbol { id: 0, marker: PhantomData<fn() -> core::any::TypeId> }, value: UntrackedSymbol { id: 386, marker: PhantomData<fn() -> core::any::TypeId> } }, default: [0], docs: [" Exposure cache 2."] }
- Entry: StorageEntryMetadata { name: "ExposureCache2", modifier: Optional, ty: Map { hashers: [Twox64Concat], key: UntrackedSymbol { id: 0, marker: PhantomData<fn() -> core::any::TypeId> }, value: UntrackedSymbol { id: 383, marker: PhantomData<fn() -> core::any::TypeId> } }, default: [0], docs: [" Exposure cache 2."] }
- Entry: StorageEntryMetadata { name: "KtonPool", modifier: Default, ty: Plain(UntrackedSymbol { id: 6, marker: PhantomData<fn() -> core::any::TypeId> }), default: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], docs: [" Total staked KTON."] }
+ Entry: StorageEntryMetadata { name: "Ledgers", modifier: Optional, ty: Map { hashers: [Blake2_128Concat], key: UntrackedSymbol { id: 0, marker: PhantomData<fn() -> core::any::TypeId> }, value: UntrackedSymbol { id: 383, marker: PhantomData<fn() -> core::any::TypeId> } }, default: [0], docs: [" All staking ledgers."] }
- Entry: StorageEntryMetadata { name: "Ledgers", modifier: Optional, ty: Map { hashers: [Blake2_128Concat], key: UntrackedSymbol { id: 0, marker: PhantomData<fn() -> core::any::TypeId> }, value: UntrackedSymbol { id: 372, marker: PhantomData<fn() -> core::any::TypeId> } }, default: [0], docs: [" All staking ledgers."] }
- Entry: StorageEntryMetadata { name: "MigrationStartBlock", modifier: Default, ty: Plain(UntrackedSymbol { id: 4, marker: PhantomData<fn() -> core::any::TypeId> }), default: [0, 0, 0, 0], docs: [" Migration starting block."] }
- Entry: StorageEntryMetadata { name: "RingPool", modifier: Default, ty: Plain(UntrackedSymbol { id: 6, marker: PhantomData<fn() -> core::any::TypeId> }), default: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], docs: [" Total staked RING.", "", " This will count RING + deposit(locking RING)."] }

Copy link

Check d61a864 pangolin-dev

Check runtime version

Check runtime storage

Pallet AccountMigration
+ Entry: StorageEntryMetadata { name: "Ledgers", modifier: Optional, ty: Map { hashers: [Blake2_128Concat], key: UntrackedSymbol { id: 41, marker: PhantomData<fn() -> core::any::TypeId> }, value: UntrackedSymbol { id: 390, marker: PhantomData<fn() -> core::any::TypeId> } }, default: [0], docs: [" [`darwinia_staking::migration::v2::OldLedger`] data."] }
- Entry: StorageEntryMetadata { name: "Ledgers", modifier: Optional, ty: Map { hashers: [Blake2_128Concat], key: UntrackedSymbol { id: 41, marker: PhantomData<fn() -> core::any::TypeId> }, value: UntrackedSymbol { id: 390, marker: PhantomData<fn() -> core::any::TypeId> } }, default: [0], docs: [" [`darwinia_staking::Ledgers`] data."] }

Pallet DarwiniaStaking
+ Entry: StorageEntryMetadata { name: "ExposureCache0", modifier: Optional, ty: Map { hashers: [Twox64Concat], key: UntrackedSymbol { id: 0, marker: PhantomData<fn() -> core::any::TypeId> }, value: UntrackedSymbol { id: 402, marker: PhantomData<fn() -> core::any::TypeId> } }, default: [0], docs: [" Exposure cache 0."] }
- Entry: StorageEntryMetadata { name: "ExposureCache0", modifier: Optional, ty: Map { hashers: [Twox64Concat], key: UntrackedSymbol { id: 0, marker: PhantomData<fn() -> core::any::TypeId> }, value: UntrackedSymbol { id: 401, marker: PhantomData<fn() -> core::any::TypeId> } }, default: [0], docs: [" Exposure cache 0."] }
+ Entry: StorageEntryMetadata { name: "ExposureCache1", modifier: Optional, ty: Map { hashers: [Twox64Concat], key: UntrackedSymbol { id: 0, marker: PhantomData<fn() -> core::any::TypeId> }, value: UntrackedSymbol { id: 402, marker: PhantomData<fn() -> core::any::TypeId> } }, default: [0], docs: [" Exposure cache 1."] }
- Entry: StorageEntryMetadata { name: "ExposureCache1", modifier: Optional, ty: Map { hashers: [Twox64Concat], key: UntrackedSymbol { id: 0, marker: PhantomData<fn() -> core::any::TypeId> }, value: UntrackedSymbol { id: 401, marker: PhantomData<fn() -> core::any::TypeId> } }, default: [0], docs: [" Exposure cache 1."] }
+ Entry: StorageEntryMetadata { name: "ExposureCache2", modifier: Optional, ty: Map { hashers: [Twox64Concat], key: UntrackedSymbol { id: 0, marker: PhantomData<fn() -> core::any::TypeId> }, value: UntrackedSymbol { id: 402, marker: PhantomData<fn() -> core::any::TypeId> } }, default: [0], docs: [" Exposure cache 2."] }
- Entry: StorageEntryMetadata { name: "ExposureCache2", modifier: Optional, ty: Map { hashers: [Twox64Concat], key: UntrackedSymbol { id: 0, marker: PhantomData<fn() -> core::any::TypeId> }, value: UntrackedSymbol { id: 401, marker: PhantomData<fn() -> core::any::TypeId> } }, default: [0], docs: [" Exposure cache 2."] }
- Entry: StorageEntryMetadata { name: "KtonPool", modifier: Default, ty: Plain(UntrackedSymbol { id: 6, marker: PhantomData<fn() -> core::any::TypeId> }), default: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], docs: [" Total staked KTON."] }
+ Entry: StorageEntryMetadata { name: "Ledgers", modifier: Optional, ty: Map { hashers: [Blake2_128Concat], key: UntrackedSymbol { id: 0, marker: PhantomData<fn() -> core::any::TypeId> }, value: UntrackedSymbol { id: 399, marker: PhantomData<fn() -> core::any::TypeId> } }, default: [0], docs: [" All staking ledgers."] }
- Entry: StorageEntryMetadata { name: "Ledgers", modifier: Optional, ty: Map { hashers: [Blake2_128Concat], key: UntrackedSymbol { id: 0, marker: PhantomData<fn() -> core::any::TypeId> }, value: UntrackedSymbol { id: 390, marker: PhantomData<fn() -> core::any::TypeId> } }, default: [0], docs: [" All staking ledgers."] }
- Entry: StorageEntryMetadata { name: "MigrationStartBlock", modifier: Default, ty: Plain(UntrackedSymbol { id: 4, marker: PhantomData<fn() -> core::any::TypeId> }), default: [0, 0, 0, 0], docs: [" Migration starting block."] }
- Entry: StorageEntryMetadata { name: "RingPool", modifier: Default, ty: Plain(UntrackedSymbol { id: 6, marker: PhantomData<fn() -> core::any::TypeId> }), default: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], docs: [" Total staked RING.", "", " This will count RING + deposit(locking RING)."] }

Copy link

Check d61a864 darwinia-dev

Check runtime version

Check runtime storage

- Pallet: "EcdsaAuthority"
- Pallet: "MessageGadget"

Pallet AccountMigration
+ Entry: StorageEntryMetadata { name: "Ledgers", modifier: Optional, ty: Map { hashers: [Blake2_128Concat], key: UntrackedSymbol { id: 42, marker: PhantomData<fn() -> core::any::TypeId> }, value: UntrackedSymbol { id: 401, marker: PhantomData<fn() -> core::any::TypeId> } }, default: [0], docs: [" [`darwinia_staking::migration::v2::OldLedger`] data."] }
- Entry: StorageEntryMetadata { name: "Ledgers", modifier: Optional, ty: Map { hashers: [Blake2_128Concat], key: UntrackedSymbol { id: 42, marker: PhantomData<fn() -> core::any::TypeId> }, value: UntrackedSymbol { id: 408, marker: PhantomData<fn() -> core::any::TypeId> } }, default: [0], docs: [" [`darwinia_staking::Ledgers`] data."] }

Pallet DarwiniaStaking
+ Entry: StorageEntryMetadata { name: "ExposureCache0", modifier: Optional, ty: Map { hashers: [Twox64Concat], key: UntrackedSymbol { id: 0, marker: PhantomData<fn() -> core::any::TypeId> }, value: UntrackedSymbol { id: 413, marker: PhantomData<fn() -> core::any::TypeId> } }, default: [0], docs: [" Exposure cache 0."] }
- Entry: StorageEntryMetadata { name: "ExposureCache0", modifier: Optional, ty: Map { hashers: [Twox64Concat], key: UntrackedSymbol { id: 0, marker: PhantomData<fn() -> core::any::TypeId> }, value: UntrackedSymbol { id: 419, marker: PhantomData<fn() -> core::any::TypeId> } }, default: [0], docs: [" Exposure cache 0."] }
+ Entry: StorageEntryMetadata { name: "ExposureCache1", modifier: Optional, ty: Map { hashers: [Twox64Concat], key: UntrackedSymbol { id: 0, marker: PhantomData<fn() -> core::any::TypeId> }, value: UntrackedSymbol { id: 413, marker: PhantomData<fn() -> core::any::TypeId> } }, default: [0], docs: [" Exposure cache 1."] }
- Entry: StorageEntryMetadata { name: "ExposureCache1", modifier: Optional, ty: Map { hashers: [Twox64Concat], key: UntrackedSymbol { id: 0, marker: PhantomData<fn() -> core::any::TypeId> }, value: UntrackedSymbol { id: 419, marker: PhantomData<fn() -> core::any::TypeId> } }, default: [0], docs: [" Exposure cache 1."] }
+ Entry: StorageEntryMetadata { name: "ExposureCache2", modifier: Optional, ty: Map { hashers: [Twox64Concat], key: UntrackedSymbol { id: 0, marker: PhantomData<fn() -> core::any::TypeId> }, value: UntrackedSymbol { id: 413, marker: PhantomData<fn() -> core::any::TypeId> } }, default: [0], docs: [" Exposure cache 2."] }
- Entry: StorageEntryMetadata { name: "ExposureCache2", modifier: Optional, ty: Map { hashers: [Twox64Concat], key: UntrackedSymbol { id: 0, marker: PhantomData<fn() -> core::any::TypeId> }, value: UntrackedSymbol { id: 419, marker: PhantomData<fn() -> core::any::TypeId> } }, default: [0], docs: [" Exposure cache 2."] }
- Entry: StorageEntryMetadata { name: "KtonPool", modifier: Default, ty: Plain(UntrackedSymbol { id: 6, marker: PhantomData<fn() -> core::any::TypeId> }), default: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], docs: [" Total staked KTON."] }
+ Entry: StorageEntryMetadata { name: "Ledgers", modifier: Optional, ty: Map { hashers: [Blake2_128Concat], key: UntrackedSymbol { id: 0, marker: PhantomData<fn() -> core::any::TypeId> }, value: UntrackedSymbol { id: 410, marker: PhantomData<fn() -> core::any::TypeId> } }, default: [0], docs: [" All staking ledgers."] }
- Entry: StorageEntryMetadata { name: "Ledgers", modifier: Optional, ty: Map { hashers: [Blake2_128Concat], key: UntrackedSymbol { id: 0, marker: PhantomData<fn() -> core::any::TypeId> }, value: UntrackedSymbol { id: 408, marker: PhantomData<fn() -> core::any::TypeId> } }, default: [0], docs: [" All staking ledgers."] }
- Entry: StorageEntryMetadata { name: "MigrationStartBlock", modifier: Default, ty: Plain(UntrackedSymbol { id: 4, marker: PhantomData<fn() -> core::any::TypeId> }), default: [0, 0, 0, 0], docs: [" Migration starting block."] }
- Entry: StorageEntryMetadata { name: "RingPool", modifier: Default, ty: Plain(UntrackedSymbol { id: 6, marker: PhantomData<fn() -> core::any::TypeId> }), default: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], docs: [" Total staked RING.", "", " This will count RING + deposit(locking RING)."] }

@AurevoirXavier AurevoirXavier merged commit 1e5761b into main Apr 15, 2024
10 checks passed
@AurevoirXavier AurevoirXavier deleted the xavier/kton-staking branch April 15, 2024 06:42
@AurevoirXavier AurevoirXavier added S-Audited [Security] Audited and removed S-Need Audit PR contains changes to fund-managing logic that should be properly reviewed and externally audited labels Apr 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bk-Storage [Break] This changes Storage; next release should be major. C-Pallet [Component] Something about pallet S-Audited [Security] Audited
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants