Skip to content

Commit

Permalink
Update dependencies, new staking configuration (#197)
Browse files Browse the repository at this point in the history
  • Loading branch information
olegnn authored Feb 28, 2025
1 parent 0535ca0 commit 70c85b7
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 35 deletions.
46 changes: 31 additions & 15 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ authors = ["Dock.io"]
build = "build.rs"
edition = "2021"
name = "dock-node"
version = "0.34.0"
version = "0.35.0"

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
Expand All @@ -28,7 +28,7 @@ optional = true

[dependencies.dock-runtime]
path = "../runtime"
version = "0.34.0"
version = "0.35.0"

[dependencies.beefy-primitives]
git = "https://github.com/paritytech/substrate.git"
Expand Down Expand Up @@ -514,7 +514,7 @@ branch = "polkadot-v0.9.29"

[dependencies.pallet-elections-phragmen]
git = "https://github.com/docknetwork/dock-substrate-common.git"
rev = "5735cdc0d4ad2cdc402043942a7c1ec2ad3bb1fb"
rev = "bb6904dbbf984d2432dd741505b23b59f11679d1"

[dependencies.dock-staking-rewards]
path = "../pallets/staking-rewards"
Expand All @@ -528,7 +528,7 @@ rev = "dc50c3d973d1f53434c7a03e426faa9c20062f60"

[dependencies.dock-price-feed-rpc]
git = "https://github.com/docknetwork/dock-substrate-common.git"
rev = "5735cdc0d4ad2cdc402043942a7c1ec2ad3bb1fb"
rev = "bb6904dbbf984d2432dd741505b23b59f11679d1"

[dependencies.dock-staking-rewards-rpc]
path = "../pallets/staking-rewards/rpc"
Expand All @@ -538,7 +538,7 @@ path = "../pallets/core/rpc"

[dependencies.pallet-staking]
git = "https://github.com/docknetwork/dock-substrate-common.git"
rev = "5735cdc0d4ad2cdc402043942a7c1ec2ad3bb1fb"
rev = "bb6904dbbf984d2432dd741505b23b59f11679d1"

[dependencies.fp-consensus]
git = "https://github.com/docknetwork/frontier.git"
Expand Down
2 changes: 1 addition & 1 deletion pallets/core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ default-features = false

[dependencies.utils]
git = "https://github.com/docknetwork/dock-substrate-common.git"
rev = "5735cdc0d4ad2cdc402043942a7c1ec2ad3bb1fb"
rev = "791ba98f551bcc82debb95ad8a3f95c3b193f51a"
default-features = false

[dependencies.scale-info]
Expand Down
2 changes: 1 addition & 1 deletion pallets/staking-rewards/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ branch = "polkadot-v0.9.29"
[dependencies.pallet-staking]
default-features = false
git = "https://github.com/docknetwork/dock-substrate-common.git"
rev = "5735cdc0d4ad2cdc402043942a7c1ec2ad3bb1fb"
rev = "bb6904dbbf984d2432dd741505b23b59f11679d1"

[dependencies.pallet-staking-reward-curve]
default-features = false
Expand Down
14 changes: 7 additions & 7 deletions runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
authors = ["Dock.io"]
edition = "2021"
name = "dock-runtime"
version = "0.34.0"
version = "0.35.0"
license = "Apache-2.0"

[package.metadata.docs.rs]
Expand Down Expand Up @@ -49,7 +49,7 @@ hex = { version = "0.4", default-features = false }

[dependencies.utils]
git = "https://github.com/docknetwork/dock-substrate-common.git"
rev = "5735cdc0d4ad2cdc402043942a7c1ec2ad3bb1fb"
rev = "bb6904dbbf984d2432dd741505b23b59f11679d1"
default-features = false

[dependencies.pallet-babe]
Expand Down Expand Up @@ -292,7 +292,7 @@ branch = "polkadot-v0.9.29"
[dependencies.pallet-collective]
default-features = false
git = "https://github.com/docknetwork/dock-substrate-common.git"
rev = "5735cdc0d4ad2cdc402043942a7c1ec2ad3bb1fb"
rev = "bb6904dbbf984d2432dd741505b23b59f11679d1"

[dependencies.pallet-membership]
default-features = false
Expand Down Expand Up @@ -332,7 +332,7 @@ branch = "polkadot-v0.9.29"
[dependencies.pallet-staking]
default-features = false
git = "https://github.com/docknetwork/dock-substrate-common.git"
rev = "5735cdc0d4ad2cdc402043942a7c1ec2ad3bb1fb"
rev = "bb6904dbbf984d2432dd741505b23b59f11679d1"

[dependencies.pallet-staking-reward-curve]
default-features = false
Expand Down Expand Up @@ -367,12 +367,12 @@ branch = "polkadot-v0.9.29"
[dependencies.pallet-democracy]
default-features = false
git = "https://github.com/docknetwork/dock-substrate-common.git"
rev = "5735cdc0d4ad2cdc402043942a7c1ec2ad3bb1fb"
rev = "bb6904dbbf984d2432dd741505b23b59f11679d1"

[dependencies.pallet-elections-phragmen]
default-features = false
git = "https://github.com/docknetwork/dock-substrate-common.git"
rev = "5735cdc0d4ad2cdc402043942a7c1ec2ad3bb1fb"
rev = "bb6904dbbf984d2432dd741505b23b59f11679d1"

[dependencies.hex-literal]
version = "0.3.4"
Expand Down Expand Up @@ -467,7 +467,7 @@ path = "../pallets/agreement"
[dependencies.dock-price-feed]
default-features = false
git = "https://github.com/docknetwork/dock-substrate-common.git"
rev = "5735cdc0d4ad2cdc402043942a7c1ec2ad3bb1fb"
rev = "bb6904dbbf984d2432dd741505b23b59f11679d1"

[dependencies.libsecp256k1]
version = "0.7"
Expand Down
12 changes: 6 additions & 6 deletions runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("dock-pos-dev-runtime"),
impl_name: create_runtime_str!("Dock"),
authoring_version: 1,
spec_version: 68,
spec_version: 69,
impl_version: 2,
transaction_version: 2,
apis: RUNTIME_API_VERSIONS,
Expand All @@ -210,7 +210,7 @@ pub struct ChangeValidatorsConfiguration;

#[cfg(feature = "mainnet")]
impl ChangeValidatorsConfiguration {
pub const VALIDATOR_COUNT: u32 = 10;
pub const VALIDATOR_COUNT: u32 = 5;
}

#[cfg(not(feature = "mainnet"))]
Expand Down Expand Up @@ -253,8 +253,8 @@ mod small_durations {
pub const EPOCH_DURATION_IN_SLOTS: u64 = EPOCH_DURATION_IN_BLOCKS as u64;
pub const SESSIONS_PER_ERA: sp_staking::SessionIndex = 3;
/// Bonding duration is in number of era
pub const BONDING_DURATION: u32 = 24 * 8;
pub const SLASH_DEFER_DURATION: u32 = 24 * 2; // 1/4 the bonding duration.
pub const BONDING_DURATION: u32 = 0;
pub const SLASH_DEFER_DURATION: u32 = 0; // 1/4 the bonding duration.
/// Specifies the number of blocks for which the equivocation is valid.
pub const REPORT_LONGEVITY: u64 =
BONDING_DURATION as u64 * SESSIONS_PER_ERA as u64 * EPOCH_DURATION_IN_SLOTS;
Expand Down Expand Up @@ -294,8 +294,8 @@ mod prod_durations {

pub const SESSIONS_PER_ERA: sp_staking::SessionIndex = 4; // 12 hours
/// Bonding duration is in number of era
pub const BONDING_DURATION: u32 = 2 * 7; // 7 days
pub const SLASH_DEFER_DURATION: u32 = 7; // 1/2 the bonding duration.
pub const BONDING_DURATION: u32 = 0; // 7 days
pub const SLASH_DEFER_DURATION: u32 = 0; // 1/2 the bonding duration.
/// Specifies the number of blocks for which the equivocation is valid.
pub const REPORT_LONGEVITY: u64 =
BONDING_DURATION as u64 * SESSIONS_PER_ERA as u64 * EPOCH_DURATION_IN_SLOTS;
Expand Down

0 comments on commit 70c85b7

Please sign in to comment.