From 832edda709e2d6414e417e8e561b9cc83f8f09bb Mon Sep 17 00:00:00 2001
From: Wei-Ning Huang
Date: Wed, 24 Oct 2018 18:59:48 +0800
Subject: Rename geth -> gdex and fix Dockerfile
---
cmd/puppeth/module_dashboard.go | 46 ++++++++++++++++++++---------------------
cmd/puppeth/module_node.go | 10 ++++-----
cmd/puppeth/module_wallet.go | 4 ++--
3 files changed, 30 insertions(+), 30 deletions(-)
(limited to 'cmd/puppeth')
diff --git a/cmd/puppeth/module_dashboard.go b/cmd/puppeth/module_dashboard.go
index d08bc4396..933150e53 100644
--- a/cmd/puppeth/module_dashboard.go
+++ b/cmd/puppeth/module_dashboard.go
@@ -84,7 +84,7 @@ var dashboardContent = `
{{if .FaucetPage}}{{end}}
- You can download Geth from https://geth.ethereum.org/downloads/.
+ You can download Geth from https://gdex.ethereum.org/downloads/.
@@ -176,11 +176,11 @@ var dashboardContent = `
Initial processing required to synchronize is light, as it only verifies the validity of the headers; similarly required disk capacity is small, tallying around 500 bytes per header. Embedded machines with arbitrary storage, low power CPUs and 128MB+ RAM may work.
To run an embedded node, download {{.GethGenesis}}
and start Geth with:
-
geth --datadir=$HOME/.{{.Network}} init {{.GethGenesis}}
- geth --networkid={{.NetworkID}} --datadir=$HOME/.{{.Network}} --cache=16 --ethash.cachesinmem=1 --syncmode=light{{if .Ethstats}} --ethstats='{{.Ethstats}}'{{end}} --bootnodes={{.BootnodesFlat}}
+ gdex --datadir=$HOME/.{{.Network}} init {{.GethGenesis}}
+ gdex --networkid={{.NetworkID}} --datadir=$HOME/.{{.Network}} --cache=16 --ethash.cachesinmem=1 --syncmode=light{{if .Ethstats}} --ethstats='{{.Ethstats}}'{{end}} --bootnodes={{.BootnodesFlat}}
- You can download Geth from https://geth.ethereum.org/downloads/.
+ You can download Geth from https://gdex.ethereum.org/downloads/.
@@ -205,10 +205,10 @@ var dashboardContent = `
Under the hood the wallet is backed by a go-ethereum full node, meaning that a mid range machine is assumed. Similarly, synchronization is based on fast-sync, which will download all blockchain data from the network and make it available to the wallet. Light nodes cannot currently fully back the wallet, but it's a target actively pursued.
To connect with the Ethereum Wallet, you'll need to initialize your private network first via Geth as the wallet does not currently support calling Geth directly. To initialize your local chain, download {{.GethGenesis}}
and run:
-
geth --datadir=$HOME/.{{.Network}} init {{.GethGenesis}}
+ gdex --datadir=$HOME/.{{.Network}} init {{.GethGenesis}}
With your local chain initialized, you can start the Ethereum Wallet:
-
ethereumwallet --rpc $HOME/.{{.Network}}/geth.ipc --node-networkid={{.NetworkID}} --node-datadir=$HOME/.{{.Network}}{{if .Ethstats}} --node-ethstats='{{.Ethstats}}'{{end}} --node-bootnodes={{.BootnodesFlat}}
+ ethereumwallet --rpc $HOME/.{{.Network}}/gdex.ipc --node-networkid={{.NetworkID}} --node-datadir=$HOME/.{{.Network}}{{if .Ethstats}} --node-ethstats='{{.Ethstats}}'{{end}} --node-bootnodes={{.BootnodesFlat}}
You can download the Ethereum Wallet from https://github.com/ethereum/mist/releases.
@@ -226,10 +226,10 @@ var dashboardContent = `
Under the hood the browser is backed by a go-ethereum full node, meaning that a mid range machine is assumed. Similarly, synchronization is based on fast-sync, which will download all blockchain data from the network and make it available to the wallet. Light nodes cannot currently fully back the wallet, but it's a target actively pursued.
To connect with the Mist browser, you'll need to initialize your private network first via Geth as Mist does not currently support calling Geth directly. To initialize your local chain, download {{.GethGenesis}}
and run:
-
geth --datadir=$HOME/.{{.Network}} init {{.GethGenesis}}
+ gdex --datadir=$HOME/.{{.Network}} init {{.GethGenesis}}
With your local chain initialized, you can start Mist:
-
mist --rpc $HOME/.{{.Network}}/geth.ipc --node-networkid={{.NetworkID}} --node-datadir=$HOME/.{{.Network}}{{if .Ethstats}} --node-ethstats='{{.Ethstats}}'{{end}} --node-bootnodes={{.BootnodesFlat}}
+ mist --rpc $HOME/.{{.Network}}/gdex.ipc --node-networkid={{.NetworkID}} --node-datadir=$HOME/.{{.Network}}{{if .Ethstats}} --node-ethstats='{{.Ethstats}}'{{end}} --node-bootnodes={{.BootnodesFlat}}
You can download the Mist browser from https://github.com/ethereum/mist/releases.
@@ -258,8 +258,8 @@ var dashboardContent = `
The stable Android archives are distributed via Maven Central, and the develop snapshots via the Sonatype repositories. Before proceeding, please ensure you have a recent version configured in your Android project. You can find details in Mobile: Introduction – Android archive.
Before connecting to the Ethereum network, download the {{.GethGenesis}}
genesis json file and either store it in your Android project as a resource file you can access, or save it as a string in a variable. You're going to need to to initialize your client.
- Inside your Java code you can now import the geth archive and connect to Ethereum:
-
import org.ethereum.geth.*;
+ Inside your Java code you can now import the gdex archive and connect to Ethereum:
+
import org.ethereum.gdex.*;
Enodes bootnodes = new Enodes();{{range .Bootnodes}}
bootnodes.append(new Enode("{{.}}"));{{end}}
@@ -289,7 +289,7 @@ node.start();
Both stable and develop builds of the iOS framework are available via CocoaPods. Before proceeding, please ensure you have a recent version configured in your iOS project. You can find details in Mobile: Introduction – iOS framework.
Before connecting to the Ethereum network, download the {{.GethGenesis}}
genesis json file and either store it in your iOS project as a resource file you can access, or save it as a string in a variable. You're going to need to to initialize your client.
- Inside your Swift code you can now import the geth framework and connect to Ethereum (ObjC should be analogous):
+
Inside your Swift code you can now import the gdex framework and connect to Ethereum (ObjC should be analogous):
import Geth
var error: NSError?
@@ -419,7 +419,7 @@ try! node?.start();
Puppeth is a tool to aid you in creating a new Ethereum network down to the genesis block, bootnodes, signers, ethstats server, crypto faucet, wallet browsers, block explorer, dashboard and more; without the hassle that it would normally entail to manually configure all these services one by one.
Puppeth uses ssh to dial in to remote servers, and builds its network components out of docker containers using docker-compose. The user is guided through the process via a command line wizard that does the heavy lifting and topology configuration automatically behind the scenes.
- Puppeth is distributed as part of the Geth & Tools bundles, but can also be installed separately via:
go get github.com/dexon-foundation/dexon/cmd/puppeth
+ Puppeth is distributed as part of the Geth & Tools bundles, but can also be installed separately via:
go get github.com/dexon-foundation/dexon/cmd/puppeth
Copyright 2017. The go-ethereum Authors.
@@ -445,7 +445,7 @@ try! node?.start();
window.location.hash = hash;
// Fade out all possible pages (yes, ugly, no, don't care)
- $("#geth").fadeOut(300)
+ $("#gdex").fadeOut(300)
$("#mist").fadeOut(300)
$("#mobile").fadeOut(300)
$("#other").fadeOut(300)
diff --git a/cmd/puppeth/module_node.go b/cmd/puppeth/module_node.go
index 4013e7360..64f7e52e4 100644
--- a/cmd/puppeth/module_node.go
+++ b/cmd/puppeth/module_node.go
@@ -40,11 +40,11 @@ ADD genesis.json /genesis.json
ADD signer.pass /signer.pass
{{end}}
RUN \
- echo 'geth --cache 512 init /genesis.json' > geth.sh && \{{if .Unlock}}
- echo 'mkdir -p /root/.ethereum/keystore/ && cp /signer.json /root/.ethereum/keystore/' >> geth.sh && \{{end}}
- echo $'exec geth --networkid {{.NetworkID}} --cache 512 --port {{.Port}} --nat extip:{{.IP}} --maxpeers {{.Peers}} {{.LightFlag}} --ethstats \'{{.Ethstats}}\' {{if .Bootnodes}}--bootnodes {{.Bootnodes}}{{end}} {{if .Etherbase}}--miner.etherbase {{.Etherbase}} --mine --miner.threads 1{{end}} {{if .Unlock}}--unlock 0 --password /signer.pass --mine{{end}} --miner.gastarget {{.GasTarget}} --miner.gaslimit {{.GasLimit}} --miner.gasprice {{.GasPrice}}' >> geth.sh
+ echo 'gdex --cache 512 init /genesis.json' > gdex.sh && \{{if .Unlock}}
+ echo 'mkdir -p /root/.ethereum/keystore/ && cp /signer.json /root/.ethereum/keystore/' >> gdex.sh && \{{end}}
+ echo $'exec gdex --networkid {{.NetworkID}} --cache 512 --port {{.Port}} --nat extip:{{.IP}} --maxpeers {{.Peers}} {{.LightFlag}} --ethstats \'{{.Ethstats}}\' {{if .Bootnodes}}--bootnodes {{.Bootnodes}}{{end}} {{if .Etherbase}}--miner.etherbase {{.Etherbase}} --mine --miner.threads 1{{end}} {{if .Unlock}}--unlock 0 --password /signer.pass --mine{{end}} --miner.gastarget {{.GasTarget}} --miner.gaslimit {{.GasLimit}} --miner.gasprice {{.GasPrice}}' >> gdex.sh
-ENTRYPOINT ["/bin/sh", "geth.sh"]
+ENTRYPOINT ["/bin/sh", "gdex.sh"]
`
// nodeComposefile is the docker-compose.yml file required to deploy and maintain
@@ -229,7 +229,7 @@ func checkNode(client *sshClient, network string, boot bool) (*nodeInfos, error)
// Container available, retrieve its node ID and its genesis json
var out []byte
- if out, err = client.Run(fmt.Sprintf("docker exec %s_%s_1 geth --exec admin.nodeInfo.enode --cache=16 attach", network, kind)); err != nil {
+ if out, err = client.Run(fmt.Sprintf("docker exec %s_%s_1 gdex --exec admin.nodeInfo.id --cache=16 attach", network, kind)); err != nil {
return nil, ErrServiceUnreachable
}
enode := bytes.Trim(bytes.TrimSpace(out), "\"")
diff --git a/cmd/puppeth/module_wallet.go b/cmd/puppeth/module_wallet.go
index 1d34779df..0539c19e4 100644
--- a/cmd/puppeth/module_wallet.go
+++ b/cmd/puppeth/module_wallet.go
@@ -36,8 +36,8 @@ ADD genesis.json /genesis.json
RUN \
echo 'node server.js &' > wallet.sh && \
- echo 'geth --cache 512 init /genesis.json' >> wallet.sh && \
- echo $'exec geth --networkid {{.NetworkID}} --port {{.NodePort}} --bootnodes {{.Bootnodes}} --ethstats \'{{.Ethstats}}\' --cache=512 --rpc --rpcaddr=0.0.0.0 --rpccorsdomain "*" --rpcvhosts "*"' >> wallet.sh
+ echo 'gdex --cache 512 init /genesis.json' >> wallet.sh && \
+ echo $'exec gdex --networkid {{.NetworkID}} --port {{.NodePort}} --bootnodes {{.Bootnodes}} --ethstats \'{{.Ethstats}}\' --cache=512 --rpc --rpcaddr=0.0.0.0 --rpccorsdomain "*" --rpcvhosts "*"' >> wallet.sh
RUN \
sed -i 's/PuppethNetworkID/{{.NetworkID}}/g' dist/js/etherwallet-master.js && \
--
cgit v1.2.3