aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/puppeth
diff options
context:
space:
mode:
authorWei-Ning Huang <w@dexon.org>2018-10-24 18:59:48 +0800
committerWei-Ning Huang <w@dexon.org>2019-04-09 21:32:51 +0800
commit832edda709e2d6414e417e8e561b9cc83f8f09bb (patch)
treed797fb233f3fb6758b69d2550440cfad40765e5d /cmd/puppeth
parentd8b0b71610758cc7d218a012f27071937efff60e (diff)
downloaddexon-832edda709e2d6414e417e8e561b9cc83f8f09bb.tar
dexon-832edda709e2d6414e417e8e561b9cc83f8f09bb.tar.gz
dexon-832edda709e2d6414e417e8e561b9cc83f8f09bb.tar.bz2
dexon-832edda709e2d6414e417e8e561b9cc83f8f09bb.tar.lz
dexon-832edda709e2d6414e417e8e561b9cc83f8f09bb.tar.xz
dexon-832edda709e2d6414e417e8e561b9cc83f8f09bb.tar.zst
dexon-832edda709e2d6414e417e8e561b9cc83f8f09bb.zip
Rename geth -> gdex and fix Dockerfile
Diffstat (limited to 'cmd/puppeth')
-rw-r--r--cmd/puppeth/module_dashboard.go46
-rw-r--r--cmd/puppeth/module_node.go10
-rw-r--r--cmd/puppeth/module_wallet.go4
3 files changed, 30 insertions, 30 deletions
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}}<li id="faucet_menu"><a onclick="load('#faucet')"><i class="fa fa-bath"></i> Crypto Faucet</a></li>{{end}}
<li id="connect_menu"><a><i class="fa fa-plug"></i> Connect Yourself</a>
<ul id="connect_list" class="nav child_menu">
- <li><a onclick="$('#connect_menu').removeClass('active'); $('#connect_list').toggle(); load('#geth')">Go Ethereum: Geth</a></li>
+ <li><a onclick="$('#connect_menu').removeClass('active'); $('#connect_list').toggle(); load('#gdex')">Go Ethereum: Geth</a></li>
<li><a onclick="$('#connect_menu').removeClass('active'); $('#connect_list').toggle(); load('#mist')">Go Ethereum: Wallet & Mist</a></li>
<li><a onclick="$('#connect_menu').removeClass('active'); $('#connect_list').toggle(); load('#mobile')">Go Ethereum: Android & iOS</a></li>{{if .Ethash}}
<li><a onclick="$('#connect_menu').removeClass('active'); $('#connect_list').toggle(); load('#other')">Other Ethereum Clients</a></li>{{end}}
@@ -97,7 +97,7 @@ var dashboardContent = `
</div>
</div>
<div class="right_col" role="main" style="padding: 0 !important">
- <div id="geth" hidden style="padding: 16px;">
+ <div id="gdex" hidden style="padding: 16px;">
<div class="page-title">
<div class="title_left">
<h3>Connect Yourself &ndash; Go Ethereum: Geth</h3>
@@ -116,11 +116,11 @@ var dashboardContent = `
<p>Initial processing required to execute all transactions may require non-negligible time and disk capacity required to store all past state may be non-insignificant. High end machines with SSD storage, modern CPUs and 8GB+ RAM are recommended.</p>
<br/>
<p>To run an archive node, download <a href="/{{.GethGenesis}}"><code>{{.GethGenesis}}</code></a> and start Geth with:
- <pre>geth --datadir=$HOME/.{{.Network}} init {{.GethGenesis}}</pre>
- <pre>geth --networkid={{.NetworkID}} --datadir=$HOME/.{{.Network}} --cache=1024 --syncmode=full{{if .Ethstats}} --ethstats='{{.Ethstats}}'{{end}} --bootnodes={{.BootnodesFlat}}</pre>
+ <pre>gdex --datadir=$HOME/.{{.Network}} init {{.GethGenesis}}</pre>
+ <pre>gdex --networkid={{.NetworkID}} --datadir=$HOME/.{{.Network}} --cache=1024 --syncmode=full{{if .Ethstats}} --ethstats='{{.Ethstats}}'{{end}} --bootnodes={{.BootnodesFlat}}</pre>
</p>
<br/>
- <p>You can download Geth from <a href="https://geth.ethereum.org/downloads/" target="about:blank">https://geth.ethereum.org/downloads/</a>.</p>
+ <p>You can download Geth from <a href="https://gdex.ethereum.org/downloads/" target="about:blank">https://gdex.ethereum.org/downloads/</a>.</p>
</div>
</div>
</div>
@@ -135,11 +135,11 @@ var dashboardContent = `
<p>Initial processing required to synchronize is more bandwidth intensive, but is light on the CPU and has significantly reduced disk requirements. Mid range machines with HDD storage, decent CPUs and 4GB+ RAM should be enough.</p>
<br/>
<p>To run a full node, download <a href="/{{.GethGenesis}}"><code>{{.GethGenesis}}</code></a> and start Geth with:
- <pre>geth --datadir=$HOME/.{{.Network}} init {{.GethGenesis}}</pre>
- <pre>geth --networkid={{.NetworkID}} --datadir=$HOME/.{{.Network}} --cache=512{{if .Ethstats}} --ethstats='{{.Ethstats}}'{{end}} --bootnodes={{.BootnodesFlat}}</pre>
+ <pre>gdex --datadir=$HOME/.{{.Network}} init {{.GethGenesis}}</pre>
+ <pre>gdex --networkid={{.NetworkID}} --datadir=$HOME/.{{.Network}} --cache=512{{if .Ethstats}} --ethstats='{{.Ethstats}}'{{end}} --bootnodes={{.BootnodesFlat}}</pre>
</p>
<br/>
- <p>You can download Geth from <a href="https://geth.ethereum.org/downloads/" target="about:blank">https://geth.ethereum.org/downloads/</a>.</p>
+ <p>You can download Geth from <a href="https://gdex.ethereum.org/downloads/" target="about:blank">https://gdex.ethereum.org/downloads/</a>.</p>
</div>
</div>
</div>
@@ -157,11 +157,11 @@ var dashboardContent = `
<p>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. Low end machines with arbitrary storage, weak CPUs and 512MB+ RAM should cope well.</p>
<br/>
<p>To run a light node, download <a href="/{{.GethGenesis}}"><code>{{.GethGenesis}}</code></a> and start Geth with:
- <pre>geth --datadir=$HOME/.{{.Network}} init {{.GethGenesis}}</pre>
- <pre>geth --networkid={{.NetworkID}} --datadir=$HOME/.{{.Network}} --syncmode=light{{if .Ethstats}} --ethstats='{{.Ethstats}}'{{end}} --bootnodes={{.BootnodesFlat}}</pre>
+ <pre>gdex --datadir=$HOME/.{{.Network}} init {{.GethGenesis}}</pre>
+ <pre>gdex --networkid={{.NetworkID}} --datadir=$HOME/.{{.Network}} --syncmode=light{{if .Ethstats}} --ethstats='{{.Ethstats}}'{{end}} --bootnodes={{.BootnodesFlat}}</pre>
</p>
<br/>
- <p>You can download Geth from <a href="https://geth.ethereum.org/downloads/" target="about:blank">https://geth.ethereum.org/downloads/</a>.</p>
+ <p>You can download Geth from <a href="https://gdex.ethereum.org/downloads/" target="about:blank">https://gdex.ethereum.org/downloads/</a>.</p>
</div>
</div>
</div>
@@ -176,11 +176,11 @@ var dashboardContent = `
<p>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.</p>
<br/>
<p>To run an embedded node, download <a href="/{{.GethGenesis}}"><code>{{.GethGenesis}}</code></a> and start Geth with:
- <pre>geth --datadir=$HOME/.{{.Network}} init {{.GethGenesis}}</pre>
- <pre>geth --networkid={{.NetworkID}} --datadir=$HOME/.{{.Network}} --cache=16 --ethash.cachesinmem=1 --syncmode=light{{if .Ethstats}} --ethstats='{{.Ethstats}}'{{end}} --bootnodes={{.BootnodesFlat}}</pre>
+ <pre>gdex --datadir=$HOME/.{{.Network}} init {{.GethGenesis}}</pre>
+ <pre>gdex --networkid={{.NetworkID}} --datadir=$HOME/.{{.Network}} --cache=16 --ethash.cachesinmem=1 --syncmode=light{{if .Ethstats}} --ethstats='{{.Ethstats}}'{{end}} --bootnodes={{.BootnodesFlat}}</pre>
</p>
<br/>
- <p>You can download Geth from <a href="https://geth.ethereum.org/downloads/" target="about:blank">https://geth.ethereum.org/downloads/</a>.</p>
+ <p>You can download Geth from <a href="https://gdex.ethereum.org/downloads/" target="about:blank">https://gdex.ethereum.org/downloads/</a>.</p>
</div>
</div>
</div>
@@ -205,10 +205,10 @@ var dashboardContent = `
<p>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 <strong>fast-sync</strong>, 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.</p>
<br/>
<p>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 <a href="/{{.GethGenesis}}"><code>{{.GethGenesis}}</code></a> and run:
- <pre>geth --datadir=$HOME/.{{.Network}} init {{.GethGenesis}}</pre>
+ <pre>gdex --datadir=$HOME/.{{.Network}} init {{.GethGenesis}}</pre>
</p>
<p>With your local chain initialized, you can start the Ethereum Wallet:
- <pre>ethereumwallet --rpc $HOME/.{{.Network}}/geth.ipc --node-networkid={{.NetworkID}} --node-datadir=$HOME/.{{.Network}}{{if .Ethstats}} --node-ethstats='{{.Ethstats}}'{{end}} --node-bootnodes={{.BootnodesFlat}}</pre>
+ <pre>ethereumwallet --rpc $HOME/.{{.Network}}/gdex.ipc --node-networkid={{.NetworkID}} --node-datadir=$HOME/.{{.Network}}{{if .Ethstats}} --node-ethstats='{{.Ethstats}}'{{end}} --node-bootnodes={{.BootnodesFlat}}</pre>
<p>
<br/>
<p>You can download the Ethereum Wallet from <a href="https://github.com/ethereum/mist/releases" target="about:blank">https://github.com/ethereum/mist/releases</a>.</p>
@@ -226,10 +226,10 @@ var dashboardContent = `
<p>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 <strong>fast-sync</strong>, 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.</p>
<br/>
<p>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 <a href="/{{.GethGenesis}}"><code>{{.GethGenesis}}</code></a> and run:
- <pre>geth --datadir=$HOME/.{{.Network}} init {{.GethGenesis}}</pre>
+ <pre>gdex --datadir=$HOME/.{{.Network}} init {{.GethGenesis}}</pre>
</p>
<p>With your local chain initialized, you can start Mist:
- <pre>mist --rpc $HOME/.{{.Network}}/geth.ipc --node-networkid={{.NetworkID}} --node-datadir=$HOME/.{{.Network}}{{if .Ethstats}} --node-ethstats='{{.Ethstats}}'{{end}} --node-bootnodes={{.BootnodesFlat}}</pre>
+ <pre>mist --rpc $HOME/.{{.Network}}/gdex.ipc --node-networkid={{.NetworkID}} --node-datadir=$HOME/.{{.Network}}{{if .Ethstats}} --node-ethstats='{{.Ethstats}}'{{end}} --node-bootnodes={{.BootnodesFlat}}</pre>
<p>
<br/>
<p>You can download the Mist browser from <a href="https://github.com/ethereum/mist/releases" target="about:blank">https://github.com/ethereum/mist/releases</a>.</p>
@@ -258,8 +258,8 @@ var dashboardContent = `
<br/>
<p>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 <a href="https://github.com/dexon-foundation/dexon/wiki/Mobile:-Introduction#android-archive" target="about:blank">Mobile: Introduction &ndash; Android archive</a>.
<p>Before connecting to the Ethereum network, download the <a href="/{{.GethGenesis}}"><code>{{.GethGenesis}}</code></a> 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.</p>
- <p>Inside your Java code you can now import the geth archive and connect to Ethereum:
- <pre>import org.ethereum.geth.*;</pre>
+ <p>Inside your Java code you can now import the gdex archive and connect to Ethereum:
+ <pre>import org.ethereum.gdex.*;</pre>
<pre>
Enodes bootnodes = new Enodes();{{range .Bootnodes}}
bootnodes.append(new Enode("{{.}}"));{{end}}
@@ -289,7 +289,7 @@ node.start();
<br/>
<p>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 <a href="https://github.com/dexon-foundation/dexon/wiki/Mobile:-Introduction#ios-framework" target="about:blank">Mobile: Introduction &ndash; iOS framework</a>.
<p>Before connecting to the Ethereum network, download the <a href="/{{.GethGenesis}}"><code>{{.GethGenesis}}</code></a> 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.</p>
- <p>Inside your Swift code you can now import the geth framework and connect to Ethereum (ObjC should be analogous):
+ <p>Inside your Swift code you can now import the gdex framework and connect to Ethereum (ObjC should be analogous):
<pre>import Geth</pre>
<pre>
var error: NSError?
@@ -419,7 +419,7 @@ try! node?.start();
<p>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.</p>
<p>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.</p>
<br/>
- <p>Puppeth is distributed as part of the <a href="https://geth.ethereum.org/downloads/" target="about:blank">Geth &amp; Tools</a> bundles, but can also be installed separately via:<pre>go get github.com/dexon-foundation/dexon/cmd/puppeth</pre></p>
+ <p>Puppeth is distributed as part of the <a href="https://gdex.ethereum.org/downloads/" target="about:blank">Geth &amp; Tools</a> bundles, but can also be installed separately via:<pre>go get github.com/dexon-foundation/dexon/cmd/puppeth</pre></p>
<br/>
<p><em>Copyright 2017. The go-ethereum Authors.</em></p>
</div>
@@ -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 && \