gengen

command
v1.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 12, 2021 License: Apache-2.0, MIT Imports: 9 Imported by: 0

README

gengen

gengen is a filecoin tool that builds the genesis.car, which is used to seed the genesis block.

Example
go-filecon $ ./tools/gengen/gengen --keypath fixtures --out-car fixtures/genesis.car --out-json fixtures/gen.json --config fixtures/setup.json
Building

The gengen tool expects that you can already build venus. Please refer to the README in the root of this project for details.

go build -o gengen main.go
Usage
Usage of ./tools/gengen:
  -config string
    	reads configuration from this json file, instead of stdin
  -json
    	sets output to be json
  -keypath string
    	sets location to write key files to (default ".")
  -out-car string
    	writes the generated car file to the give path, instead of stdout
  -out-json string
    	enables json output and writes it to the given file
  -seed int
    	provides the seed for randomization, defaults to current unix epoch (default 1553189402)
  -test-proofs-mode boolean
       configures sealing and PoSt generation to be less computationally expensive
Configuration File

The gengen configuration file defines the artifacts produced.

  • keys defines the number of keys which will be produced
  • preAlloc is an array defining the amount of FIL for each key
  • miners is an array defining miners, the owner is the key index, and power is the amount of power the miner will have in the genesis block.

Example

{
  "keys": 5,
  "preAlloc": [
    "1000000000000",
    "1000000000000",
    "1000000000000",
    "1000000000000",
    "1000000000000"
  ],
  "miners": [{
    "owner": 0,
    "power": 1
  }]
}

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL