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

Add short default tempo to fast-blocks feature #725

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -848,6 +848,18 @@ impl pallet_commitments::Config for Runtime {
type RateLimit = CommitmentRateLimit;
}

#[cfg(not(feature = "fast-blocks"))]
pub const INITIAL_SUBNET_TEMPO: u16 = 99;

#[cfg(feature = "fast-blocks")]
pub const INITIAL_SUBNET_TEMPO: u16 = 10;

#[cfg(not(feature = "fast-blocks"))]
pub const INITIAL_CHILDKEY_TAKE_RATELIMIT: u64 = 216000; // 30 days at 12 seconds per block

#[cfg(feature = "fast-blocks")]
pub const INITIAL_CHILDKEY_TAKE_RATELIMIT: u64 = 5;

// Configure the pallet subtensor.
parameter_types! {
pub const SubtensorInitialRho: u16 = 10;
Expand All @@ -860,7 +872,7 @@ parameter_types! {
pub const SubtensorInitialValidatorPruneLen: u64 = 1;
pub const SubtensorInitialScalingLawPower: u16 = 50; // 0.5
pub const SubtensorInitialMaxAllowedValidators: u16 = 128;
pub const SubtensorInitialTempo: u16 = 99;
pub const SubtensorInitialTempo: u16 = INITIAL_SUBNET_TEMPO;
pub const SubtensorInitialDifficulty: u64 = 10_000_000;
pub const SubtensorInitialAdjustmentInterval: u16 = 100;
pub const SubtensorInitialAdjustmentAlpha: u64 = 0; // no weight to previous value.
Expand All @@ -883,7 +895,7 @@ parameter_types! {
pub const SubtensorInitialMaxBurn: u64 = 100_000_000_000; // 100 tao
pub const SubtensorInitialTxRateLimit: u64 = 1000;
pub const SubtensorInitialTxDelegateTakeRateLimit: u64 = 216000; // 30 days at 12 seconds per block
pub const SubtensorInitialTxChildKeyTakeRateLimit: u64 = 216000; // 30 days at 12 seconds per block
pub const SubtensorInitialTxChildKeyTakeRateLimit: u64 = INITIAL_CHILDKEY_TAKE_RATELIMIT;
pub const SubtensorInitialRAORecycledForRegistration: u64 = 0; // 0 rao
pub const SubtensorInitialSenateRequiredStakePercentage: u64 = 1; // 1 percent of total stake
pub const SubtensorInitialNetworkImmunity: u64 = 7 * 7200;
Expand Down
Loading