diff --git a/cmd/puppeth/wizard_genesis.go b/cmd/puppeth/wizard_genesis.go index d8e8af3d0e..93c313bd96 100644 --- a/cmd/puppeth/wizard_genesis.go +++ b/cmd/puppeth/wizard_genesis.go @@ -58,6 +58,7 @@ func (w *wizard) makeGenesis() { fmt.Println("Which consensus engine to use? (default = clique)") fmt.Println(" 1. Ethash - proof-of-work") fmt.Println(" 2. Clique - proof-of-authority") + fmt.Println(" 3. EccPoW - proof-of-work with LDPC") choice := w.read() switch { @@ -103,6 +104,10 @@ func (w *wizard) makeGenesis() { for i, signer := range signers { copy(genesis.ExtraData[32+i*common.AddressLength:], signer[:]) } + case choice == "3": + // In case of eccpow, we're pretty much done + genesis.Config.Eccpow = new(params.EccpowConfig) + genesis.ExtraData = make([]byte, 32) default: log.Crit("Invalid consensus engine choice", "choice", choice) diff --git a/cmd/puppeth/wizard_node.go b/cmd/puppeth/wizard_node.go index 1d1ed30dd5..a2116aaa8b 100644 --- a/cmd/puppeth/wizard_node.go +++ b/cmd/puppeth/wizard_node.go @@ -146,6 +146,21 @@ func (w *wizard) deployNode(boot bool) { return } } + } else if w.conf.Genesis.Config.Eccpow != nil { + // Eccpow based miners only need an etherbase to mine against + fmt.Println() + if infos.etherbase == "" { + fmt.Printf("What address should the miner use?\n") + for { + if address := w.readAddress(); address != nil { + infos.etherbase = address.Hex() + break + } + } + } else { + fmt.Printf("What address should the miner use? (default = %s)\n", infos.etherbase) + infos.etherbase = w.readDefaultAddress(common.HexToAddress(infos.etherbase)).Hex() + } } // Establish the gas dynamics to be enforced by the signer fmt.Println()