grin/etc/gen_gen
Ignotus Peverell 40e94f53b6
rustfmt
2018-12-14 04:51:52 +00:00
..
src/bin rustfmt 2018-12-14 04:51:52 +00:00
Cargo.toml Complete genesis replacement 2018-12-14 00:46:41 +00:00
README.md Trying to fix slight snafu 2018-12-11 01:08:02 +00:00

Genesis Genesis

This crate isn't strictly part of grin but allows the generation and release of a new Grin Genesis in an automated fashion. The process is the following:

  • Prepare a multisig output and kernel to use as coinbase. In the case of Grin mainnet, this is done and owned by the council treasurers. This can be down a few days prior.
  • Grab the latest bitcoin block hash from publicly available APIs.
  • Build a genesis block with the prepared coinbase and the bitcoin block hash as prev_root. The timestamp of the block is set to 30 min ahead to leave enough time to run a build and start a node.
  • Mine the block so we have at least a valid Cuckatoo Cycle. We don't require a given difficulty for that solution.
  • Finalize the block with the proof-of-work, setting a high-enough difficulty (to be agreed upon separately).
  • Commit the block information to github.
  • Tag version 1.0.0 (scary).

N.B. This was written while listening to Genesis. Unfortunately, I'm not rich enough to do it while driving a Genesis. And that'd be dangerous.

Usage

  1. Build this crate.
  2. From its root run ./target/release/gen-gen --coinbase <file> --difficulty <u64> --tag <version>