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

feat!: change epoch to 4 hours #187

Merged
merged 4 commits into from
Mar 31, 2021
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion Cargo.lock

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

2 changes: 1 addition & 1 deletion runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ homepage = 'https://github.com/galacticcouncil/hydradx-node'
license = 'Unlicense'
name = 'hydra-dx-runtime'
repository = 'https://github.com/galacticcouncil/hydradx-node'
version = '6.0.0'
version = '7.0.0'

[package.metadata.docs.rs]
targets = ['x86_64-unknown-linux-gnu']
Expand Down
4 changes: 2 additions & 2 deletions runtime/src/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ pub mod currency {
pub use primitives::Balance;

pub const HDX: Balance = 1_000_000_000_000;
pub const DOLLARS: Balance = HDX / 10; // 10 HDX ~= 1 $
pub const DOLLARS: Balance = HDX / 10; // 10 HDX ~= 1 $
pub const CENTS: Balance = DOLLARS / 100;
pub const MILLICENTS: Balance = CENTS / 1_000;
}
Expand Down Expand Up @@ -40,7 +40,7 @@ pub mod time {
// 1 in 4 blocks (on average, not counting collisions) will be primary BABE blocks.
pub const PRIMARY_PROBABILITY: (u64, u64) = (1, 4);

pub const EPOCH_DURATION_IN_BLOCKS: BlockNumber = 2 * HOURS;
pub const EPOCH_DURATION_IN_BLOCKS: BlockNumber = 4 * HOURS;
pub const EPOCH_DURATION_IN_SLOTS: u64 = {
const SLOT_FILL_RATE: f64 = MILLISECS_PER_BLOCK as f64 / SLOT_DURATION as f64;

Expand Down
2 changes: 1 addition & 1 deletion runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("hydra-dx"),
impl_name: create_runtime_str!("hydra-dx"),
authoring_version: 1,
spec_version: 6,
spec_version: 7,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 1,
Expand Down