From 8c78449a9ef8f2a77cc1ff94f9a0a3178af21408 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Thu, 19 Oct 2017 13:59:02 +0300 Subject: cmd/puppeth: reorganize stats reports to make it readable --- cmd/puppeth/wizard_node.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmd/puppeth/wizard_node.go') diff --git a/cmd/puppeth/wizard_node.go b/cmd/puppeth/wizard_node.go index 05232486b..69d1715a4 100644 --- a/cmd/puppeth/wizard_node.go +++ b/cmd/puppeth/wizard_node.go @@ -156,5 +156,5 @@ func (w *wizard) deployNode(boot bool) { log.Info("Waiting for node to finish booting") time.Sleep(3 * time.Second) - w.networkStats(false) + w.networkStats() } -- cgit v1.2.3 From da3b9f831e6bb8f8a3c589e5cd8426fd9da72eea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Thu, 19 Oct 2017 16:00:55 +0300 Subject: cmd/puppeth: support deploying services with forced rebuilds --- cmd/puppeth/wizard_node.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'cmd/puppeth/wizard_node.go') diff --git a/cmd/puppeth/wizard_node.go b/cmd/puppeth/wizard_node.go index 69d1715a4..023da8e1e 100644 --- a/cmd/puppeth/wizard_node.go +++ b/cmd/puppeth/wizard_node.go @@ -44,7 +44,7 @@ func (w *wizard) deployNode(boot bool) { } client := w.servers[server] - // Retrieve any active ethstats configurations from the server + // Retrieve any active node configurations from the server infos, err := checkNode(client, w.network, boot) if err != nil { if boot { @@ -145,7 +145,11 @@ func (w *wizard) deployNode(boot bool) { infos.gasPrice = w.readDefaultFloat(infos.gasPrice) } // Try to deploy the full node on the host - if out, err := deployNode(client, w.network, w.conf.bootFull, w.conf.bootLight, infos); err != nil { + fmt.Println() + fmt.Printf("Should the node be built from scratch (y/n)? (default = no)\n") + nocache := w.readDefaultString("n") != "n" + + if out, err := deployNode(client, w.network, w.conf.bootFull, w.conf.bootLight, infos, nocache); err != nil { log.Error("Failed to deploy Ethereum node container", "err", err) if len(out) > 0 { fmt.Printf("%s\n", out) -- cgit v1.2.3 From 9e095251b71255ff346ee9300df8754eb6b64903 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Thu, 19 Oct 2017 17:50:34 +0300 Subject: cmd/puppeth: mount ethash dir from the host to cache DAGs --- cmd/puppeth/wizard_node.go | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'cmd/puppeth/wizard_node.go') diff --git a/cmd/puppeth/wizard_node.go b/cmd/puppeth/wizard_node.go index 023da8e1e..f1b4619b5 100644 --- a/cmd/puppeth/wizard_node.go +++ b/cmd/puppeth/wizard_node.go @@ -65,6 +65,16 @@ func (w *wizard) deployNode(boot bool) { fmt.Printf("Where should data be stored on the remote machine? (default = %s)\n", infos.datadir) infos.datadir = w.readDefaultString(infos.datadir) } + if w.conf.genesis.Config.Ethash != nil { + fmt.Println() + if infos.ethashdir == "" { + fmt.Printf("Where should the ethash mining DAGs be stored on the remote machine?\n") + infos.ethashdir = w.readString() + } else { + fmt.Printf("Where should the ethash mining DAGs be stored on the remote machine? (default = %s)\n", infos.ethashdir) + infos.ethashdir = w.readDefaultString(infos.ethashdir) + } + } // Figure out which port to listen on fmt.Println() fmt.Printf("Which TCP/UDP port to listen on? (default = %d)\n", infos.portFull) -- cgit v1.2.3 From 6eb38e02a8e3bd39ba155df0b40560e384e2c6f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Mon, 23 Oct 2017 12:24:25 +0300 Subject: cmd/puppeth: fix dashboard iframes, extend with new services --- cmd/puppeth/wizard_node.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmd/puppeth/wizard_node.go') diff --git a/cmd/puppeth/wizard_node.go b/cmd/puppeth/wizard_node.go index f1b4619b5..f5b2d7358 100644 --- a/cmd/puppeth/wizard_node.go +++ b/cmd/puppeth/wizard_node.go @@ -65,7 +65,7 @@ func (w *wizard) deployNode(boot bool) { fmt.Printf("Where should data be stored on the remote machine? (default = %s)\n", infos.datadir) infos.datadir = w.readDefaultString(infos.datadir) } - if w.conf.genesis.Config.Ethash != nil { + if w.conf.genesis.Config.Ethash != nil && !boot { fmt.Println() if infos.ethashdir == "" { fmt.Printf("Where should the ethash mining DAGs be stored on the remote machine?\n") -- cgit v1.2.3 From 80be5e546398203c1958a0f512e651a2c36b1fe0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Thu, 26 Oct 2017 12:39:03 +0300 Subject: cmd/puppeth: store genesis locally to persist restarts --- cmd/puppeth/wizard_node.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'cmd/puppeth/wizard_node.go') diff --git a/cmd/puppeth/wizard_node.go b/cmd/puppeth/wizard_node.go index f5b2d7358..a70178db2 100644 --- a/cmd/puppeth/wizard_node.go +++ b/cmd/puppeth/wizard_node.go @@ -29,7 +29,7 @@ import ( // deployNode creates a new node configuration based on some user input. func (w *wizard) deployNode(boot bool) { // Do some sanity check before the user wastes time on input - if w.conf.genesis == nil { + if w.conf.Genesis == nil { log.Error("No genesis block configured") return } @@ -53,8 +53,8 @@ func (w *wizard) deployNode(boot bool) { infos = &nodeInfos{portFull: 30303, peersTotal: 50, peersLight: 0, gasTarget: 4.7, gasPrice: 18} } } - infos.genesis, _ = json.MarshalIndent(w.conf.genesis, "", " ") - infos.network = w.conf.genesis.Config.ChainId.Int64() + infos.genesis, _ = json.MarshalIndent(w.conf.Genesis, "", " ") + infos.network = w.conf.Genesis.Config.ChainId.Int64() // Figure out where the user wants to store the persistent data fmt.Println() @@ -65,7 +65,7 @@ func (w *wizard) deployNode(boot bool) { fmt.Printf("Where should data be stored on the remote machine? (default = %s)\n", infos.datadir) infos.datadir = w.readDefaultString(infos.datadir) } - if w.conf.genesis.Config.Ethash != nil && !boot { + if w.conf.Genesis.Config.Ethash != nil && !boot { fmt.Println() if infos.ethashdir == "" { fmt.Printf("Where should the ethash mining DAGs be stored on the remote machine?\n") @@ -101,7 +101,7 @@ func (w *wizard) deployNode(boot bool) { } // If the node is a miner/signer, load up needed credentials if !boot { - if w.conf.genesis.Config.Ethash != nil { + if w.conf.Genesis.Config.Ethash != nil { // Ethash based miners only need an etherbase to mine against fmt.Println() if infos.etherbase == "" { @@ -116,7 +116,7 @@ func (w *wizard) deployNode(boot bool) { fmt.Printf("What address should the miner user? (default = %s)\n", infos.etherbase) infos.etherbase = w.readDefaultAddress(common.HexToAddress(infos.etherbase)).Hex() } - } else if w.conf.genesis.Config.Clique != nil { + } else if w.conf.Genesis.Config.Clique != nil { // If a previous signer was already set, offer to reuse it if infos.keyJSON != "" { if key, err := keystore.DecryptKey([]byte(infos.keyJSON), infos.keyPass); err != nil { -- cgit v1.2.3 From ffc12f63ec57682e7c7f6653332856acbeef3183 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Fri, 27 Oct 2017 14:36:49 +0300 Subject: cmd/puppeth: simplifications and pre-built docker images --- cmd/puppeth/wizard_node.go | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'cmd/puppeth/wizard_node.go') diff --git a/cmd/puppeth/wizard_node.go b/cmd/puppeth/wizard_node.go index a70178db2..8de1a1b0b 100644 --- a/cmd/puppeth/wizard_node.go +++ b/cmd/puppeth/wizard_node.go @@ -45,6 +45,8 @@ func (w *wizard) deployNode(boot bool) { client := w.servers[server] // Retrieve any active node configurations from the server + existed := true + infos, err := checkNode(client, w.network, boot) if err != nil { if boot { @@ -52,6 +54,7 @@ func (w *wizard) deployNode(boot bool) { } else { infos = &nodeInfos{portFull: 30303, peersTotal: 50, peersLight: 0, gasTarget: 4.7, gasPrice: 18} } + existed = false } infos.genesis, _ = json.MarshalIndent(w.conf.Genesis, "", " ") infos.network = w.conf.Genesis.Config.ChainId.Int64() @@ -155,10 +158,12 @@ func (w *wizard) deployNode(boot bool) { infos.gasPrice = w.readDefaultFloat(infos.gasPrice) } // Try to deploy the full node on the host - fmt.Println() - fmt.Printf("Should the node be built from scratch (y/n)? (default = no)\n") - nocache := w.readDefaultString("n") != "n" - + nocache := false + if existed { + fmt.Println() + fmt.Printf("Should the node be built from scratch (y/n)? (default = no)\n") + nocache = w.readDefaultString("n") != "n" + } if out, err := deployNode(client, w.network, w.conf.bootFull, w.conf.bootLight, infos, nocache); err != nil { log.Error("Failed to deploy Ethereum node container", "err", err) if len(out) > 0 { -- cgit v1.2.3 From a3a2c6b0d9f963c9377612cae1ed6ded6f216c2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Thu, 23 Nov 2017 14:22:59 +0200 Subject: cmd/puppeth: fix typos and review suggestions --- cmd/puppeth/wizard_node.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'cmd/puppeth/wizard_node.go') diff --git a/cmd/puppeth/wizard_node.go b/cmd/puppeth/wizard_node.go index 8de1a1b0b..097e2e41a 100644 --- a/cmd/puppeth/wizard_node.go +++ b/cmd/puppeth/wizard_node.go @@ -45,8 +45,6 @@ func (w *wizard) deployNode(boot bool) { client := w.servers[server] // Retrieve any active node configurations from the server - existed := true - infos, err := checkNode(client, w.network, boot) if err != nil { if boot { @@ -54,8 +52,9 @@ func (w *wizard) deployNode(boot bool) { } else { infos = &nodeInfos{portFull: 30303, peersTotal: 50, peersLight: 0, gasTarget: 4.7, gasPrice: 18} } - existed = false } + existed := err == nil + infos.genesis, _ = json.MarshalIndent(w.conf.Genesis, "", " ") infos.network = w.conf.Genesis.Config.ChainId.Int64() -- cgit v1.2.3