mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-09 12:49:23 +00:00
Consolidates all primitives into a single crate. We didn't benefit from its fragmentation. I'm hesitant to say the new internal-organization is better (it may be just as clunky), but it's at least in a single crate (not spread out over micro-crates). The ABI is the most distinct. We now entirely own it. Block header hashes don't directly commit to any BABE data (avoiding potentially ~4 KB headers upon session changes), and are hashed as borsh (a more widely used codec than SCALE). There are still Substrate variants, using SCALE and with the BABE data, but they're prunable from a protocol design perspective. Defines a transaction as a Vec of Calls, allowing atomic operations.
14 lines
470 B
Rust
14 lines
470 B
Rust
use core::time::Duration;
|
|
|
|
/// The target block time.
|
|
pub const TARGET_BLOCK_TIME: Duration = Duration::from_secs(6);
|
|
|
|
/// The intended duration for a session.
|
|
// 1 week
|
|
pub const SESSION_LENGTH: Duration = Duration::from_secs(7 * 24 * 60 * 60);
|
|
|
|
/// The maximum amount of key shares per set.
|
|
pub const MAX_KEY_SHARES_PER_SET: u16 = 150;
|
|
/// The maximum amount of key shares per set, as an u32.
|
|
pub const MAX_KEY_SHARES_PER_SET_U32: u32 = MAX_KEY_SHARES_PER_SET as u32;
|