mirror of
https://github.com/0glabs/0g-storage-node.git
synced 2025-04-04 15:35:18 +00:00

Some checks failed
abi-consistent-check / build-and-compare (push) Has been cancelled
code-coverage / unittest-cov (push) Has been cancelled
rust / check (push) Has been cancelled
rust / test (push) Has been cancelled
rust / lints (push) Has been cancelled
functional-test / test (push) Has been cancelled
* feat: Support faster PoRA specification * Support subtasks in PoRA mine * Fix test fails * Check the contract version
19 lines
786 B
Rust
19 lines
786 B
Rust
pub const KB: usize = 1024;
|
|
pub const MB: usize = 1024 * KB;
|
|
pub const GB: usize = 1024 * MB;
|
|
pub const TB: usize = 1024 * GB;
|
|
|
|
pub const BYTES_PER_SECTOR: usize = 256;
|
|
pub const BYTES_PER_SEAL: usize = 4 * KB;
|
|
pub const BYTES_PER_SCRATCHPAD: usize = 16 * KB;
|
|
pub const BYTES_PER_LOAD: usize = 256 * KB;
|
|
pub const BYTES_PER_PRICING: usize = 8 * GB;
|
|
pub const BYTES_PER_MAX_MINING_RANGE: usize = 8 * TB;
|
|
|
|
pub const SECTORS_PER_LOAD: usize = BYTES_PER_LOAD / BYTES_PER_SECTOR;
|
|
pub const SECTORS_PER_SEAL: usize = BYTES_PER_SEAL / BYTES_PER_SECTOR;
|
|
pub const SECTORS_PER_PRICING: usize = BYTES_PER_PRICING / BYTES_PER_SECTOR;
|
|
pub const SECTORS_PER_MAX_MINING_RANGE: usize = BYTES_PER_MAX_MINING_RANGE / BYTES_PER_SECTOR;
|
|
|
|
pub const SEALS_PER_LOAD: usize = BYTES_PER_LOAD / BYTES_PER_SEAL;
|