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

Redesign commission rule #1294

Merged
merged 2 commits into from
Oct 17, 2023
Merged

Redesign commission rule #1294

merged 2 commits into from
Oct 17, 2023

Conversation

aurexav
Copy link
Member

@aurexav aurexav commented Oct 11, 2023

Resolve part of #1238.

@aurexav aurexav added the C-Pallet [Component] Something about pallet label Oct 11, 2023
@@ -563,16 +558,16 @@ fn payout_should_work() {
let session_duration = Duration::new(6 * 60 * 60, 0).as_millis();
Staking::payout(session_duration, Staking::elapsed_time());
let rewards = [
1_366_118_870_124_739_965_121_u128,
2_550_088_512_393_184_504_844,
1_366_118_850_452_628_471_390,
Copy link
Member Author

Choose a reason for hiding this comment

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

Slightly different due to the accuracy losses of Perbill.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@aurexav
Copy link
Member Author

aurexav commented Oct 12, 2023

cc @hackfisher @xiaoch05

@@ -940,6 +930,7 @@ pub use pallet::*;

type RewardPoint = u32;
type Power = u32;
type Vote = u32;
Copy link
Member

Choose a reason for hiding this comment

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

Can you add some comment on the differences between the vote and power here? I am not sure if the vote equals to the power * adjustment.

@github-actions
Copy link

Check f9b35c2 darwinia-dev

Check runtime version

Check runtime storage

Pallet DarwiniaStaking
+ Entry: StorageEntryMetadata { name: "Exposures", modifier: Optional, ty: Map { hashers: [Twox64Concat], key: UntrackedSymbol { id: 0, marker: PhantomData<fn() -> core::any::TypeId> }, value: UntrackedSymbol { id: 319, marker: PhantomData<fn() -> core::any::TypeId> } }, default: [0], docs: [" Current stakers' exposure."] }
- Entry: StorageEntryMetadata { name: "Exposures", modifier: Optional, ty: Map { hashers: [Twox64Concat], key: UntrackedSymbol { id: 0, marker: PhantomData<fn() -> core::any::TypeId> }, value: UntrackedSymbol { id: 319, marker: PhantomData<fn() -> core::any::TypeId> } }, default: [0], docs: [" Current stakers' exposure."] }
+ Entry: StorageEntryMetadata { name: "NextExposures", modifier: Optional, ty: Map { hashers: [Twox64Concat], key: UntrackedSymbol { id: 0, marker: PhantomData<fn() -> core::any::TypeId> }, value: UntrackedSymbol { id: 319, marker: PhantomData<fn() -> core::any::TypeId> } }, default: [0], docs: [" Next stakers' exposure."] }
- Entry: StorageEntryMetadata { name: "NextExposures", modifier: Optional, ty: Map { hashers: [Twox64Concat], key: UntrackedSymbol { id: 0, marker: PhantomData<fn() -> core::any::TypeId> }, value: UntrackedSymbol { id: 319, marker: PhantomData<fn() -> core::any::TypeId> } }, default: [0], docs: [" Next stakers' exposure."] }

Pallet EVM
+ Entry: StorageEntryMetadata { name: "Suicided", modifier: Optional, ty: Map { hashers: [Blake2_128Concat], key: UntrackedSymbol { id: 141, marker: PhantomData<fn() -> core::any::TypeId> }, value: UntrackedSymbol { id: 67, marker: PhantomData<fn() -> core::any::TypeId> } }, default: [0], docs: [] }

@github-actions
Copy link

Check f9b35c2 pangoro-dev

Check runtime version

Check runtime storage

Pallet DarwiniaStaking
+ Entry: StorageEntryMetadata { name: "Exposures", modifier: Optional, ty: Map { hashers: [Twox64Concat], key: UntrackedSymbol { id: 0, marker: PhantomData<fn() -> core::any::TypeId> }, value: UntrackedSymbol { id: 314, marker: PhantomData<fn() -> core::any::TypeId> } }, default: [0], docs: [" Current stakers' exposure."] }
- Entry: StorageEntryMetadata { name: "Exposures", modifier: Optional, ty: Map { hashers: [Twox64Concat], key: UntrackedSymbol { id: 0, marker: PhantomData<fn() -> core::any::TypeId> }, value: UntrackedSymbol { id: 314, marker: PhantomData<fn() -> core::any::TypeId> } }, default: [0], docs: [" Current stakers' exposure."] }
+ Entry: StorageEntryMetadata { name: "NextExposures", modifier: Optional, ty: Map { hashers: [Twox64Concat], key: UntrackedSymbol { id: 0, marker: PhantomData<fn() -> core::any::TypeId> }, value: UntrackedSymbol { id: 314, marker: PhantomData<fn() -> core::any::TypeId> } }, default: [0], docs: [" Next stakers' exposure."] }
- Entry: StorageEntryMetadata { name: "NextExposures", modifier: Optional, ty: Map { hashers: [Twox64Concat], key: UntrackedSymbol { id: 0, marker: PhantomData<fn() -> core::any::TypeId> }, value: UntrackedSymbol { id: 314, marker: PhantomData<fn() -> core::any::TypeId> } }, default: [0], docs: [" Next stakers' exposure."] }

@github-actions
Copy link

Check f9b35c2 crab-dev

Check runtime version

RuntimeVersion {
    spec_name: "Crab2",
    impl_name: "DarwiniaOfficialRust",
    authoring_version: 0,
-   spec_version: 6403,
+   spec_version: 6402,
    impl_version: 0,
    transaction_version: 0,
    state_version: 0,
}

Check runtime storage

Pallet DarwiniaStaking
+ Entry: StorageEntryMetadata { name: "Exposures", modifier: Optional, ty: Map { hashers: [Twox64Concat], key: UntrackedSymbol { id: 0, marker: PhantomData<fn() -> core::any::TypeId> }, value: UntrackedSymbol { id: 319, marker: PhantomData<fn() -> core::any::TypeId> } }, default: [0], docs: [" Current stakers' exposure."] }
- Entry: StorageEntryMetadata { name: "Exposures", modifier: Optional, ty: Map { hashers: [Twox64Concat], key: UntrackedSymbol { id: 0, marker: PhantomData<fn() -> core::any::TypeId> }, value: UntrackedSymbol { id: 319, marker: PhantomData<fn() -> core::any::TypeId> } }, default: [0], docs: [" Current stakers' exposure."] }
+ Entry: StorageEntryMetadata { name: "NextExposures", modifier: Optional, ty: Map { hashers: [Twox64Concat], key: UntrackedSymbol { id: 0, marker: PhantomData<fn() -> core::any::TypeId> }, value: UntrackedSymbol { id: 319, marker: PhantomData<fn() -> core::any::TypeId> } }, default: [0], docs: [" Next stakers' exposure."] }
- Entry: StorageEntryMetadata { name: "NextExposures", modifier: Optional, ty: Map { hashers: [Twox64Concat], key: UntrackedSymbol { id: 0, marker: PhantomData<fn() -> core::any::TypeId> }, value: UntrackedSymbol { id: 319, marker: PhantomData<fn() -> core::any::TypeId> } }, default: [0], docs: [" Next stakers' exposure."] }

@github-actions
Copy link

Check f9b35c2 pangolin-dev

Check runtime version

Check runtime storage

Pallet DarwiniaStaking
+ Entry: StorageEntryMetadata { name: "Exposures", modifier: Optional, ty: Map { hashers: [Twox64Concat], key: UntrackedSymbol { id: 0, marker: PhantomData<fn() -> core::any::TypeId> }, value: UntrackedSymbol { id: 319, marker: PhantomData<fn() -> core::any::TypeId> } }, default: [0], docs: [" Current stakers' exposure."] }
- Entry: StorageEntryMetadata { name: "Exposures", modifier: Optional, ty: Map { hashers: [Twox64Concat], key: UntrackedSymbol { id: 0, marker: PhantomData<fn() -> core::any::TypeId> }, value: UntrackedSymbol { id: 319, marker: PhantomData<fn() -> core::any::TypeId> } }, default: [0], docs: [" Current stakers' exposure."] }
+ Entry: StorageEntryMetadata { name: "NextExposures", modifier: Optional, ty: Map { hashers: [Twox64Concat], key: UntrackedSymbol { id: 0, marker: PhantomData<fn() -> core::any::TypeId> }, value: UntrackedSymbol { id: 319, marker: PhantomData<fn() -> core::any::TypeId> } }, default: [0], docs: [" Next stakers' exposure."] }
- Entry: StorageEntryMetadata { name: "NextExposures", modifier: Optional, ty: Map { hashers: [Twox64Concat], key: UntrackedSymbol { id: 0, marker: PhantomData<fn() -> core::any::TypeId> }, value: UntrackedSymbol { id: 319, marker: PhantomData<fn() -> core::any::TypeId> } }, default: [0], docs: [" Next stakers' exposure."] }

@aurexav aurexav merged commit b30a14a into main Oct 17, 2023
13 checks passed
@aurexav aurexav deleted the xavier/staking branch October 17, 2023 03:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-Pallet [Component] Something about pallet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants