diff options
-rw-r--r-- | Dockerfile | 8 | ||||
-rw-r--r-- | Makefile | 122 | ||||
-rw-r--r-- | README.md | 61 | ||||
-rw-r--r-- | cmd/faucet/faucet.go | 2 | ||||
-rw-r--r-- | cmd/gdex/accountcmd.go (renamed from cmd/geth/accountcmd.go) | 14 | ||||
-rw-r--r-- | cmd/gdex/accountcmd_test.go (renamed from cmd/geth/accountcmd_test.go) | 102 | ||||
-rw-r--r-- | cmd/gdex/bugcmd.go (renamed from cmd/geth/bugcmd.go) | 2 | ||||
-rw-r--r-- | cmd/gdex/chaincmd.go (renamed from cmd/geth/chaincmd.go) | 0 | ||||
-rw-r--r-- | cmd/gdex/config.go (renamed from cmd/geth/config.go) | 2 | ||||
-rw-r--r-- | cmd/gdex/consolecmd.go (renamed from cmd/geth/consolecmd.go) | 22 | ||||
-rw-r--r-- | cmd/gdex/consolecmd_test.go (renamed from cmd/geth/consolecmd_test.go) | 56 | ||||
-rw-r--r-- | cmd/gdex/dao_test.go (renamed from cmd/geth/dao_test.go) | 6 | ||||
-rw-r--r-- | cmd/gdex/genesis_test.go (renamed from cmd/geth/genesis_test.go) | 6 | ||||
-rw-r--r-- | cmd/gdex/main.go (renamed from cmd/geth/main.go) | 10 | ||||
-rw-r--r-- | cmd/gdex/misccmd.go (renamed from cmd/geth/misccmd.go) | 6 | ||||
-rw-r--r-- | cmd/gdex/monitorcmd.go (renamed from cmd/geth/monitorcmd.go) | 6 | ||||
-rw-r--r-- | cmd/gdex/run_test.go (renamed from cmd/geth/run_test.go) | 18 | ||||
-rw-r--r-- | cmd/gdex/testdata/empty.js (renamed from cmd/geth/testdata/empty.js) | 0 | ||||
-rw-r--r-- | cmd/gdex/testdata/guswallet.json (renamed from cmd/geth/testdata/guswallet.json) | 0 | ||||
-rw-r--r-- | cmd/gdex/testdata/passwords.txt (renamed from cmd/geth/testdata/passwords.txt) | 0 | ||||
-rw-r--r-- | cmd/gdex/testdata/wrong-passwords.txt (renamed from cmd/geth/testdata/wrong-passwords.txt) | 0 | ||||
-rw-r--r-- | cmd/gdex/usage.go (renamed from cmd/geth/usage.go) | 2 | ||||
-rw-r--r-- | cmd/monkey/key | 1 | ||||
-rw-r--r-- | cmd/puppeth/module_dashboard.go | 46 | ||||
-rw-r--r-- | cmd/puppeth/module_node.go | 10 | ||||
-rw-r--r-- | cmd/puppeth/module_wallet.go | 4 | ||||
-rw-r--r-- | cmd/swarm/config.go | 2 | ||||
-rw-r--r-- | cmd/swarm/config_test.go | 12 | ||||
-rw-r--r-- | cmd/swarm/main.go | 6 | ||||
-rw-r--r-- | cmd/utils/flags.go | 10 | ||||
-rwxr-xr-x | test/run_test.sh | 10 |
31 files changed, 273 insertions, 273 deletions
diff --git a/Dockerfile b/Dockerfile index e87dd35d3..04648a8f2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,10 @@ # Build Geth in a stock Go builder container FROM golang:1.11-alpine as builder -RUN apk add --no-cache make gcc musl-dev linux-headers +RUN apk add --no-cache make gcc musl-dev linux-headers g++ gmp-dev openssl-dev -ADD . /go-ethereum -RUN cd /go-ethereum && make geth +ADD . /dexon +RUN cd /dexon && DOCKER=alpine make gdex # Pull Geth into a second stage deploy alpine container FROM alpine:latest @@ -13,4 +13,4 @@ RUN apk add --no-cache ca-certificates COPY --from=builder /go-ethereum/build/bin/geth /usr/local/bin/ EXPOSE 8545 8546 30303 30303/udp -ENTRYPOINT ["geth"] +ENTRYPOINT ["gdex"] @@ -2,19 +2,19 @@ # with Go source code. If you know what GOPATH is then you probably # don't need to bother with make. -.PHONY: geth android ios geth-cross swarm evm all test clean -.PHONY: geth-linux geth-linux-386 geth-linux-amd64 geth-linux-mips64 geth-linux-mips64le -.PHONY: geth-linux-arm geth-linux-arm-5 geth-linux-arm-6 geth-linux-arm-7 geth-linux-arm64 -.PHONY: geth-darwin geth-darwin-386 geth-darwin-amd64 -.PHONY: geth-windows geth-windows-386 geth-windows-amd64 +.PHONY: gdex android ios gdex-cross swarm evm all test clean +.PHONY: gdex-linux gdex-linux-386 gdex-linux-amd64 gdex-linux-mips64 gdex-linux-mips64le +.PHONY: gdex-linux-arm gdex-linux-arm-5 gdex-linux-arm-6 gdex-linux-arm-7 gdex-linux-arm64 +.PHONY: gdex-darwin gdex-darwin-386 gdex-darwin-amd64 +.PHONY: gdex-windows gdex-windows-386 gdex-windows-amd64 GOBIN = $(shell pwd)/build/bin GO ?= latest -geth: libbls - build/env.sh go run build/ci.go install ./cmd/geth +gdex: libbls + build/env.sh go run build/ci.go install ./cmd/gdex @echo "Done building." - @echo "Run \"$(GOBIN)/geth\" to launch geth." + @echo "Run \"$(GOBIN)/gdex\" to launch gdex." swarm: build/env.sh go run build/ci.go install ./cmd/swarm @@ -27,7 +27,7 @@ all: android: build/env.sh go run build/ci.go aar --local @echo "Done building." - @echo "Import \"$(GOBIN)/geth.aar\" to use the library." + @echo "Import \"$(GOBIN)/gdex.aar\" to use the library." ios: build/env.sh go run build/ci.go xcode --local @@ -65,92 +65,92 @@ swarm-devtools: # Cross Compilation Targets (xgo) -geth-cross: geth-linux geth-darwin geth-windows geth-android geth-ios +gdex-cross: gdex-linux gdex-darwin gdex-windows gdex-android gdex-ios @echo "Full cross compilation done:" - @ls -ld $(GOBIN)/geth-* + @ls -ld $(GOBIN)/gdex-* -geth-linux: geth-linux-386 geth-linux-amd64 geth-linux-arm geth-linux-mips64 geth-linux-mips64le +gdex-linux: gdex-linux-386 gdex-linux-amd64 gdex-linux-arm gdex-linux-mips64 gdex-linux-mips64le @echo "Linux cross compilation done:" - @ls -ld $(GOBIN)/geth-linux-* + @ls -ld $(GOBIN)/gdex-linux-* -geth-linux-386: - build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=linux/386 -v ./cmd/geth +gdex-linux-386: + build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=linux/386 -v ./cmd/gdex @echo "Linux 386 cross compilation done:" - @ls -ld $(GOBIN)/geth-linux-* | grep 386 + @ls -ld $(GOBIN)/gdex-linux-* | grep 386 -geth-linux-amd64: - build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=linux/amd64 -v ./cmd/geth +gdex-linux-amd64: + build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=linux/amd64 -v ./cmd/gdex @echo "Linux amd64 cross compilation done:" - @ls -ld $(GOBIN)/geth-linux-* | grep amd64 + @ls -ld $(GOBIN)/gdex-linux-* | grep amd64 -geth-linux-arm: geth-linux-arm-5 geth-linux-arm-6 geth-linux-arm-7 geth-linux-arm64 +gdex-linux-arm: gdex-linux-arm-5 gdex-linux-arm-6 gdex-linux-arm-7 gdex-linux-arm64 @echo "Linux ARM cross compilation done:" - @ls -ld $(GOBIN)/geth-linux-* | grep arm + @ls -ld $(GOBIN)/gdex-linux-* | grep arm -geth-linux-arm-5: - build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=linux/arm-5 -v ./cmd/geth +gdex-linux-arm-5: + build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=linux/arm-5 -v ./cmd/gdex @echo "Linux ARMv5 cross compilation done:" - @ls -ld $(GOBIN)/geth-linux-* | grep arm-5 + @ls -ld $(GOBIN)/gdex-linux-* | grep arm-5 -geth-linux-arm-6: - build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=linux/arm-6 -v ./cmd/geth +gdex-linux-arm-6: + build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=linux/arm-6 -v ./cmd/gdex @echo "Linux ARMv6 cross compilation done:" - @ls -ld $(GOBIN)/geth-linux-* | grep arm-6 + @ls -ld $(GOBIN)/gdex-linux-* | grep arm-6 -geth-linux-arm-7: - build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=linux/arm-7 -v ./cmd/geth +gdex-linux-arm-7: + build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=linux/arm-7 -v ./cmd/gdex @echo "Linux ARMv7 cross compilation done:" - @ls -ld $(GOBIN)/geth-linux-* | grep arm-7 + @ls -ld $(GOBIN)/gdex-linux-* | grep arm-7 -geth-linux-arm64: - build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=linux/arm64 -v ./cmd/geth +gdex-linux-arm64: + build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=linux/arm64 -v ./cmd/gdex @echo "Linux ARM64 cross compilation done:" - @ls -ld $(GOBIN)/geth-linux-* | grep arm64 + @ls -ld $(GOBIN)/gdex-linux-* | grep arm64 -geth-linux-mips: - build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=linux/mips --ldflags '-extldflags "-static"' -v ./cmd/geth +gdex-linux-mips: + build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=linux/mips --ldflags '-extldflags "-static"' -v ./cmd/gdex @echo "Linux MIPS cross compilation done:" - @ls -ld $(GOBIN)/geth-linux-* | grep mips + @ls -ld $(GOBIN)/gdex-linux-* | grep mips -geth-linux-mipsle: - build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=linux/mipsle --ldflags '-extldflags "-static"' -v ./cmd/geth +gdex-linux-mipsle: + build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=linux/mipsle --ldflags '-extldflags "-static"' -v ./cmd/gdex @echo "Linux MIPSle cross compilation done:" - @ls -ld $(GOBIN)/geth-linux-* | grep mipsle + @ls -ld $(GOBIN)/gdex-linux-* | grep mipsle -geth-linux-mips64: - build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=linux/mips64 --ldflags '-extldflags "-static"' -v ./cmd/geth +gdex-linux-mips64: + build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=linux/mips64 --ldflags '-extldflags "-static"' -v ./cmd/gdex @echo "Linux MIPS64 cross compilation done:" - @ls -ld $(GOBIN)/geth-linux-* | grep mips64 + @ls -ld $(GOBIN)/gdex-linux-* | grep mips64 -geth-linux-mips64le: - build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=linux/mips64le --ldflags '-extldflags "-static"' -v ./cmd/geth +gdex-linux-mips64le: + build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=linux/mips64le --ldflags '-extldflags "-static"' -v ./cmd/gdex @echo "Linux MIPS64le cross compilation done:" - @ls -ld $(GOBIN)/geth-linux-* | grep mips64le + @ls -ld $(GOBIN)/gdex-linux-* | grep mips64le -geth-darwin: geth-darwin-386 geth-darwin-amd64 +gdex-darwin: gdex-darwin-386 gdex-darwin-amd64 @echo "Darwin cross compilation done:" - @ls -ld $(GOBIN)/geth-darwin-* + @ls -ld $(GOBIN)/gdex-darwin-* -geth-darwin-386: - build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=darwin/386 -v ./cmd/geth +gdex-darwin-386: + build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=darwin/386 -v ./cmd/gdex @echo "Darwin 386 cross compilation done:" - @ls -ld $(GOBIN)/geth-darwin-* | grep 386 + @ls -ld $(GOBIN)/gdex-darwin-* | grep 386 -geth-darwin-amd64: - build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=darwin/amd64 -v ./cmd/geth +gdex-darwin-amd64: + build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=darwin/amd64 -v ./cmd/gdex @echo "Darwin amd64 cross compilation done:" - @ls -ld $(GOBIN)/geth-darwin-* | grep amd64 + @ls -ld $(GOBIN)/gdex-darwin-* | grep amd64 -geth-windows: geth-windows-386 geth-windows-amd64 +gdex-windows: gdex-windows-386 gdex-windows-amd64 @echo "Windows cross compilation done:" - @ls -ld $(GOBIN)/geth-windows-* + @ls -ld $(GOBIN)/gdex-windows-* -geth-windows-386: - build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=windows/386 -v ./cmd/geth +gdex-windows-386: + build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=windows/386 -v ./cmd/gdex @echo "Windows 386 cross compilation done:" - @ls -ld $(GOBIN)/geth-windows-* | grep 386 + @ls -ld $(GOBIN)/gdex-windows-* | grep 386 -geth-windows-amd64: - build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=windows/amd64 -v ./cmd/geth +gdex-windows-amd64: + build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=windows/amd64 -v ./cmd/gdex @echo "Windows amd64 cross compilation done:" - @ls -ld $(GOBIN)/geth-windows-* | grep amd64 + @ls -ld $(GOBIN)/gdex-windows-* | grep amd64 @@ -1,16 +1,15 @@ -## Go Ethereum +## Dexon -Official golang implementation of the Ethereum protocol. +Official golang implementation of the DEXON fullnode. [![API Reference]( https://camo.githubusercontent.com/915b7be44ada53c290eb157634330494ebe3e30a/68747470733a2f2f676f646f632e6f72672f6769746875622e636f6d2f676f6c616e672f6764646f3f7374617475732e737667 )](https://godoc.org/github.com/dexon-foundation/dexon) [![Go Report Card](https://goreportcard.com/badge/github.com/dexon-foundation/dexon)](https://goreportcard.com/report/github.com/dexon-foundation/dexon) -[![Travis](https://travis-ci.org/ethereum/go-ethereum.svg?branch=master)](https://travis-ci.org/ethereum/go-ethereum) -[![Discord](https://img.shields.io/badge/discord-join%20chat-blue.svg)](https://discord.gg/nthXNEv) +[![Travis](https://travis-ci.org/dexon-foundation/dexon.svg?branch=master)](https://travis-ci.org/dexon-foundation/dexon) Automated builds are available for stable releases and the unstable master branch. -Binary archives are published at https://geth.ethereum.org/downloads/. +Binary archives are published at https://gdex.ethereum.org/downloads/. ## Building the source @@ -18,11 +17,11 @@ For prerequisites and detailed build instructions please read the [Installation Instructions](https://github.com/dexon-foundation/dexon/wiki/Building-Ethereum) on the wiki. -Building geth requires both a Go (version 1.9 or later) and a C compiler. +Building gdex requires both a Go (version 1.9 or later) and a C compiler. You can install them using your favourite package manager. Once the dependencies are installed, run - make geth + make gdex or, to build the full suite of utilities: @@ -30,11 +29,11 @@ or, to build the full suite of utilities: ## Executables -The go-ethereum project comes with several wrappers/executables found in the `cmd` directory. +The dexon project comes with several wrappers/executables found in the `cmd` directory. | Command | Description | |:----------:|-------------| -| **`geth`** | Our main Ethereum CLI client. It is the entry point into the Ethereum network (main-, test- or private net), capable of running as a full node (default), archive node (retaining all historical state) or a light node (retrieving data live). It can be used by other processes as a gateway into the Ethereum network via JSON RPC endpoints exposed on top of HTTP, WebSocket and/or IPC transports. `geth --help` and the [CLI Wiki page](https://github.com/dexon-foundation/dexon/wiki/Command-Line-Options) for command line options. | +| **`gdex`** | Our main Ethereum CLI client. It is the entry point into the Ethereum network (main-, test- or private net), capable of running as a full node (default), archive node (retaining all historical state) or a light node (retrieving data live). It can be used by other processes as a gateway into the Ethereum network via JSON RPC endpoints exposed on top of HTTP, WebSocket and/or IPC transports. `gdex --help` and the [CLI Wiki page](https://github.com/dexon-foundation/dexon/wiki/Command-Line-Options) for command line options. | | `abigen` | Source code generator to convert Ethereum contract definitions into easy to use, compile-time type-safe Go packages. It operates on plain [Ethereum contract ABIs](https://github.com/ethereum/wiki/wiki/Ethereum-Contract-ABI) with expanded functionality if the contract bytecode is also available. However it also accepts Solidity source files, making development much more streamlined. Please see our [Native DApps](https://github.com/dexon-foundation/dexon/wiki/Native-DApps:-Go-bindings-to-Ethereum-contracts) wiki page for details. | | `bootnode` | Stripped down version of our Ethereum client implementation that only takes part in the network node discovery protocol, but does not run any of the higher level application protocols. It can be used as a lightweight bootstrap node to aid in finding peers in private networks. | | `evm` | Developer utility version of the EVM (Ethereum Virtual Machine) that is capable of running bytecode snippets within a configurable environment and execution mode. Its purpose is to allow isolated, fine-grained debugging of EVM opcodes (e.g. `evm --code 60ff60ff --debug`). | @@ -43,7 +42,7 @@ The go-ethereum project comes with several wrappers/executables found in the `cm | `swarm` | Swarm daemon and tools. This is the entrypoint for the Swarm network. `swarm --help` for command line options and subcommands. See [Swarm README](https://github.com/dexon-foundation/dexon/tree/master/swarm) for more information. | | `puppeth` | a CLI wizard that aids in creating a new Ethereum network. | -## Running geth +## Running gdex Going through all the possible command line flags is out of scope here (please consult our [CLI Wiki page](https://github.com/dexon-foundation/dexon/wiki/Command-Line-Options)), but we've @@ -58,19 +57,19 @@ the user doesn't care about years-old historical data, so we can fast-sync quick state of the network. To do so: ``` -$ geth console +$ gdex console ``` This command will: - * Start geth in fast sync mode (default, can be changed with the `--syncmode` flag), causing it to + * Start gdex in fast sync mode (default, can be changed with the `--syncmode` flag), causing it to download more data in exchange for avoiding processing the entire history of the Ethereum network, which is very CPU intensive. * Start up Geth's built-in interactive [JavaScript console](https://github.com/dexon-foundation/dexon/wiki/JavaScript-Console), (via the trailing `console` subcommand) through which you can invoke all official [`web3` methods](https://github.com/ethereum/wiki/wiki/JavaScript-API) as well as Geth's own [management APIs](https://github.com/dexon-foundation/dexon/wiki/Management-APIs). This tool is optional and if you leave it out you can always attach to an already running Geth instance - with `geth attach`. + with `gdex attach`. ### Full node on the Ethereum test network @@ -80,7 +79,7 @@ entire system. In other words, instead of attaching to the main network, you wan network with your node, which is fully equivalent to the main network, but with play-Ether only. ``` -$ geth --testnet console +$ gdex --testnet console ``` The `console` subcommand have the exact same meaning as above and they are equally useful on the @@ -91,8 +90,8 @@ Specifying the `--testnet` flag however will reconfigure your Geth instance a bi * Instead of using the default data directory (`~/.ethereum` on Linux for example), Geth will nest itself one level deeper into a `testnet` subfolder (`~/.ethereum/testnet` on Linux). Note, on OSX and Linux this also means that attaching to a running testnet node requires the use of a custom - endpoint since `geth attach` will try to attach to a production node endpoint by default. E.g. - `geth attach <datadir>/testnet/geth.ipc`. Windows users are not affected by this. + endpoint since `gdex attach` will try to attach to a production node endpoint by default. E.g. + `gdex attach <datadir>/testnet/gdex.ipc`. Windows users are not affected by this. * Instead of connecting the main Ethereum network, the client will connect to the test network, which uses different P2P bootnodes, different network IDs and genesis states. @@ -103,27 +102,27 @@ separate the two networks and will not make any accounts available between them. ### Full node on the Rinkeby test network -The above test network is a cross client one based on the ethash proof-of-work consensus algorithm. As such, it has certain extra overhead and is more susceptible to reorganization attacks due to the network's low difficulty / security. Go Ethereum also supports connecting to a proof-of-authority based test network called [*Rinkeby*](https://www.rinkeby.io) (operated by members of the community). This network is lighter, more secure, but is only supported by go-ethereum. +The above test network is a cross client one based on the ethash proof-of-work consensus algorithm. As such, it has certain extra overhead and is more susceptible to reorganization attacks due to the network's low difficulty / security. Go Ethereum also supports connecting to a proof-of-authority based test network called [*Rinkeby*](https://www.rinkeby.io) (operated by members of the community). This network is lighter, more secure, but is only supported by dexon. ``` -$ geth --rinkeby console +$ gdex --rinkeby console ``` ### Configuration -As an alternative to passing the numerous flags to the `geth` binary, you can also pass a configuration file via: +As an alternative to passing the numerous flags to the `gdex` binary, you can also pass a configuration file via: ``` -$ geth --config /path/to/your_config.toml +$ gdex --config /path/to/your_config.toml ``` To get an idea how the file should look like you can use the `dumpconfig` subcommand to export your existing configuration: ``` -$ geth --your-favourite-flags dumpconfig +$ gdex --your-favourite-flags dumpconfig ``` -*Note: This works only with geth v1.6.0 and above.* +*Note: This works only with gdex v1.6.0 and above.* #### Docker quick start @@ -135,9 +134,9 @@ docker run -d --name ethereum-node -v /Users/alice/ethereum:/root \ ethereum/client-go ``` -This will start geth in fast-sync mode with a DB memory allowance of 1GB just as the above command does. It will also create a persistent volume in your home directory for saving your blockchain as well as map the default ports. There is also an `alpine` tag available for a slim version of the image. +This will start gdex in fast-sync mode with a DB memory allowance of 1GB just as the above command does. It will also create a persistent volume in your home directory for saving your blockchain as well as map the default ports. There is also an `alpine` tag available for a slim version of the image. -Do not forget `--rpcaddr 0.0.0.0`, if you want to access RPC from other containers and/or hosts. By default, `geth` binds to the local interface and RPC endpoints is not accessible from the outside. +Do not forget `--rpcaddr 0.0.0.0`, if you want to access RPC from other containers and/or hosts. By default, `gdex` binds to the local interface and RPC endpoints is not accessible from the outside. ### Programatically interfacing Geth nodes @@ -222,7 +221,7 @@ With the genesis state defined in the above JSON file, you'll need to initialize with it prior to starting it up to ensure all blockchain parameters are correctly set: ``` -$ geth init path/to/genesis.json +$ gdex init path/to/genesis.json ``` #### Creating the rendezvous point @@ -251,7 +250,7 @@ via the `--bootnodes` flag. It will probably also be desirable to keep the data private network separated, so do also specify a custom `--datadir` flag. ``` -$ geth --datadir=path/to/custom/data/folder --bootnodes=<bootnode-enode-url-from-above> +$ gdex --datadir=path/to/custom/data/folder --bootnodes=<bootnode-enode-url-from-above> ``` *Note: Since your network will be completely cut off from the main and test networks, you'll also @@ -270,7 +269,7 @@ resources (consider running on a single thread, no need for multiple ones either instance for mining, run it with all your usual flags, extended by: ``` -$ geth <usual-flags> --mine --minerthreads=1 --etherbase=0x0000000000000000000000000000000000000000 +$ gdex <usual-flags> --mine --minerthreads=1 --etherbase=0x0000000000000000000000000000000000000000 ``` Which will start mining blocks and transactions on a single CPU thread, crediting all proceedings to @@ -282,9 +281,9 @@ limit blocks converge to (`--targetgaslimit`) and the price transactions are acc Thank you for considering to help out with the source code! We welcome contributions from anyone on the internet, and are grateful for even the smallest of fixes! -If you'd like to contribute to go-ethereum, please fork, fix, commit and send a pull request +If you'd like to contribute to dexon, please fork, fix, commit and send a pull request for the maintainers to review and merge into the main code base. If you wish to submit more -complex changes though, please check up with the core devs first on [our gitter channel](https://gitter.im/ethereum/go-ethereum) +complex changes though, please check up with the core devs first on [our gitter channel](https://gitter.im/ethereum/dexon) to ensure those changes are in line with the general philosophy of the project and/or get some early feedback which can make both your efforts much lighter as well as our review and merge procedures quick and simple. @@ -302,10 +301,10 @@ for more details on configuring your environment, managing project dependencies ## License -The go-ethereum library (i.e. all code outside of the `cmd` directory) is licensed under the +The dexon library (i.e. all code outside of the `cmd` directory) is licensed under the [GNU Lesser General Public License v3.0](https://www.gnu.org/licenses/lgpl-3.0.en.html), also included in our repository in the `COPYING.LESSER` file. -The go-ethereum binaries (i.e. all code inside of the `cmd` directory) is licensed under the +The dexon binaries (i.e. all code inside of the `cmd` directory) is licensed under the [GNU General Public License v3.0](https://www.gnu.org/licenses/gpl-3.0.en.html), also included in our repository in the `COPYING` file. diff --git a/cmd/faucet/faucet.go b/cmd/faucet/faucet.go index 5bed58e11..238d6884d 100644 --- a/cmd/faucet/faucet.go +++ b/cmd/faucet/faucet.go @@ -215,7 +215,7 @@ type faucet struct { func newFaucet(genesis *core.Genesis, port int, enodes []*discv5.Node, network uint64, stats string, ks *keystore.KeyStore, index []byte) (*faucet, error) { // Assemble the raw devp2p protocol stack stack, err := node.New(&node.Config{ - Name: "geth", + Name: "gdex", Version: params.VersionWithMeta, DataDir: filepath.Join(os.Getenv("HOME"), ".faucet"), P2P: p2p.Config{ diff --git a/cmd/geth/accountcmd.go b/cmd/gdex/accountcmd.go index bf6d9140d..d910831d7 100644 --- a/cmd/geth/accountcmd.go +++ b/cmd/gdex/accountcmd.go @@ -36,7 +36,7 @@ var ( ArgsUsage: "", Category: "ACCOUNT COMMANDS", Description: ` - geth wallet import /path/to/my/presale.wallet + gdex wallet import /path/to/my/presale.wallet will prompt for your password and imports your ether presale account. It can be used non-interactively with the --password option taking a @@ -56,7 +56,7 @@ passwordfile as argument containing the wallet password in plaintext.`, utils.LightKDFFlag, }, Description: ` - geth wallet [options] /path/to/my/presale.wallet + gdex wallet [options] /path/to/my/presale.wallet will prompt for your password and imports your ether presale account. It can be used non-interactively with the --password option taking a @@ -112,7 +112,7 @@ Print a short summary of all accounts`, utils.LightKDFFlag, }, Description: ` - geth account new + gdex account new Creates a new account and prints the address. @@ -137,7 +137,7 @@ password to file or expose in any other way. utils.LightKDFFlag, }, Description: ` - geth account update <address> + gdex account update <address> Update an existing account. @@ -149,7 +149,7 @@ format to the newest format or change the password for an account. For non-interactive use the passphrase can be specified with the --password flag: - geth account update [options] <address> + gdex account update [options] <address> Since only one password can be given, only format update can be performed, changing your password is only possible interactively. @@ -167,7 +167,7 @@ changing your password is only possible interactively. }, ArgsUsage: "<keyFile>", Description: ` - geth account import <keyfile> + gdex account import <keyfile> Imports an unencrypted private key from <keyfile> and creates a new account. Prints the address. @@ -180,7 +180,7 @@ You must remember this passphrase to unlock your account in the future. For non-interactive use the passphrase can be specified with the -password flag: - geth account import [options] <keyfile> + gdex account import [options] <keyfile> Note: As you can directly copy your encrypted accounts to another ethereum instance, diff --git a/cmd/geth/accountcmd_test.go b/cmd/gdex/accountcmd_test.go index c9983a219..38e21eaca 100644 --- a/cmd/geth/accountcmd_test.go +++ b/cmd/gdex/accountcmd_test.go @@ -43,22 +43,22 @@ func tmpDatadirWithKeystore(t *testing.T) string { } func TestAccountListEmpty(t *testing.T) { - geth := runGeth(t, "account", "list") - geth.ExpectExit() + gdex := runGeth(t, "account", "list") + gdex.ExpectExit() } func TestAccountList(t *testing.T) { datadir := tmpDatadirWithKeystore(t) - geth := runGeth(t, "account", "list", "--datadir", datadir) - defer geth.ExpectExit() + gdex := runGeth(t, "account", "list", "--datadir", datadir) + defer gdex.ExpectExit() if runtime.GOOS == "windows" { - geth.Expect(` + gdex.Expect(` Account #0: {7ef5a6135f1fd6a02593eedc869c6d41d934aef8} keystore://{{.Datadir}}\keystore\UTC--2016-03-22T12-57-55.920751759Z--7ef5a6135f1fd6a02593eedc869c6d41d934aef8 Account #1: {f466859ead1932d743d622cb74fc058882e8648a} keystore://{{.Datadir}}\keystore\aaa Account #2: {289d485d9771714cce91d3393d764e1311907acc} keystore://{{.Datadir}}\keystore\zzz `) } else { - geth.Expect(` + gdex.Expect(` Account #0: {7ef5a6135f1fd6a02593eedc869c6d41d934aef8} keystore://{{.Datadir}}/keystore/UTC--2016-03-22T12-57-55.920751759Z--7ef5a6135f1fd6a02593eedc869c6d41d934aef8 Account #1: {f466859ead1932d743d622cb74fc058882e8648a} keystore://{{.Datadir}}/keystore/aaa Account #2: {289d485d9771714cce91d3393d764e1311907acc} keystore://{{.Datadir}}/keystore/zzz @@ -67,21 +67,21 @@ Account #2: {289d485d9771714cce91d3393d764e1311907acc} keystore://{{.Datadir}}/k } func TestAccountNew(t *testing.T) { - geth := runGeth(t, "account", "new", "--lightkdf") - defer geth.ExpectExit() - geth.Expect(` + gdex := runGeth(t, "account", "new", "--lightkdf") + defer gdex.ExpectExit() + gdex.Expect(` Your new account is locked with a password. Please give a password. Do not forget this password. !! Unsupported terminal, password will be echoed. Passphrase: {{.InputLine "foobar"}} Repeat passphrase: {{.InputLine "foobar"}} `) - geth.ExpectRegexp(`Address: \{[0-9a-f]{40}\}\n`) + gdex.ExpectRegexp(`Address: \{[0-9a-f]{40}\}\n`) } func TestAccountNewBadRepeat(t *testing.T) { - geth := runGeth(t, "account", "new", "--lightkdf") - defer geth.ExpectExit() - geth.Expect(` + gdex := runGeth(t, "account", "new", "--lightkdf") + defer gdex.ExpectExit() + gdex.Expect(` Your new account is locked with a password. Please give a password. Do not forget this password. !! Unsupported terminal, password will be echoed. Passphrase: {{.InputLine "something"}} @@ -92,11 +92,11 @@ Fatal: Passphrases do not match func TestAccountUpdate(t *testing.T) { datadir := tmpDatadirWithKeystore(t) - geth := runGeth(t, "account", "update", + gdex := runGeth(t, "account", "update", "--datadir", datadir, "--lightkdf", "f466859ead1932d743d622cb74fc058882e8648a") - defer geth.ExpectExit() - geth.Expect(` + defer gdex.ExpectExit() + gdex.Expect(` Unlocking account f466859ead1932d743d622cb74fc058882e8648a | Attempt 1/3 !! Unsupported terminal, password will be echoed. Passphrase: {{.InputLine "foobar"}} @@ -107,24 +107,24 @@ Repeat passphrase: {{.InputLine "foobar2"}} } func TestWalletImport(t *testing.T) { - geth := runGeth(t, "wallet", "import", "--lightkdf", "testdata/guswallet.json") - defer geth.ExpectExit() - geth.Expect(` + gdex := runGeth(t, "wallet", "import", "--lightkdf", "testdata/guswallet.json") + defer gdex.ExpectExit() + gdex.Expect(` !! Unsupported terminal, password will be echoed. Passphrase: {{.InputLine "foo"}} Address: {d4584b5f6229b7be90727b0fc8c6b91bb427821f} `) - files, err := ioutil.ReadDir(filepath.Join(geth.Datadir, "keystore")) + files, err := ioutil.ReadDir(filepath.Join(gdex.Datadir, "keystore")) if len(files) != 1 { t.Errorf("expected one key file in keystore directory, found %d files (error: %v)", len(files), err) } } func TestWalletImportBadPassword(t *testing.T) { - geth := runGeth(t, "wallet", "import", "--lightkdf", "testdata/guswallet.json") - defer geth.ExpectExit() - geth.Expect(` + gdex := runGeth(t, "wallet", "import", "--lightkdf", "testdata/guswallet.json") + defer gdex.ExpectExit() + gdex.Expect(` !! Unsupported terminal, password will be echoed. Passphrase: {{.InputLine "wrong"}} Fatal: could not decrypt key with given passphrase @@ -133,23 +133,23 @@ Fatal: could not decrypt key with given passphrase func TestUnlockFlag(t *testing.T) { datadir := tmpDatadirWithKeystore(t) - geth := runGeth(t, + gdex := runGeth(t, "--datadir", datadir, "--nat", "none", "--nodiscover", "--maxpeers", "0", "--port", "0", "--unlock", "f466859ead1932d743d622cb74fc058882e8648a", "js", "testdata/empty.js") - geth.Expect(` + gdex.Expect(` Unlocking account f466859ead1932d743d622cb74fc058882e8648a | Attempt 1/3 !! Unsupported terminal, password will be echoed. Passphrase: {{.InputLine "foobar"}} `) - geth.ExpectExit() + gdex.ExpectExit() wantMessages := []string{ "Unlocked account", "=0xf466859eAD1932D743d622CB74FC058882E8648A", } for _, m := range wantMessages { - if !strings.Contains(geth.StderrText(), m) { + if !strings.Contains(gdex.StderrText(), m) { t.Errorf("stderr text does not contain %q", m) } } @@ -157,11 +157,11 @@ Passphrase: {{.InputLine "foobar"}} func TestUnlockFlagWrongPassword(t *testing.T) { datadir := tmpDatadirWithKeystore(t) - geth := runGeth(t, + gdex := runGeth(t, "--datadir", datadir, "--nat", "none", "--nodiscover", "--maxpeers", "0", "--port", "0", "--unlock", "f466859ead1932d743d622cb74fc058882e8648a") - defer geth.ExpectExit() - geth.Expect(` + defer gdex.ExpectExit() + gdex.Expect(` Unlocking account f466859ead1932d743d622cb74fc058882e8648a | Attempt 1/3 !! Unsupported terminal, password will be echoed. Passphrase: {{.InputLine "wrong1"}} @@ -176,18 +176,18 @@ Fatal: Failed to unlock account f466859ead1932d743d622cb74fc058882e8648a (could // https://github.com/dexon-foundation/dexon/issues/1785 func TestUnlockFlagMultiIndex(t *testing.T) { datadir := tmpDatadirWithKeystore(t) - geth := runGeth(t, + gdex := runGeth(t, "--datadir", datadir, "--nat", "none", "--nodiscover", "--maxpeers", "0", "--port", "0", "--unlock", "0,2", "js", "testdata/empty.js") - geth.Expect(` + gdex.Expect(` Unlocking account 0 | Attempt 1/3 !! Unsupported terminal, password will be echoed. Passphrase: {{.InputLine "foobar"}} Unlocking account 2 | Attempt 1/3 Passphrase: {{.InputLine "foobar"}} `) - geth.ExpectExit() + gdex.ExpectExit() wantMessages := []string{ "Unlocked account", @@ -195,7 +195,7 @@ Passphrase: {{.InputLine "foobar"}} "=0x289d485D9771714CCe91D3393D764E1311907ACc", } for _, m := range wantMessages { - if !strings.Contains(geth.StderrText(), m) { + if !strings.Contains(gdex.StderrText(), m) { t.Errorf("stderr text does not contain %q", m) } } @@ -203,11 +203,11 @@ Passphrase: {{.InputLine "foobar"}} func TestUnlockFlagPasswordFile(t *testing.T) { datadir := tmpDatadirWithKeystore(t) - geth := runGeth(t, + gdex := runGeth(t, "--datadir", datadir, "--nat", "none", "--nodiscover", "--maxpeers", "0", "--port", "0", "--password", "testdata/passwords.txt", "--unlock", "0,2", "js", "testdata/empty.js") - geth.ExpectExit() + gdex.ExpectExit() wantMessages := []string{ "Unlocked account", @@ -215,7 +215,7 @@ func TestUnlockFlagPasswordFile(t *testing.T) { "=0x289d485D9771714CCe91D3393D764E1311907ACc", } for _, m := range wantMessages { - if !strings.Contains(geth.StderrText(), m) { + if !strings.Contains(gdex.StderrText(), m) { t.Errorf("stderr text does not contain %q", m) } } @@ -223,29 +223,29 @@ func TestUnlockFlagPasswordFile(t *testing.T) { func TestUnlockFlagPasswordFileWrongPassword(t *testing.T) { datadir := tmpDatadirWithKeystore(t) - geth := runGeth(t, + gdex := runGeth(t, "--datadir", datadir, "--nat", "none", "--nodiscover", "--maxpeers", "0", "--port", "0", "--password", "testdata/wrong-passwords.txt", "--unlock", "0,2") - defer geth.ExpectExit() - geth.Expect(` + defer gdex.ExpectExit() + gdex.Expect(` Fatal: Failed to unlock account 0 (could not decrypt key with given passphrase) `) } func TestUnlockFlagAmbiguous(t *testing.T) { store := filepath.Join("..", "..", "accounts", "keystore", "testdata", "dupes") - geth := runGeth(t, + gdex := runGeth(t, "--keystore", store, "--nat", "none", "--nodiscover", "--maxpeers", "0", "--port", "0", "--unlock", "f466859ead1932d743d622cb74fc058882e8648a", "js", "testdata/empty.js") - defer geth.ExpectExit() + defer gdex.ExpectExit() // Helper for the expect template, returns absolute keystore path. - geth.SetTemplateFunc("keypath", func(file string) string { + gdex.SetTemplateFunc("keypath", func(file string) string { abs, _ := filepath.Abs(filepath.Join(store, file)) return abs }) - geth.Expect(` + gdex.Expect(` Unlocking account f466859ead1932d743d622cb74fc058882e8648a | Attempt 1/3 !! Unsupported terminal, password will be echoed. Passphrase: {{.InputLine "foobar"}} @@ -257,14 +257,14 @@ Your passphrase unlocked keystore://{{keypath "1"}} In order to avoid this warning, you need to remove the following duplicate key files: keystore://{{keypath "2"}} `) - geth.ExpectExit() + gdex.ExpectExit() wantMessages := []string{ "Unlocked account", "=0xf466859eAD1932D743d622CB74FC058882E8648A", } for _, m := range wantMessages { - if !strings.Contains(geth.StderrText(), m) { + if !strings.Contains(gdex.StderrText(), m) { t.Errorf("stderr text does not contain %q", m) } } @@ -272,17 +272,17 @@ In order to avoid this warning, you need to remove the following duplicate key f func TestUnlockFlagAmbiguousWrongPassword(t *testing.T) { store := filepath.Join("..", "..", "accounts", "keystore", "testdata", "dupes") - geth := runGeth(t, + gdex := runGeth(t, "--keystore", store, "--nat", "none", "--nodiscover", "--maxpeers", "0", "--port", "0", "--unlock", "f466859ead1932d743d622cb74fc058882e8648a") - defer geth.ExpectExit() + defer gdex.ExpectExit() // Helper for the expect template, returns absolute keystore path. - geth.SetTemplateFunc("keypath", func(file string) string { + gdex.SetTemplateFunc("keypath", func(file string) string { abs, _ := filepath.Abs(filepath.Join(store, file)) return abs }) - geth.Expect(` + gdex.Expect(` Unlocking account f466859ead1932d743d622cb74fc058882e8648a | Attempt 1/3 !! Unsupported terminal, password will be echoed. Passphrase: {{.InputLine "wrong"}} @@ -292,5 +292,5 @@ Multiple key files exist for address f466859ead1932d743d622cb74fc058882e8648a: Testing your passphrase against all of them... Fatal: None of the listed files could be unlocked. `) - geth.ExpectExit() + gdex.ExpectExit() } diff --git a/cmd/geth/bugcmd.go b/cmd/gdex/bugcmd.go index bb33a0af4..00c2f17e7 100644 --- a/cmd/geth/bugcmd.go +++ b/cmd/gdex/bugcmd.go @@ -36,7 +36,7 @@ import ( var bugCommand = cli.Command{ Action: utils.MigrateFlags(reportBug), Name: "bug", - Usage: "opens a window to report a bug on the geth repo", + Usage: "opens a window to report a bug on the gdex repo", ArgsUsage: " ", Category: "MISCELLANEOUS COMMANDS", } diff --git a/cmd/geth/chaincmd.go b/cmd/gdex/chaincmd.go index ce4216a94..ce4216a94 100644 --- a/cmd/geth/chaincmd.go +++ b/cmd/gdex/chaincmd.go diff --git a/cmd/geth/config.go b/cmd/gdex/config.go index d4363c0b4..71024c40e 100644 --- a/cmd/geth/config.go +++ b/cmd/gdex/config.go @@ -102,7 +102,7 @@ func defaultNodeConfig() node.Config { cfg.Version = params.VersionWithCommit(gitCommit) cfg.HTTPModules = append(cfg.HTTPModules, "eth", "shh") cfg.WSModules = append(cfg.WSModules, "eth", "shh") - cfg.IPCPath = "geth.ipc" + cfg.IPCPath = "gdex.ipc" return cfg } diff --git a/cmd/geth/consolecmd.go b/cmd/gdex/consolecmd.go index 339919c8d..9915e1ee0 100644 --- a/cmd/geth/consolecmd.go +++ b/cmd/gdex/consolecmd.go @@ -57,7 +57,7 @@ See https://github.com/dexon-foundation/dexon/wiki/JavaScript-Console.`, The Geth console is an interactive shell for the JavaScript runtime environment which exposes a node admin interface as well as the Ðapp JavaScript API. See https://github.com/dexon-foundation/dexon/wiki/JavaScript-Console. -This command allows to open a console on a running geth node.`, +This command allows to open a console on a running gdex node.`, } javascriptCommand = cli.Command{ @@ -73,7 +73,7 @@ JavaScript API. See https://github.com/dexon-foundation/dexon/wiki/JavaScript-Co } ) -// localConsole starts a new geth node, attaching a JavaScript console to it at the +// localConsole starts a new gdex node, attaching a JavaScript console to it at the // same time. func localConsole(ctx *cli.Context) error { // Create and start the node based on the CLI flags @@ -84,7 +84,7 @@ func localConsole(ctx *cli.Context) error { // Attach to the newly started node and start the JavaScript console client, err := node.Attach() if err != nil { - utils.Fatalf("Failed to attach to the inproc geth: %v", err) + utils.Fatalf("Failed to attach to the inproc gdex: %v", err) } config := console.Config{ DataDir: utils.MakeDataDir(ctx), @@ -111,10 +111,10 @@ func localConsole(ctx *cli.Context) error { return nil } -// remoteConsole will connect to a remote geth instance, attaching a JavaScript +// remoteConsole will connect to a remote gdex instance, attaching a JavaScript // console to it. func remoteConsole(ctx *cli.Context) error { - // Attach to a remotely running geth instance and start the JavaScript console + // Attach to a remotely running gdex instance and start the JavaScript console endpoint := ctx.Args().First() if endpoint == "" { path := node.DefaultDataDir() @@ -126,11 +126,11 @@ func remoteConsole(ctx *cli.Context) error { path = filepath.Join(path, "testnet") } } - endpoint = fmt.Sprintf("%s/geth.ipc", path) + endpoint = fmt.Sprintf("%s/gdex.ipc", path) } client, err := dialRPC(endpoint) if err != nil { - utils.Fatalf("Unable to attach to remote geth: %v", err) + utils.Fatalf("Unable to attach to remote gdex: %v", err) } config := console.Config{ DataDir: utils.MakeDataDir(ctx), @@ -159,19 +159,19 @@ func remoteConsole(ctx *cli.Context) error { // dialRPC returns a RPC client which connects to the given endpoint. // The check for empty endpoint implements the defaulting logic -// for "geth attach" and "geth monitor" with no argument. +// for "gdex attach" and "gdex monitor" with no argument. func dialRPC(endpoint string) (*rpc.Client, error) { if endpoint == "" { endpoint = node.DefaultIPCEndpoint(clientIdentifier) } else if strings.HasPrefix(endpoint, "rpc:") || strings.HasPrefix(endpoint, "ipc:") { - // Backwards compatibility with geth < 1.5 which required + // Backwards compatibility with gdex < 1.5 which required // these prefixes. endpoint = endpoint[4:] } return rpc.Dial(endpoint) } -// ephemeralConsole starts a new geth node, attaches an ephemeral JavaScript +// ephemeralConsole starts a new gdex node, attaches an ephemeral JavaScript // console to it, executes each of the files specified as arguments and tears // everything down. func ephemeralConsole(ctx *cli.Context) error { @@ -183,7 +183,7 @@ func ephemeralConsole(ctx *cli.Context) error { // Attach to the newly started node and start the JavaScript console client, err := node.Attach() if err != nil { - utils.Fatalf("Failed to attach to the inproc geth: %v", err) + utils.Fatalf("Failed to attach to the inproc gdex: %v", err) } config := console.Config{ DataDir: utils.MakeDataDir(ctx), diff --git a/cmd/geth/consolecmd_test.go b/cmd/gdex/consolecmd_test.go index 1e3363c0d..9a79dcd90 100644 --- a/cmd/geth/consolecmd_test.go +++ b/cmd/gdex/consolecmd_test.go @@ -40,22 +40,22 @@ const ( func TestConsoleWelcome(t *testing.T) { coinbase := "0x8605cdbbdb6d264aa742e77020dcbc58fcdce182" - // Start a geth console, make sure it's cleaned up and terminate the console - geth := runGeth(t, + // Start a gdex console, make sure it's cleaned up and terminate the console + gdex := runGeth(t, "--port", "0", "--maxpeers", "0", "--nodiscover", "--nat", "none", "--etherbase", coinbase, "--shh", "console") // Gather all the infos the welcome message needs to contain - geth.SetTemplateFunc("goos", func() string { return runtime.GOOS }) - geth.SetTemplateFunc("goarch", func() string { return runtime.GOARCH }) - geth.SetTemplateFunc("gover", runtime.Version) - geth.SetTemplateFunc("gethver", func() string { return params.VersionWithMeta }) - geth.SetTemplateFunc("niltime", func() string { return time.Unix(0, 0).Format(time.RFC1123) }) - geth.SetTemplateFunc("apis", func() string { return ipcAPIs }) + gdex.SetTemplateFunc("goos", func() string { return runtime.GOOS }) + gdex.SetTemplateFunc("goarch", func() string { return runtime.GOARCH }) + gdex.SetTemplateFunc("gover", runtime.Version) + gdex.SetTemplateFunc("gethver", func() string { return params.VersionWithMeta }) + gdex.SetTemplateFunc("niltime", func() string { return time.Unix(0, 0).Format(time.RFC1123) }) + gdex.SetTemplateFunc("apis", func() string { return ipcAPIs }) // Verify the actual welcome message to the required template - geth.Expect(` + gdex.Expect(` Welcome to the Geth JavaScript console! instance: Geth/v{{gethver}}/{{goos}}-{{goarch}}/{{gover}} @@ -66,7 +66,7 @@ at block: 0 ({{niltime}}) > {{.InputLine "exit"}} `) - geth.ExpectExit() + gdex.ExpectExit() } // Tests that a console can be attached to a running node via various means. @@ -75,56 +75,56 @@ func TestIPCAttachWelcome(t *testing.T) { coinbase := "0x8605cdbbdb6d264aa742e77020dcbc58fcdce182" var ipc string if runtime.GOOS == "windows" { - ipc = `\\.\pipe\geth` + strconv.Itoa(trulyRandInt(100000, 999999)) + ipc = `\\.\pipe\gdex` + strconv.Itoa(trulyRandInt(100000, 999999)) } else { ws := tmpdir(t) defer os.RemoveAll(ws) - ipc = filepath.Join(ws, "geth.ipc") + ipc = filepath.Join(ws, "gdex.ipc") } // Note: we need --shh because testAttachWelcome checks for default // list of ipc modules and shh is included there. - geth := runGeth(t, + gdex := runGeth(t, "--port", "0", "--maxpeers", "0", "--nodiscover", "--nat", "none", "--etherbase", coinbase, "--shh", "--ipcpath", ipc) time.Sleep(2 * time.Second) // Simple way to wait for the RPC endpoint to open - testAttachWelcome(t, geth, "ipc:"+ipc, ipcAPIs) + testAttachWelcome(t, gdex, "ipc:"+ipc, ipcAPIs) - geth.Interrupt() - geth.ExpectExit() + gdex.Interrupt() + gdex.ExpectExit() } func TestHTTPAttachWelcome(t *testing.T) { coinbase := "0x8605cdbbdb6d264aa742e77020dcbc58fcdce182" port := strconv.Itoa(trulyRandInt(1024, 65536)) // Yeah, sometimes this will fail, sorry :P - geth := runGeth(t, + gdex := runGeth(t, "--port", "0", "--maxpeers", "0", "--nodiscover", "--nat", "none", "--etherbase", coinbase, "--rpc", "--rpcport", port) time.Sleep(2 * time.Second) // Simple way to wait for the RPC endpoint to open - testAttachWelcome(t, geth, "http://localhost:"+port, httpAPIs) + testAttachWelcome(t, gdex, "http://localhost:"+port, httpAPIs) - geth.Interrupt() - geth.ExpectExit() + gdex.Interrupt() + gdex.ExpectExit() } func TestWSAttachWelcome(t *testing.T) { coinbase := "0x8605cdbbdb6d264aa742e77020dcbc58fcdce182" port := strconv.Itoa(trulyRandInt(1024, 65536)) // Yeah, sometimes this will fail, sorry :P - geth := runGeth(t, + gdex := runGeth(t, "--port", "0", "--maxpeers", "0", "--nodiscover", "--nat", "none", "--etherbase", coinbase, "--ws", "--wsport", port) time.Sleep(2 * time.Second) // Simple way to wait for the RPC endpoint to open - testAttachWelcome(t, geth, "ws://localhost:"+port, httpAPIs) + testAttachWelcome(t, gdex, "ws://localhost:"+port, httpAPIs) - geth.Interrupt() - geth.ExpectExit() + gdex.Interrupt() + gdex.ExpectExit() } -func testAttachWelcome(t *testing.T, geth *testgeth, endpoint, apis string) { - // Attach to a running geth note and terminate immediately +func testAttachWelcome(t *testing.T, gdex *testgdex, endpoint, apis string) { + // Attach to a running gdex note and terminate immediately attach := runGeth(t, "attach", endpoint) defer attach.ExpectExit() attach.CloseStdin() @@ -134,10 +134,10 @@ func testAttachWelcome(t *testing.T, geth *testgeth, endpoint, apis string) { attach.SetTemplateFunc("goarch", func() string { return runtime.GOARCH }) attach.SetTemplateFunc("gover", runtime.Version) attach.SetTemplateFunc("gethver", func() string { return params.VersionWithMeta }) - attach.SetTemplateFunc("etherbase", func() string { return geth.Etherbase }) + attach.SetTemplateFunc("etherbase", func() string { return gdex.Etherbase }) attach.SetTemplateFunc("niltime", func() string { return time.Unix(0, 0).Format(time.RFC1123) }) attach.SetTemplateFunc("ipc", func() bool { return strings.HasPrefix(endpoint, "ipc") }) - attach.SetTemplateFunc("datadir", func() string { return geth.Datadir }) + attach.SetTemplateFunc("datadir", func() string { return gdex.Datadir }) attach.SetTemplateFunc("apis", func() string { return apis }) // Verify the actual welcome message to the required template diff --git a/cmd/geth/dao_test.go b/cmd/gdex/dao_test.go index b4aefe9dd..19340fa1b 100644 --- a/cmd/geth/dao_test.go +++ b/cmd/gdex/dao_test.go @@ -116,11 +116,11 @@ func testDAOForkBlockNewChain(t *testing.T, test int, genesis string, expectBloc } else { // Force chain initialization args := []string{"--port", "0", "--maxpeers", "0", "--nodiscover", "--nat", "none", "--ipcdisable", "--datadir", datadir} - geth := runGeth(t, append(args, []string{"--exec", "2+2", "console"}...)...) - geth.WaitExit() + gdex := runGeth(t, append(args, []string{"--exec", "2+2", "console"}...)...) + gdex.WaitExit() } // Retrieve the DAO config flag from the database - path := filepath.Join(datadir, "geth", "chaindata") + path := filepath.Join(datadir, "gdex", "chaindata") db, err := ethdb.NewLDBDatabase(path, 0, 0) if err != nil { t.Fatalf("test %d: failed to open test database: %v", test, err) diff --git a/cmd/geth/genesis_test.go b/cmd/gdex/genesis_test.go index e75b542cb..05da35563 100644 --- a/cmd/geth/genesis_test.go +++ b/cmd/gdex/genesis_test.go @@ -100,11 +100,11 @@ func TestCustomGenesis(t *testing.T) { runGeth(t, "--datadir", datadir, "init", json).WaitExit() // Query the custom genesis block - geth := runGeth(t, + gdex := runGeth(t, "--datadir", datadir, "--maxpeers", "0", "--port", "0", "--nodiscover", "--nat", "none", "--ipcdisable", "--exec", tt.query, "console") - geth.ExpectRegexp(tt.result) - geth.ExpectExit() + gdex.ExpectRegexp(tt.result) + gdex.ExpectExit() } } diff --git a/cmd/geth/main.go b/cmd/gdex/main.go index 05f5c45b6..84a02cca4 100644 --- a/cmd/geth/main.go +++ b/cmd/gdex/main.go @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with go-ethereum. If not, see <http://www.gnu.org/licenses/>. -// geth is the official command-line client for Ethereum. +// gdex is the official command-line client for Ethereum. package main import ( @@ -43,7 +43,7 @@ import ( ) const ( - clientIdentifier = "geth" // Client identifier to advertise over the network + clientIdentifier = "gdex" // Client identifier to advertise over the network ) var ( @@ -172,7 +172,7 @@ var ( func init() { // Initialize the CLI app and start Geth - app.Action = geth + app.Action = gdex app.HideVersion = true // we have a command to print the version app.Copyright = "Copyright 2013-2018 The go-ethereum Authors" app.Commands = []cli.Command{ @@ -259,10 +259,10 @@ func main() { } } -// geth is the main entry point into the system if no special subcommand is ran. +// gdex is the main entry point into the system if no special subcommand is ran. // It creates a default node based on the command line arguments and runs it in // blocking mode, waiting for it to be shut down. -func geth(ctx *cli.Context) error { +func gdex(ctx *cli.Context) error { if args := ctx.Args(); len(args) > 0 { return fmt.Errorf("invalid command: %q", args[0]) } diff --git a/cmd/geth/misccmd.go b/cmd/gdex/misccmd.go index b90567154..8800c7376 100644 --- a/cmd/geth/misccmd.go +++ b/cmd/gdex/misccmd.go @@ -80,7 +80,7 @@ The output of this command is supposed to be machine-readable. func makecache(ctx *cli.Context) error { args := ctx.Args() if len(args) != 2 { - utils.Fatalf(`Usage: geth makecache <block number> <outputdir>`) + utils.Fatalf(`Usage: gdex makecache <block number> <outputdir>`) } block, err := strconv.ParseUint(args[0], 0, 64) if err != nil { @@ -95,7 +95,7 @@ func makecache(ctx *cli.Context) error { func makedag(ctx *cli.Context) error { args := ctx.Args() if len(args) != 2 { - utils.Fatalf(`Usage: geth makedag <block number> <outputdir>`) + utils.Fatalf(`Usage: gdex makedag <block number> <outputdir>`) } block, err := strconv.ParseUint(args[0], 0, 64) if err != nil { @@ -134,6 +134,6 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License -along with geth. If not, see <http://www.gnu.org/licenses/>.`) +along with gdex. If not, see <http://www.gnu.org/licenses/>.`) return nil } diff --git a/cmd/geth/monitorcmd.go b/cmd/gdex/monitorcmd.go index 668401028..1038fe3a2 100644 --- a/cmd/geth/monitorcmd.go +++ b/cmd/gdex/monitorcmd.go @@ -76,7 +76,7 @@ func monitor(ctx *cli.Context) error { // Attach to an Ethereum node over IPC or RPC endpoint := ctx.String(monitorCommandAttachFlag.Name) if client, err = dialRPC(endpoint); err != nil { - utils.Fatalf("Unable to attach to geth node: %v", err) + utils.Fatalf("Unable to attach to gdex node: %v", err) } defer client.Close() @@ -93,7 +93,7 @@ func monitor(ctx *cli.Context) error { if len(list) > 0 { utils.Fatalf("No metrics specified.\n\nAvailable:\n - %s", strings.Join(list, "\n - ")) } else { - utils.Fatalf("No metrics collected by geth (--%s).\n", utils.MetricsEnabledFlag.Name) + utils.Fatalf("No metrics collected by gdex (--%s).\n", utils.MetricsEnabledFlag.Name) } } sort.Strings(monitored) @@ -158,7 +158,7 @@ func monitor(ctx *cli.Context) error { return nil } -// retrieveMetrics contacts the attached geth node and retrieves the entire set +// retrieveMetrics contacts the attached gdex node and retrieves the entire set // of collected system metrics. func retrieveMetrics(client *rpc.Client) (map[string]interface{}, error) { var metrics map[string]interface{} diff --git a/cmd/geth/run_test.go b/cmd/gdex/run_test.go index c5bd7e6fc..a53a914d2 100644 --- a/cmd/geth/run_test.go +++ b/cmd/gdex/run_test.go @@ -27,14 +27,14 @@ import ( ) func tmpdir(t *testing.T) string { - dir, err := ioutil.TempDir("", "geth-test") + dir, err := ioutil.TempDir("", "gdex-test") if err != nil { t.Fatal(err) } return dir } -type testgeth struct { +type testgdex struct { *cmdtest.TestCmd // template variables for expect @@ -43,8 +43,8 @@ type testgeth struct { } func init() { - // Run the app if we've been exec'd as "geth-test" in runGeth. - reexec.Register("geth-test", func() { + // Run the app if we've been exec'd as "gdex-test" in runGeth. + reexec.Register("gdex-test", func() { if err := app.Run(os.Args); err != nil { fmt.Fprintln(os.Stderr, err) os.Exit(1) @@ -61,10 +61,10 @@ func TestMain(m *testing.M) { os.Exit(m.Run()) } -// spawns geth with the given command line args. If the args don't set --datadir, the +// spawns gdex with the given command line args. If the args don't set --datadir, the // child g gets a temporary data directory. -func runGeth(t *testing.T, args ...string) *testgeth { - tt := &testgeth{} +func runGeth(t *testing.T, args ...string) *testgdex { + tt := &testgdex{} tt.TestCmd = cmdtest.NewTestCmd(t, tt) for i, arg := range args { switch { @@ -90,9 +90,9 @@ func runGeth(t *testing.T, args ...string) *testgeth { }() } - // Boot "geth". This actually runs the test binary but the TestMain + // Boot "gdex". This actually runs the test binary but the TestMain // function will prevent any tests from running. - tt.Run("geth-test", args...) + tt.Run("gdex-test", args...) return tt } diff --git a/cmd/geth/testdata/empty.js b/cmd/gdex/testdata/empty.js index 8b1378917..8b1378917 100644 --- a/cmd/geth/testdata/empty.js +++ b/cmd/gdex/testdata/empty.js diff --git a/cmd/geth/testdata/guswallet.json b/cmd/gdex/testdata/guswallet.json index e8ea4f332..e8ea4f332 100644 --- a/cmd/geth/testdata/guswallet.json +++ b/cmd/gdex/testdata/guswallet.json diff --git a/cmd/geth/testdata/passwords.txt b/cmd/gdex/testdata/passwords.txt index 96f98c7f4..96f98c7f4 100644 --- a/cmd/geth/testdata/passwords.txt +++ b/cmd/gdex/testdata/passwords.txt diff --git a/cmd/geth/testdata/wrong-passwords.txt b/cmd/gdex/testdata/wrong-passwords.txt index 7d1e338bb..7d1e338bb 100644 --- a/cmd/geth/testdata/wrong-passwords.txt +++ b/cmd/gdex/testdata/wrong-passwords.txt diff --git a/cmd/geth/usage.go b/cmd/gdex/usage.go index fb14a9bbd..685b5bc1c 100644 --- a/cmd/geth/usage.go +++ b/cmd/gdex/usage.go @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with go-ethereum. If not, see <http://www.gnu.org/licenses/>. -// Contains the geth command usage template and generator. +// Contains the gdex command usage template and generator. package main diff --git a/cmd/monkey/key b/cmd/monkey/key new file mode 100644 index 000000000..a9fe18413 --- /dev/null +++ b/cmd/monkey/key @@ -0,0 +1 @@ +fa30b47a7a3d5ab6935d873ffaeb8ca5b9782d102c4094be6da6b7f2fc04b5bd
\ No newline at end of file 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 – 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 – 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 – 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 & 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 & 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 && \ diff --git a/cmd/swarm/config.go b/cmd/swarm/config.go index 68f15184f..39f26a7e1 100644 --- a/cmd/swarm/config.go +++ b/cmd/swarm/config.go @@ -127,7 +127,7 @@ func initSwarmNode(config *bzzapi.Config, stack *node.Node, ctx *cli.Context) { //at this point, all vars should be set in the Config //get the account for the provided swarm account prvkey := getAccount(config.BzzAccount, ctx, stack) - //set the resolved config path (geth --datadir) + //set the resolved config path (gdex --datadir) config.Path = expandPath(stack.InstanceDir()) //finally, initialize the configuration config.Init(prvkey) diff --git a/cmd/swarm/config_test.go b/cmd/swarm/config_test.go index 6bc613274..17abb7c78 100644 --- a/cmd/swarm/config_test.go +++ b/cmd/swarm/config_test.go @@ -473,7 +473,7 @@ func TestConfigValidate(t *testing.T) { }{ { cfg: &api.Config{EnsAPIs: []string{ - "/data/testnet/geth.ipc", + "/data/testnet/gdex.ipc", }}, }, { @@ -488,7 +488,7 @@ func TestConfigValidate(t *testing.T) { }, { cfg: &api.Config{EnsAPIs: []string{ - "test:/data/testnet/geth.ipc", + "test:/data/testnet/gdex.ipc", }}, }, { @@ -498,7 +498,7 @@ func TestConfigValidate(t *testing.T) { }, { cfg: &api.Config{EnsAPIs: []string{ - "314159265dD8dbb310642f98f50C066173C1259b@/data/testnet/geth.ipc", + "314159265dD8dbb310642f98f50C066173C1259b@/data/testnet/gdex.ipc", }}, }, { @@ -513,7 +513,7 @@ func TestConfigValidate(t *testing.T) { }, { cfg: &api.Config{EnsAPIs: []string{ - "test:314159265dD8dbb310642f98f50C066173C1259b@/data/testnet/geth.ipc", + "test:314159265dD8dbb310642f98f50C066173C1259b@/data/testnet/gdex.ipc", }}, }, { @@ -546,9 +546,9 @@ func TestConfigValidate(t *testing.T) { }, { cfg: &api.Config{EnsAPIs: []string{ - "@/data/testnet/geth.ipc", + "@/data/testnet/gdex.ipc", }}, - err: "invalid format [tld:][contract-addr@]url for ENS API endpoint configuration \"@/data/testnet/geth.ipc\": missing contract address", + err: "invalid format [tld:][contract-addr@]url for ENS API endpoint configuration \"@/data/testnet/gdex.ipc\": missing contract address", }, } { err := validateConfig(c.cfg) diff --git a/cmd/swarm/main.go b/cmd/swarm/main.go index 362c1717b..23d0a22e1 100644 --- a/cmd/swarm/main.go +++ b/cmd/swarm/main.go @@ -91,7 +91,7 @@ var defaultSubcommandHelp = cli.Command{ var defaultNodeConfig = node.DefaultConfig -// This init function sets defaults so cmd/swarm can run alongside geth. +// This init function sets defaults so cmd/swarm can run alongside gdex. func init() { sv.GitCommit = gitCommit defaultNodeConfig.Name = clientIdentifier @@ -275,9 +275,9 @@ func bzzd(ctx *cli.Context) error { //pss operates on ws cfg.WSModules = append(cfg.WSModules, "pss") - //geth only supports --datadir via command line + //gdex only supports --datadir via command line //in order to be consistent within swarm, if we pass --datadir via environment variable - //or via config file, we get the same directory for geth and swarm + //or via config file, we get the same directory for gdex and swarm if _, err := os.Stat(bzzconfig.Path); err == nil { cfg.DataDir = bzzconfig.Path } diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index 585f9c313..b96a155ff 100644 --- a/cmd/utils/flags.go +++ b/cmd/utils/flags.go @@ -608,7 +608,7 @@ var ( MetricsInfluxDBDatabaseFlag = cli.StringFlag{ Name: "metrics.influxdb.database", Usage: "InfluxDB database name to push reported metrics to", - Value: "geth", + Value: "gdex", } MetricsInfluxDBUsernameFlag = cli.StringFlag{ Name: "metrics.influxdb.username", @@ -857,7 +857,7 @@ func MakeAddress(ks *keystore.KeyStore, account string) (accounts.Account, error log.Warn("-------------------------------------------------------------------") log.Warn("Referring to accounts by order in the keystore folder is dangerous!") log.Warn("This functionality is deprecated and will be removed in the future!") - log.Warn("Please use explicit addresses! (can search via `geth account list`)") + log.Warn("Please use explicit addresses! (can search via `gdex account list`)") log.Warn("-------------------------------------------------------------------") accs := ks.Accounts() @@ -1327,7 +1327,7 @@ func SetupMetrics(ctx *cli.Context) { log.Info("Enabling metrics export to InfluxDB") - go influxdb.InfluxDBWithTags(metrics.DefaultRegistry, 10*time.Second, endpoint, database, username, password, "geth.", tagsMap) + go influxdb.InfluxDBWithTags(metrics.DefaultRegistry, 10*time.Second, endpoint, database, username, password, "gdex.", tagsMap) } } } @@ -1445,11 +1445,11 @@ func MakeConsolePreloads(ctx *cli.Context) []string { // This is a temporary function used for migrating old command/flags to the // new format. // -// e.g. geth account new --keystore /tmp/mykeystore --lightkdf +// e.g. gdex account new --keystore /tmp/mykeystore --lightkdf // // is equivalent after calling this method with: // -// geth --keystore /tmp/mykeystore --lightkdf account new +// gdex --keystore /tmp/mykeystore --lightkdf account new // // This allows the use of the existing configuration functionality. // When all flags are migrated this function can be removed and the existing diff --git a/test/run_test.sh b/test/run_test.sh index 8e678fc43..ddbe30b4a 100755 --- a/test/run_test.sh +++ b/test/run_test.sh @@ -1,16 +1,16 @@ #!/bin/bash -GETH=../build/bin/geth +GDEX=../build/bin/gdex -pkill -9 -f geth +pkill -9 -f gdex bootnode -nodekey bootnode.key --verbosity=9 > bootnode.log 2>&1 & for i in $(seq 0 3); do datadir=$PWD/Dexon.$i rm -rf $datadir - $GETH --datadir=$datadir init genesis.json - $GETH --verbosity=4 --datadir=$datadir --nodekey=test$i.nodekey --port=$((28000 + $i)) --rpc --rpcaddr 127.0.0.1 --rpcport=$((8545 + $i)) --rpcapi=eth,net,web3,debug --rpcvhosts='*' --rpccorsdomain="http://localhost:8000,https://www.myetherwallet.com" > geth.$i.log 2>&1 & + $GDEX --datadir=$datadir init genesis.json + $GDEX --verbosity=4 --datadir=$datadir --nodekey=test$i.nodekey --port=$((28000 + $i)) --rpc --rpcaddr 127.0.0.1 --rpcport=$((8545 + $i)) --rpcapi=eth,net,web3,debug --rpcvhosts='*' --rpccorsdomain="http://localhost:8000,https://www.myetherwallet.com" > gdex.$i.log 2>&1 & done -tail -f geth.*.log +tail -f gdex.*.log |