From 934b11d06f228162765c4eb3c69ad085a1de592e Mon Sep 17 00:00:00 2001 From: Ignotus Peverell Date: Tue, 11 Dec 2018 01:07:17 +0000 Subject: [PATCH] More a few properties to mainnet genesis. Don't get too excited, several are placeholders. --- Cargo.lock | 2 -- Cargo.toml | 1 + core/src/genesis.rs | 18 ++++++++++-------- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5c13bdd0a..c85e4cffc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -751,7 +751,6 @@ dependencies = [ "grin_keychain 0.4.2", "grin_store 0.4.2", "grin_util 0.4.2", - "grin_wallet 0.4.2", "lmdb-zero 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "lru-cache 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -854,7 +853,6 @@ dependencies = [ "grin_keychain 0.4.2", "grin_store 0.4.2", "grin_util 0.4.2", - "grin_wallet 0.4.2", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/Cargo.toml b/Cargo.toml index ad5625825..8a9fc7881 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,6 +12,7 @@ build = "src/build/build.rs" [workspace] members = ["api", "chain", "config", "core", "keychain", "p2p", "servers", "store", "util", "pool", "wallet"] +exclude = ["etc/gen_gen"] [[bin]] name = "grin" diff --git a/core/src/genesis.rs b/core/src/genesis.rs index 01be438c4..e1f34a115 100644 --- a/core/src/genesis.rs +++ b/core/src/genesis.rs @@ -16,7 +16,6 @@ use chrono::prelude::{TimeZone, Utc}; -use consensus; use core; use global; use pow::{Difficulty, Proof, ProofOfWork}; @@ -110,7 +109,6 @@ pub fn genesis_testnet3() -> core::Block { pub fn genesis_testnet4() -> core::Block { core::Block::with_header(core::BlockHeader { height: 0, - // previous: core::hash::Hash([0xff; 32]), timestamp: Utc.ymd(2018, 10, 17).and_hms(20, 0, 0), pow: ProofOfWork { total_difficulty: Difficulty::from_num(global::initial_block_difficulty()), @@ -137,13 +135,17 @@ pub fn genesis_testnet4() -> core::Block { pub fn genesis_main() -> core::Block { core::Block::with_header(core::BlockHeader { height: 0, - // previous: core::hash::Hash([0xff; 32]), - timestamp: Utc.ymd(2018, 8, 14).and_hms(0, 0, 0), + timestamp: Utc.ymd(2019, 0, 15).and_hms(12, 0, 0), + output_mmr_size: 1, + kernel_mmr_size: 1, pow: ProofOfWork { - total_difficulty: Difficulty::from_num(global::initial_block_difficulty()), - secondary_scaling: 1, - nonce: global::get_genesis_nonce(), - proof: Proof::zero(consensus::PROOFSIZE), + total_difficulty: Difficulty::from_num(10_u64.pow(8)), + secondary_scaling: 1856, + nonce: 1, + proof: Proof { + nonces: vec![0; 42], + edge_bits: 29, + }, }, ..Default::default() })