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

Implement DIP-6 #1475

Merged
merged 6 commits into from
Apr 17, 2024
Merged

Implement DIP-6 #1475

merged 6 commits into from
Apr 17, 2024

Conversation

aurexav
Copy link
Member

@aurexav aurexav commented Apr 15, 2024

No description provided.

@aurexav aurexav added the S-Need Audit PR contains changes to fund-managing logic that should be properly reviewed and externally audited label Apr 15, 2024
@aurexav aurexav marked this pull request as ready for review April 15, 2024 20:01

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

node/src/chain_spec/crab.rs Outdated Show resolved Hide resolved
node/src/chain_spec/crab.rs Outdated Show resolved Hide resolved
pallet/staking/src/lib.rs Show resolved Hide resolved
pallet/staking/src/lib.rs Outdated Show resolved Hide resolved
precompile/staking/src/lib.rs Show resolved Hide resolved

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

Copy link

Check ede7488 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: "RateLimit", 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: [" Rate limit.", "", " The maximum amount of RING that can be staked or unstaked in one session."] }
+ Entry: StorageEntryMetadata { name: "RateLimitState", modifier: Default, ty: Plain(UntrackedSymbol { id: 393, marker: PhantomData<fn() -> core::any::TypeId> }), default: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], docs: [" Rate limit state.", "", " Tracks the rate limit state in a session."] }
- 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 ede7488 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: "RateLimit", 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: [" Rate limit.", "", " The maximum amount of RING that can be staked or unstaked in one session."] }
+ Entry: StorageEntryMetadata { name: "RateLimitState", modifier: Default, ty: Plain(UntrackedSymbol { id: 420, marker: PhantomData<fn() -> core::any::TypeId> }), default: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], docs: [" Rate limit state.", "", " Tracks the rate limit state in a session."] }
- 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 ede7488 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: "RateLimit", 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: [" Rate limit.", "", " The maximum amount of RING that can be staked or unstaked in one session."] }
+ Entry: StorageEntryMetadata { name: "RateLimitState", modifier: Default, ty: Plain(UntrackedSymbol { id: 409, marker: PhantomData<fn() -> core::any::TypeId> }), default: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], docs: [" Rate limit state.", "", " Tracks the rate limit state in a session."] }
- 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)."] }

@aurexav aurexav 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 17, 2024
@aurexav aurexav merged commit 7ea03fb into main Apr 17, 2024
10 checks passed
@aurexav aurexav deleted the xavier/dip-6 branch April 17, 2024 09:54
@aurexav aurexav linked an issue Apr 19, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-Audited [Security] Audited
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Unstaking deposits doesn't require a 14-day wait.
3 participants