diff --git a/.gitignore b/.gitignore index f81ec22a3c..81bf7cdc43 100644 --- a/.gitignore +++ b/.gitignore @@ -25,7 +25,7 @@ build/_vendor/pkg # used by the Makefile /build/_workspace/ /build/bin/ -/geth*.zip +/tomo*.zip # travis profile.tmp diff --git a/.travis.yml b/.travis.yml index 40d940de0d..388f8a5df0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,207 +3,48 @@ go_import_path: github.com/ethereum/go-ethereum sudo: false matrix: include: - - os: linux - dist: trusty - sudo: required - go: 1.9.x - script: - - sudo modprobe fuse - - sudo chmod 666 /dev/fuse - - sudo chown root:$USER /etc/fuse.conf - - go run build/ci.go install - - go run build/ci.go test -coverage - - # These are the latest Go versions. - - os: linux - dist: trusty - sudo: required - go: "1.10" - script: - - sudo modprobe fuse - - sudo chmod 666 /dev/fuse - - sudo chown root:$USER /etc/fuse.conf - - go run build/ci.go install - - go run build/ci.go test -coverage - - - os: osx - go: "1.10" - script: - - unset -f cd # workaround for https://github.com/travis-ci/travis-ci/issues/8703 - - brew update - - brew install caskroom/cask/brew-cask - - brew cask install osxfuse - - go run build/ci.go install - - go run build/ci.go test -coverage - - # This builder only tests code linters on latest version of Go - - os: linux - dist: trusty - go: "1.10" - env: - - lint - git: - submodules: false # avoid cloning ethereum/tests - script: - - go run build/ci.go lint - - # This builder does the Ubuntu PPA upload - - os: linux - dist: trusty - go: "1.10" - env: - - ubuntu-ppa - git: - submodules: false # avoid cloning ethereum/tests - addons: - apt: - packages: - - devscripts - - debhelper - - dput - - fakeroot - script: - - go run build/ci.go debsrc -signer "Go Ethereum Linux Builder " -upload ppa:ethereum/ethereum - - # This builder does the Linux Azure uploads - - os: linux - dist: trusty - sudo: required - go: "1.10" - env: - - azure-linux - git: - submodules: false # avoid cloning ethereum/tests - addons: - apt: - packages: - - gcc-multilib - script: - # Build for the primary platforms that Trusty can manage - - go run build/ci.go install - - go run build/ci.go archive -type tar -signer LINUX_SIGNING_KEY -upload gethstore/builds - - go run build/ci.go install -arch 386 - - go run build/ci.go archive -arch 386 -type tar -signer LINUX_SIGNING_KEY -upload gethstore/builds - - # Switch over GCC to cross compilation (breaks 386, hence why do it here only) - - sudo -E apt-get -yq --no-install-suggests --no-install-recommends --force-yes install gcc-arm-linux-gnueabi libc6-dev-armel-cross gcc-arm-linux-gnueabihf libc6-dev-armhf-cross gcc-aarch64-linux-gnu libc6-dev-arm64-cross - - sudo ln -s /usr/include/asm-generic /usr/include/asm - - - GOARM=5 go run build/ci.go install -arch arm -cc arm-linux-gnueabi-gcc - - GOARM=5 go run build/ci.go archive -arch arm -type tar -signer LINUX_SIGNING_KEY -upload gethstore/builds - - GOARM=6 go run build/ci.go install -arch arm -cc arm-linux-gnueabi-gcc - - GOARM=6 go run build/ci.go archive -arch arm -type tar -signer LINUX_SIGNING_KEY -upload gethstore/builds - - GOARM=7 go run build/ci.go install -arch arm -cc arm-linux-gnueabihf-gcc - - GOARM=7 go run build/ci.go archive -arch arm -type tar -signer LINUX_SIGNING_KEY -upload gethstore/builds - - go run build/ci.go install -arch arm64 -cc aarch64-linux-gnu-gcc - - go run build/ci.go archive -arch arm64 -type tar -signer LINUX_SIGNING_KEY -upload gethstore/builds - - # This builder does the Linux Azure MIPS xgo uploads - - os: linux - dist: trusty - services: - - docker - go: "1.10" - env: - - azure-linux-mips - git: - submodules: false # avoid cloning ethereum/tests - script: - - go run build/ci.go xgo --alltools -- --targets=linux/mips --ldflags '-extldflags "-static"' -v - - for bin in build/bin/*-linux-mips; do mv -f "${bin}" "${bin/-linux-mips/}"; done - - go run build/ci.go archive -arch mips -type tar -signer LINUX_SIGNING_KEY -upload gethstore/builds - - - go run build/ci.go xgo --alltools -- --targets=linux/mipsle --ldflags '-extldflags "-static"' -v - - for bin in build/bin/*-linux-mipsle; do mv -f "${bin}" "${bin/-linux-mipsle/}"; done - - go run build/ci.go archive -arch mipsle -type tar -signer LINUX_SIGNING_KEY -upload gethstore/builds - - - go run build/ci.go xgo --alltools -- --targets=linux/mips64 --ldflags '-extldflags "-static"' -v - - for bin in build/bin/*-linux-mips64; do mv -f "${bin}" "${bin/-linux-mips64/}"; done - - go run build/ci.go archive -arch mips64 -type tar -signer LINUX_SIGNING_KEY -upload gethstore/builds - - - go run build/ci.go xgo --alltools -- --targets=linux/mips64le --ldflags '-extldflags "-static"' -v - - for bin in build/bin/*-linux-mips64le; do mv -f "${bin}" "${bin/-linux-mips64le/}"; done - - go run build/ci.go archive -arch mips64le -type tar -signer LINUX_SIGNING_KEY -upload gethstore/builds - - # This builder does the Android Maven and Azure uploads - - os: linux - dist: precise # Needed for the android tools - addons: - apt: - packages: - - oracle-java8-installer - - oracle-java8-set-default - language: android - android: - components: - - platform-tools - - tools - - android-15 - - android-19 - - android-24 - env: - - azure-android - - maven-android - git: - submodules: false # avoid cloning ethereum/tests - before_install: - - curl https://storage.googleapis.com/golang/go1.10.linux-amd64.tar.gz | tar -xz - - export PATH=`pwd`/go/bin:$PATH - - export GOROOT=`pwd`/go - - export GOPATH=$HOME/go - script: - # Build the Android archive and upload it to Maven Central and Azure - - curl https://dl.google.com/android/repository/android-ndk-r15c-linux-x86_64.zip -o android-ndk-r15c.zip - - unzip -q android-ndk-r15c.zip && rm android-ndk-r15c.zip - - mv android-ndk-r15c $HOME - - export ANDROID_NDK=$HOME/android-ndk-r15c - - - mkdir -p $GOPATH/src/github.com/ethereum - - ln -s `pwd` $GOPATH/src/github.com/ethereum - - go run build/ci.go aar -signer ANDROID_SIGNING_KEY -deploy https://oss.sonatype.org -upload gethstore/builds - - # This builder does the OSX Azure, iOS CocoaPods and iOS Azure uploads - - os: osx - go: "1.10" - env: - - azure-osx - - azure-ios - - cocoapods-ios - git: - submodules: false # avoid cloning ethereum/tests - script: - - go run build/ci.go install - - go run build/ci.go archive -type tar -signer OSX_SIGNING_KEY -upload gethstore/builds - - # Build the iOS framework and upload it to CocoaPods and Azure - - gem uninstall cocoapods -a -x - - gem install cocoapods - - - mv ~/.cocoapods/repos/master ~/.cocoapods/repos/master.bak - - sed -i '.bak' 's/repo.join/!repo.join/g' $(dirname `gem which cocoapods`)/cocoapods/sources_manager.rb - - if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then git clone --depth=1 https://github.com/CocoaPods/Specs.git ~/.cocoapods/repos/master && pod setup --verbose; fi - - - xctool -version - - xcrun simctl list - - # Workaround for https://github.com/golang/go/issues/23749 - - export CGO_CFLAGS_ALLOW='-fmodules|-fblocks|-fobjc-arc' - - go run build/ci.go xcode -signer IOS_SIGNING_KEY -deploy trunk -upload gethstore/builds - - # This builder does the Azure archive purges to avoid accumulating junk - - os: linux - dist: trusty - go: "1.10" - env: - - azure-purge - git: - submodules: false # avoid cloning ethereum/tests - script: - - go run build/ci.go purge -store gethstore/builds -days 14 + - os: linux + dist: trusty + sudo: required + go: 1.9.x + script: + - sudo modprobe fuse + - sudo chmod 666 /dev/fuse + - sudo chown root:$USER /etc/fuse.conf + - go run build/ci.go install + - go run build/ci.go test -coverage + - os: linux + dist: trusty + sudo: required + go: '1.10' + script: + - sudo modprobe fuse + - sudo chmod 666 /dev/fuse + - sudo chown root:$USER /etc/fuse.conf + - go run build/ci.go install + - go run build/ci.go test -coverage + - os: osx + go: '1.10' + script: + - unset -f cd + - brew update + - brew install caskroom/cask/brew-cask + - brew cask install osxfuse + - go run build/ci.go install + - go run build/ci.go test -coverage + - os: linux + dist: trusty + go: '1.10' + env: + - lint + git: + submodules: false + script: + - go run build/ci.go lint notifications: - webhooks: - urls: - - https://webhooks.gitter.im/e/e09ccdce1048c5e03445 + slack: + rooms: + secure: DoWVSWEKZre0rsYvHPqOBpYa5hL7DagVCP7eGR+2dluzsyUOTW58uiaezaZMAPPG6k7i1TC9CufONkFRwH6kqLrFtAFd+t3sKb3X4D9/PSa9k88uBuNfsX+JhUzEMT53pfLO9NTBbZs3M6bOuZDP7GddWWnMZpO6Mu7RzZtVxyqbZIcNu3nxsmLkoaQ8726npaHrxhO1Ab+3rgR4dkNFLgl9/CnPwvuv/j24dsKzly6tF+4Ms9Fz5O0Te8zK5d/UWZN50e+uDnbzcIvbY2VHOYXchXZRbfKO8/M2TIXLPKbLc3alCw1ZvpFZqiMYK3SnGNby4FLp8RlC6H4sv52YeNq3fHH8SgOJ3xTL8m6ejIlqoKnUNsJ1lwtfiEVu5D1b8FRKTPqoh+cjadJxsF9dO0xZsf1d5Pmq6Ncr0j6di1ZMjCc6TPFERxkdA48+PzQY4TqfBpM4E5RnJuX9O9MJFbA1fZo2xhHcy0LlkslZMpSwiv/YO4bCJZPmxvHtruqELJXxjYyC67UbzSzrBVE1g1bXy0V5xyxPIEA38jzlNczhq6fg2gyEc+6JCbzN2gFoAS5uFWQHpUhXHc7zNB5Jyi7GPQv6cfHYcedjn9In9/bNDqqGexGX4Ih/cb6W1GOHC7c2A/AsfTa9KWmsyj7YwBRXFIXfme7bBh6VGuRqU3Y= on_success: change on_failure: always diff --git a/Makefile b/Makefile index 3922d6015b..4302b8ec40 100644 --- a/Makefile +++ b/Makefile @@ -2,19 +2,24 @@ # 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: tomo android ios tomo-cross swarm evm all test clean +.PHONY: tomo-linux tomo-linux-386 tomo-linux-amd64 tomo-linux-mips64 tomo-linux-mips64le +.PHONY: tomo-linux-arm tomo-linux-arm-5 tomo-linux-arm-6 tomo-linux-arm-7 tomo-linux-arm64 +.PHONY: tomo-darwin tomo-darwin-386 tomo-darwin-amd64 +.PHONY: tomo-windows tomo-windows-386 tomo-windows-amd64 GOBIN = $(shell pwd)/build/bin +GOFMT = gofmt GO ?= latest +GO_PACKAGES = . +GO_FILES := $(shell find $(shell go list -f '{{.Dir}}' $(GO_PACKAGES)) -name \*.go) -geth: - build/env.sh go run build/ci.go install ./cmd/geth +GIT = git + +tomo: + build/env.sh go run build/ci.go install ./cmd/tomo @echo "Done building." - @echo "Run \"$(GOBIN)/geth\" to launch geth." + @echo "Run \"$(GOBIN)/tomo\" to launch tomo." swarm: build/env.sh go run build/ci.go install ./cmd/swarm @@ -27,12 +32,12 @@ 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)/tomo.aar\" to use the library." ios: build/env.sh go run build/ci.go xcode --local @echo "Done building." - @echo "Import \"$(GOBIN)/Geth.framework\" to use the library." + @echo "Import \"$(GOBIN)/tomo.framework\" to use the library." test: all build/env.sh go run build/ci.go test @@ -55,92 +60,96 @@ devtools: # Cross Compilation Targets (xgo) -geth-cross: geth-linux geth-darwin geth-windows geth-android geth-ios +tomo-cross: tomo-linux tomo-darwin tomo-windows tomo-android tomo-ios @echo "Full cross compilation done:" - @ls -ld $(GOBIN)/geth-* + @ls -ld $(GOBIN)/tomo-* -geth-linux: geth-linux-386 geth-linux-amd64 geth-linux-arm geth-linux-mips64 geth-linux-mips64le +tomo-linux: tomo-linux-386 tomo-linux-amd64 tomo-linux-arm tomo-linux-mips64 tomo-linux-mips64le @echo "Linux cross compilation done:" - @ls -ld $(GOBIN)/geth-linux-* + @ls -ld $(GOBIN)/tomo-linux-* -geth-linux-386: - build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=linux/386 -v ./cmd/geth +tomo-linux-386: + build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=linux/386 -v ./cmd/tomo @echo "Linux 386 cross compilation done:" - @ls -ld $(GOBIN)/geth-linux-* | grep 386 + @ls -ld $(GOBIN)/tomo-linux-* | grep 386 -geth-linux-amd64: - build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=linux/amd64 -v ./cmd/geth +tomo-linux-amd64: + build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=linux/amd64 -v ./cmd/tomo @echo "Linux amd64 cross compilation done:" - @ls -ld $(GOBIN)/geth-linux-* | grep amd64 + @ls -ld $(GOBIN)/tomo-linux-* | grep amd64 -geth-linux-arm: geth-linux-arm-5 geth-linux-arm-6 geth-linux-arm-7 geth-linux-arm64 +tomo-linux-arm: tomo-linux-arm-5 tomo-linux-arm-6 tomo-linux-arm-7 tomo-linux-arm64 @echo "Linux ARM cross compilation done:" - @ls -ld $(GOBIN)/geth-linux-* | grep arm + @ls -ld $(GOBIN)/tomo-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 +tomo-linux-arm-5: + build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=linux/arm-5 -v ./cmd/tomo @echo "Linux ARMv5 cross compilation done:" - @ls -ld $(GOBIN)/geth-linux-* | grep arm-5 + @ls -ld $(GOBIN)/tomo-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 +tomo-linux-arm-6: + build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=linux/arm-6 -v ./cmd/tomo @echo "Linux ARMv6 cross compilation done:" - @ls -ld $(GOBIN)/geth-linux-* | grep arm-6 + @ls -ld $(GOBIN)/tomo-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 +tomo-linux-arm-7: + build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=linux/arm-7 -v ./cmd/tomo @echo "Linux ARMv7 cross compilation done:" - @ls -ld $(GOBIN)/geth-linux-* | grep arm-7 + @ls -ld $(GOBIN)/tomo-linux-* | grep arm-7 -geth-linux-arm64: - build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=linux/arm64 -v ./cmd/geth +tomo-linux-arm64: + build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=linux/arm64 -v ./cmd/tomo @echo "Linux ARM64 cross compilation done:" - @ls -ld $(GOBIN)/geth-linux-* | grep arm64 + @ls -ld $(GOBIN)/tomo-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 +tomo-linux-mips: + build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=linux/mips --ldflags '-extldflags "-static"' -v ./cmd/tomo @echo "Linux MIPS cross compilation done:" - @ls -ld $(GOBIN)/geth-linux-* | grep mips + @ls -ld $(GOBIN)/tomo-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 +tomo-linux-mipsle: + build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=linux/mipsle --ldflags '-extldflags "-static"' -v ./cmd/tomo @echo "Linux MIPSle cross compilation done:" - @ls -ld $(GOBIN)/geth-linux-* | grep mipsle + @ls -ld $(GOBIN)/tomo-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 +tomo-linux-mips64: + build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=linux/mips64 --ldflags '-extldflags "-static"' -v ./cmd/tomo @echo "Linux MIPS64 cross compilation done:" - @ls -ld $(GOBIN)/geth-linux-* | grep mips64 + @ls -ld $(GOBIN)/tomo-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 +tomo-linux-mips64le: + build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=linux/mips64le --ldflags '-extldflags "-static"' -v ./cmd/tomo @echo "Linux MIPS64le cross compilation done:" - @ls -ld $(GOBIN)/geth-linux-* | grep mips64le + @ls -ld $(GOBIN)/tomo-linux-* | grep mips64le -geth-darwin: geth-darwin-386 geth-darwin-amd64 +tomo-darwin: tomo-darwin-386 tomo-darwin-amd64 @echo "Darwin cross compilation done:" - @ls -ld $(GOBIN)/geth-darwin-* + @ls -ld $(GOBIN)/tomo-darwin-* -geth-darwin-386: - build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=darwin/386 -v ./cmd/geth +tomo-darwin-386: + build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=darwin/386 -v ./cmd/tomo @echo "Darwin 386 cross compilation done:" - @ls -ld $(GOBIN)/geth-darwin-* | grep 386 + @ls -ld $(GOBIN)/tomo-darwin-* | grep 386 -geth-darwin-amd64: - build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=darwin/amd64 -v ./cmd/geth +tomo-darwin-amd64: + build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=darwin/amd64 -v ./cmd/tomo @echo "Darwin amd64 cross compilation done:" - @ls -ld $(GOBIN)/geth-darwin-* | grep amd64 + @ls -ld $(GOBIN)/tomo-darwin-* | grep amd64 -geth-windows: geth-windows-386 geth-windows-amd64 +tomo-windows: tomo-windows-386 tomo-windows-amd64 @echo "Windows cross compilation done:" - @ls -ld $(GOBIN)/geth-windows-* + @ls -ld $(GOBIN)/tomo-windows-* -geth-windows-386: - build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=windows/386 -v ./cmd/geth +tomo-windows-386: + build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=windows/386 -v ./cmd/tomo @echo "Windows 386 cross compilation done:" - @ls -ld $(GOBIN)/geth-windows-* | grep 386 + @ls -ld $(GOBIN)/tomo-windows-* | grep 386 -geth-windows-amd64: - build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=windows/amd64 -v ./cmd/geth +tomo-windows-amd64: + build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=windows/amd64 -v ./cmd/tomo @echo "Windows amd64 cross compilation done:" @ls -ld $(GOBIN)/geth-windows-* | grep amd64 + +gofmt: + $(GOFMT) -s -w $(GO_FILES) + $(GIT) checkout vendor diff --git a/README.md b/README.md index 09d0ea9007..552ebc3fbd 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ ## Tomochain +[![Build Status](https://travis-ci.org/tomochain/tomochain.svg?branch=master)](https://travis-ci.org/tomochain/tomochain) + Blockchain for decentralized applications, token issuance and integration https://tomochain.com diff --git a/build/ci.go b/build/ci.go index 1881a596e9..1d95ca0bf0 100644 --- a/build/ci.go +++ b/build/ci.go @@ -188,7 +188,7 @@ func doInstall(cmdline []string) { if minor < 9 { log.Println("You have Go version", runtime.Version()) - log.Println("go-ethereum requires at least Go version 1.9 and cannot") + log.Println("tomo requires at least Go version 1.9 and cannot") log.Println("be compiled with an earlier version. Please upgrade your Go installation.") os.Exit(1) } diff --git a/cmd/faucet/faucet.go b/cmd/faucet/faucet.go index 5bad09bbd5..1e438dd6eb 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: "tomo", Version: params.Version, DataDir: filepath.Join(os.Getenv("HOME"), ".faucet"), P2P: p2p.Config{ diff --git a/cmd/puppeth/module_node.go b/cmd/puppeth/module_node.go index 2609fd976e..6cc9015f07 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 $'geth --networkid {{.NetworkID}} --cache 512 --port {{.Port}} --maxpeers {{.Peers}} {{.LightFlag}} --ethstats \'{{.Ethstats}}\' {{if .Bootnodes}}--bootnodes {{.Bootnodes}}{{end}} {{if .Etherbase}}--etherbase {{.Etherbase}} --mine --minerthreads 1{{end}} {{if .Unlock}}--unlock 0 --password /signer.pass --mine{{end}} --targetgaslimit {{.GasTarget}} --gasprice {{.GasPrice}}' >> geth.sh + echo 'tomo --cache 512 init /genesis.json' > tomo.sh && \{{if .Unlock}} + echo 'mkdir -p /root/.ethereum/keystore/ && cp /signer.json /root/.ethereum/keystore/' >> tomo.sh && \{{end}} + echo $'tomo --networkid {{.NetworkID}} --cache 512 --port {{.Port}} --maxpeers {{.Peers}} {{.LightFlag}} --ethstats \'{{.Ethstats}}\' {{if .Bootnodes}}--bootnodes {{.Bootnodes}}{{end}} {{if .Etherbase}}--etherbase {{.Etherbase}} --mine --minerthreads 1{{end}} {{if .Unlock}}--unlock 0 --password /signer.pass --mine{{end}} --targetgaslimit {{.GasTarget}} --gasprice {{.GasPrice}}' >> tomo.sh -ENTRYPOINT ["/bin/sh", "geth.sh"] +ENTRYPOINT ["/bin/sh", "tomo.sh"] ` // nodeComposefile is the docker-compose.yml file required to deploy and maintain @@ -221,7 +221,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.id attach", network, kind)); err != nil { + if out, err = client.Run(fmt.Sprintf("docker exec %s_%s_1 tomo --exec admin.nodeInfo.id attach", network, kind)); err != nil { return nil, ErrServiceUnreachable } id := bytes.Trim(bytes.TrimSpace(out), "\"") diff --git a/cmd/puppeth/module_wallet.go b/cmd/puppeth/module_wallet.go index 5e5032bedf..11d46ac1bc 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 $'geth --networkid {{.NetworkID}} --port {{.NodePort}} --bootnodes {{.Bootnodes}} --ethstats \'{{.Ethstats}}\' --cache=512 --rpc --rpcaddr=0.0.0.0 --rpccorsdomain "*" --rpcvhosts "*"' >> wallet.sh + echo 'tomo --cache 512 init /genesis.json' >> wallet.sh && \ + echo $'tomo --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/puppeth/wizard_genesis.go b/cmd/puppeth/wizard_genesis.go index f255ef6e65..799384985a 100644 --- a/cmd/puppeth/wizard_genesis.go +++ b/cmd/puppeth/wizard_genesis.go @@ -66,11 +66,16 @@ func (w *wizard) makeGenesis() { genesis.Config.Clique = ¶ms.CliqueConfig{ Period: 15, Epoch: 30000, + Reward: 0, } fmt.Println() fmt.Println("How many seconds should blocks take? (default = 15)") genesis.Config.Clique.Period = uint64(w.readDefaultInt(15)) + fmt.Println() + fmt.Println("How many Ethers should be rewarded to signer? (default = 0)") + genesis.Config.Clique.Reward = uint64(w.readDefaultInt(0)) + // We also need the initial list of signers fmt.Println() fmt.Println("Which accounts are allowed to seal? (mandatory at least one)") diff --git a/cmd/swarm/config.go b/cmd/swarm/config.go index adac772bab..08cd01caff 100644 --- a/cmd/swarm/config.go +++ b/cmd/swarm/config.go @@ -70,7 +70,7 @@ const ( SWARM_ENV_ENS_ADDR = "SWARM_ENS_ADDR" SWARM_ENV_CORS = "SWARM_CORS" SWARM_ENV_BOOTNODES = "SWARM_BOOTNODES" - GETH_ENV_DATADIR = "GETH_DATADIR" + TOMO_ENV_DATADIR = "TOMO_DATADIR" ) // These settings ensure that TOML keys use the same names as Go struct fields. @@ -116,7 +116,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 (tomo --datadir) config.Path = stack.InstanceDir() //finally, initialize the configuration config.Init(prvkey) @@ -243,7 +243,7 @@ func envVarsOverride(currentConfig *bzzapi.Config) (config *bzzapi.Config) { } } - if datadir := os.Getenv(GETH_ENV_DATADIR); datadir != "" { + if datadir := os.Getenv(TOMO_ENV_DATADIR); datadir != "" { currentConfig.Path = datadir } diff --git a/cmd/swarm/main.go b/cmd/swarm/main.go index 360020b77b..77128e411a 100644 --- a/cmd/swarm/main.go +++ b/cmd/swarm/main.go @@ -405,9 +405,9 @@ func bzzd(ctx *cli.Context) error { } cfg := defaultNodeConfig - //geth only supports --datadir via command line + //tomo 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 tomo and swarm if _, err := os.Stat(bzzconfig.Path); err == nil { cfg.DataDir = bzzconfig.Path } diff --git a/cmd/geth/accountcmd.go b/cmd/tomo/accountcmd.go similarity index 97% rename from cmd/geth/accountcmd.go rename to cmd/tomo/accountcmd.go index 0db5c4ce0f..f8d098ac51 100644 --- a/cmd/geth/accountcmd.go +++ b/cmd/tomo/accountcmd.go @@ -36,7 +36,7 @@ var ( ArgsUsage: "", Category: "ACCOUNT COMMANDS", Description: ` - geth wallet import /path/to/my/presale.wallet + tomo 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 + tomo 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 + tomo 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
+ tomo account update
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]
+ tomo account update [options]
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: "", Description: ` - geth account import + tomo account import Imports an unencrypted private key from 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] + tomo account import [options] Note: As you can directly copy your encrypted accounts to another ethereum instance, @@ -291,7 +291,7 @@ func ambiguousAddrRecovery(ks *keystore.KeyStore, err *keystore.AmbiguousAddrErr // accountCreate creates a new account into the keystore defined by the CLI flags. func accountCreate(ctx *cli.Context) error { - cfg := gethConfig{Node: defaultNodeConfig()} + cfg := tomoConfig{Node: defaultNodeConfig()} // Load config file. if file := ctx.GlobalString(configFileFlag.Name); file != "" { if err := loadConfig(file, &cfg); err != nil { diff --git a/cmd/geth/accountcmd_test.go b/cmd/tomo/accountcmd_test.go similarity index 85% rename from cmd/geth/accountcmd_test.go rename to cmd/tomo/accountcmd_test.go index 3ea22ccfab..2c67c59e10 100644 --- a/cmd/geth/accountcmd_test.go +++ b/cmd/tomo/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() + tomo := runTomo(t, "account", "list") + tomo.ExpectExit() } func TestAccountList(t *testing.T) { datadir := tmpDatadirWithKeystore(t) - geth := runGeth(t, "account", "list", "--datadir", datadir) - defer geth.ExpectExit() + tomo := runTomo(t, "account", "list", "--datadir", datadir) + defer tomo.ExpectExit() if runtime.GOOS == "windows" { - geth.Expect(` + tomo.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(` + tomo.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(` + tomo := runTomo(t, "account", "new", "--lightkdf") + defer tomo.ExpectExit() + tomo.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`) + tomo.ExpectRegexp(`Address: \{[0-9a-f]{40}\}\n`) } func TestAccountNewBadRepeat(t *testing.T) { - geth := runGeth(t, "account", "new", "--lightkdf") - defer geth.ExpectExit() - geth.Expect(` + tomo := runTomo(t, "account", "new", "--lightkdf") + defer tomo.ExpectExit() + tomo.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", + tomo := runTomo(t, "account", "update", "--datadir", datadir, "--lightkdf", "f466859ead1932d743d622cb74fc058882e8648a") - defer geth.ExpectExit() - geth.Expect(` + defer tomo.ExpectExit() + tomo.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(` + tomo := runTomo(t, "wallet", "import", "--lightkdf", "testdata/guswallet.json") + defer tomo.ExpectExit() + tomo.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(tomo.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(` + tomo := runTomo(t, "wallet", "import", "--lightkdf", "testdata/guswallet.json") + defer tomo.ExpectExit() + tomo.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, + tomo := runTomo(t, "--datadir", datadir, "--nat", "none", "--nodiscover", "--maxpeers", "0", "--port", "0", "--unlock", "f466859ead1932d743d622cb74fc058882e8648a", "js", "testdata/empty.js") - geth.Expect(` + tomo.Expect(` Unlocking account f466859ead1932d743d622cb74fc058882e8648a | Attempt 1/3 !! Unsupported terminal, password will be echoed. Passphrase: {{.InputLine "foobar"}} `) - geth.ExpectExit() + tomo.ExpectExit() wantMessages := []string{ "Unlocked account", "=0xf466859eAD1932D743d622CB74FC058882E8648A", } for _, m := range wantMessages { - if !strings.Contains(geth.StderrText(), m) { + if !strings.Contains(tomo.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, + tomo := runTomo(t, "--datadir", datadir, "--nat", "none", "--nodiscover", "--maxpeers", "0", "--port", "0", "--unlock", "f466859ead1932d743d622cb74fc058882e8648a") - defer geth.ExpectExit() - geth.Expect(` + defer tomo.ExpectExit() + tomo.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/ethereum/go-ethereum/issues/1785 func TestUnlockFlagMultiIndex(t *testing.T) { datadir := tmpDatadirWithKeystore(t) - geth := runGeth(t, + tomo := runTomo(t, "--datadir", datadir, "--nat", "none", "--nodiscover", "--maxpeers", "0", "--port", "0", "--unlock", "0,2", "js", "testdata/empty.js") - geth.Expect(` + tomo.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() + tomo.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(tomo.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, + tomo := runTomo(t, "--datadir", datadir, "--nat", "none", "--nodiscover", "--maxpeers", "0", "--port", "0", "--password", "testdata/passwords.txt", "--unlock", "0,2", "js", "testdata/empty.js") - geth.ExpectExit() + tomo.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(tomo.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, + tomo := runTomo(t, "--datadir", datadir, "--nat", "none", "--nodiscover", "--maxpeers", "0", "--port", "0", "--password", "testdata/wrong-passwords.txt", "--unlock", "0,2") - defer geth.ExpectExit() - geth.Expect(` + defer tomo.ExpectExit() + tomo.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, + tomo := runTomo(t, "--keystore", store, "--nat", "none", "--nodiscover", "--maxpeers", "0", "--port", "0", "--unlock", "f466859ead1932d743d622cb74fc058882e8648a", "js", "testdata/empty.js") - defer geth.ExpectExit() + defer tomo.ExpectExit() // Helper for the expect template, returns absolute keystore path. - geth.SetTemplateFunc("keypath", func(file string) string { + tomo.SetTemplateFunc("keypath", func(file string) string { abs, _ := filepath.Abs(filepath.Join(store, file)) return abs }) - geth.Expect(` + tomo.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() + tomo.ExpectExit() wantMessages := []string{ "Unlocked account", "=0xf466859eAD1932D743d622CB74FC058882E8648A", } for _, m := range wantMessages { - if !strings.Contains(geth.StderrText(), m) { + if !strings.Contains(tomo.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, + tomo := runTomo(t, "--keystore", store, "--nat", "none", "--nodiscover", "--maxpeers", "0", "--port", "0", "--unlock", "f466859ead1932d743d622cb74fc058882e8648a") - defer geth.ExpectExit() + defer tomo.ExpectExit() // Helper for the expect template, returns absolute keystore path. - geth.SetTemplateFunc("keypath", func(file string) string { + tomo.SetTemplateFunc("keypath", func(file string) string { abs, _ := filepath.Abs(filepath.Join(store, file)) return abs }) - geth.Expect(` + tomo.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() + tomo.ExpectExit() } diff --git a/cmd/geth/bugcmd.go b/cmd/tomo/bugcmd.go similarity index 98% rename from cmd/geth/bugcmd.go rename to cmd/tomo/bugcmd.go index ce9dbe6c0a..2a4ce493f3 100644 --- a/cmd/geth/bugcmd.go +++ b/cmd/tomo/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 tomo repo", ArgsUsage: " ", Category: "MISCELLANEOUS COMMANDS", } diff --git a/cmd/geth/chaincmd.go b/cmd/tomo/chaincmd.go similarity index 100% rename from cmd/geth/chaincmd.go rename to cmd/tomo/chaincmd.go diff --git a/cmd/geth/config.go b/cmd/tomo/config.go similarity index 96% rename from cmd/geth/config.go rename to cmd/tomo/config.go index e6bd4d5bef..8856071901 100644 --- a/cmd/geth/config.go +++ b/cmd/tomo/config.go @@ -74,7 +74,7 @@ type ethstatsConfig struct { URL string `toml:",omitempty"` } -type gethConfig struct { +type tomoConfig struct { Eth eth.Config Shh whisper.Config Node node.Config @@ -82,7 +82,7 @@ type gethConfig struct { Dashboard dashboard.Config } -func loadConfig(file string, cfg *gethConfig) error { +func loadConfig(file string, cfg *tomoConfig) error { f, err := os.Open(file) if err != nil { return err @@ -103,13 +103,13 @@ 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 = "tomo.ipc" return cfg } -func makeConfigNode(ctx *cli.Context) (*node.Node, gethConfig) { +func makeConfigNode(ctx *cli.Context) (*node.Node, tomoConfig) { // Load defaults. - cfg := gethConfig{ + cfg := tomoConfig{ Eth: eth.DefaultConfig, Shh: whisper.DefaultConfig, Node: defaultNodeConfig(), diff --git a/cmd/geth/consolecmd.go b/cmd/tomo/consolecmd.go similarity index 89% rename from cmd/geth/consolecmd.go rename to cmd/tomo/consolecmd.go index 2500a969cf..296e63e66f 100644 --- a/cmd/geth/consolecmd.go +++ b/cmd/tomo/consolecmd.go @@ -41,7 +41,7 @@ var ( Flags: append(append(append(nodeFlags, rpcFlags...), consoleFlags...), whisperFlags...), Category: "CONSOLE COMMANDS", Description: ` -The Geth console is an interactive shell for the JavaScript runtime environment +The Tomo 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/ethereum/go-ethereum/wiki/JavaScript-Console.`, } @@ -54,10 +54,10 @@ See https://github.com/ethereum/go-ethereum/wiki/JavaScript-Console.`, Flags: append(consoleFlags, utils.DataDirFlag), Category: "CONSOLE COMMANDS", Description: ` -The Geth console is an interactive shell for the JavaScript runtime environment +The Tomo 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/ethereum/go-ethereum/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 tomo node.`, } javascriptCommand = cli.Command{ @@ -73,7 +73,7 @@ JavaScript API. See https://github.com/ethereum/go-ethereum/wiki/JavaScript-Cons } ) -// localConsole starts a new geth node, attaching a JavaScript console to it at the +// localConsole starts a new tomo 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 tomo: %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 tomo 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 tomo instance and start the JavaScript console endpoint := ctx.Args().First() if endpoint == "" { path := node.DefaultDataDir() @@ -128,11 +128,11 @@ func remoteConsole(ctx *cli.Context) error { path = filepath.Join(path, "rinkeby") } } - endpoint = fmt.Sprintf("%s/geth.ipc", path) + endpoint = fmt.Sprintf("%s/tomo.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 tomo: %v", err) } config := console.Config{ DataDir: utils.MakeDataDir(ctx), @@ -161,7 +161,7 @@ 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 "tomo attach" and "tomo monitor" with no argument. func dialRPC(endpoint string) (*rpc.Client, error) { if endpoint == "" { endpoint = node.DefaultIPCEndpoint(clientIdentifier) @@ -173,7 +173,7 @@ func dialRPC(endpoint string) (*rpc.Client, error) { return rpc.Dial(endpoint) } -// ephemeralConsole starts a new geth node, attaches an ephemeral JavaScript +// ephemeralConsole starts a new tomo 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 { @@ -185,7 +185,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 tomo: %v", err) } config := console.Config{ DataDir: utils.MakeDataDir(ctx), diff --git a/cmd/geth/consolecmd_test.go b/cmd/tomo/consolecmd_test.go similarity index 74% rename from cmd/geth/consolecmd_test.go rename to cmd/tomo/consolecmd_test.go index 258b9e6dd9..a1e46a736d 100644 --- a/cmd/geth/consolecmd_test.go +++ b/cmd/tomo/consolecmd_test.go @@ -40,25 +40,25 @@ 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 tomo console, make sure it's cleaned up and terminate the console + tomo := runTomo(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.Version }) - geth.SetTemplateFunc("niltime", func() string { return time.Unix(0, 0).Format(time.RFC1123) }) - geth.SetTemplateFunc("apis", func() string { return ipcAPIs }) + tomo.SetTemplateFunc("goos", func() string { return runtime.GOOS }) + tomo.SetTemplateFunc("goarch", func() string { return runtime.GOARCH }) + tomo.SetTemplateFunc("gover", runtime.Version) + tomo.SetTemplateFunc("tomover", func() string { return params.Version }) + tomo.SetTemplateFunc("niltime", func() string { return time.Unix(0, 0).Format(time.RFC1123) }) + tomo.SetTemplateFunc("apis", func() string { return ipcAPIs }) // Verify the actual welcome message to the required template - geth.Expect(` -Welcome to the Geth JavaScript console! + tomo.Expect(` +Welcome to the Tomo JavaScript console! -instance: Geth/v{{gethver}}/{{goos}}-{{goarch}}/{{gover}} +instance: tomo/v{{tomover}}/{{goos}}-{{goarch}}/{{gover}} coinbase: {{.Etherbase}} at block: 0 ({{niltime}}) datadir: {{.Datadir}} @@ -66,7 +66,7 @@ at block: 0 ({{niltime}}) > {{.InputLine "exit"}} `) - geth.ExpectExit() + tomo.ExpectExit() } // Tests that a console can be attached to a running node via various means. @@ -75,57 +75,57 @@ func TestIPCAttachWelcome(t *testing.T) { coinbase := "0x8605cdbbdb6d264aa742e77020dcbc58fcdce182" var ipc string if runtime.GOOS == "windows" { - ipc = `\\.\pipe\geth` + strconv.Itoa(trulyRandInt(100000, 999999)) + ipc = `\\.\pipe\tomo` + strconv.Itoa(trulyRandInt(100000, 999999)) } else { ws := tmpdir(t) defer os.RemoveAll(ws) - ipc = filepath.Join(ws, "geth.ipc") + ipc = filepath.Join(ws, "tomo.ipc") } // Note: we need --shh because testAttachWelcome checks for default // list of ipc modules and shh is included there. - geth := runGeth(t, + tomo := runTomo(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, tomo, "ipc:"+ipc, ipcAPIs) - geth.Interrupt() - geth.ExpectExit() + tomo.Interrupt() + tomo.ExpectExit() } func TestHTTPAttachWelcome(t *testing.T) { coinbase := "0x8605cdbbdb6d264aa742e77020dcbc58fcdce182" port := strconv.Itoa(trulyRandInt(1024, 65536)) // Yeah, sometimes this will fail, sorry :P - geth := runGeth(t, + tomo := runTomo(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, tomo, "http://localhost:"+port, httpAPIs) - geth.Interrupt() - geth.ExpectExit() + tomo.Interrupt() + tomo.ExpectExit() } func TestWSAttachWelcome(t *testing.T) { coinbase := "0x8605cdbbdb6d264aa742e77020dcbc58fcdce182" port := strconv.Itoa(trulyRandInt(1024, 65536)) // Yeah, sometimes this will fail, sorry :P - geth := runGeth(t, + tomo := runTomo(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, tomo, "ws://localhost:"+port, httpAPIs) - geth.Interrupt() - geth.ExpectExit() + tomo.Interrupt() + tomo.ExpectExit() } -func testAttachWelcome(t *testing.T, geth *testgeth, endpoint, apis string) { - // Attach to a running geth note and terminate immediately - attach := runGeth(t, "attach", endpoint) +func testAttachWelcome(t *testing.T, tomo *testtomo, endpoint, apis string) { + // Attach to a running tomo note and terminate immediately + attach := runTomo(t, "attach", endpoint) defer attach.ExpectExit() attach.CloseStdin() @@ -133,18 +133,18 @@ func testAttachWelcome(t *testing.T, geth *testgeth, endpoint, apis string) { attach.SetTemplateFunc("goos", func() string { return runtime.GOOS }) attach.SetTemplateFunc("goarch", func() string { return runtime.GOARCH }) attach.SetTemplateFunc("gover", runtime.Version) - attach.SetTemplateFunc("gethver", func() string { return params.Version }) - attach.SetTemplateFunc("etherbase", func() string { return geth.Etherbase }) + attach.SetTemplateFunc("tomover", func() string { return params.Version }) + attach.SetTemplateFunc("etherbase", func() string { return tomo.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 tomo.Datadir }) attach.SetTemplateFunc("apis", func() string { return apis }) // Verify the actual welcome message to the required template attach.Expect(` -Welcome to the Geth JavaScript console! +Welcome to the Tomo JavaScript console! -instance: Geth/v{{gethver}}/{{goos}}-{{goarch}}/{{gover}} +instance: tomo/v{{tomover}}/{{goos}}-{{goarch}}/{{gover}} coinbase: {{etherbase}} at block: 0 ({{niltime}}){{if ipc}} datadir: {{datadir}}{{end}} diff --git a/cmd/geth/dao_test.go b/cmd/tomo/dao_test.go similarity index 95% rename from cmd/geth/dao_test.go rename to cmd/tomo/dao_test.go index a8dbc51630..57ad762d11 100644 --- a/cmd/geth/dao_test.go +++ b/cmd/tomo/dao_test.go @@ -106,21 +106,21 @@ func testDAOForkBlockNewChain(t *testing.T, test int, genesis string, expectBloc datadir := tmpdir(t) defer os.RemoveAll(datadir) - // Start a Geth instance with the requested flags set and immediately terminate + // Start a tomo instance with the requested flags set and immediately terminate if genesis != "" { json := filepath.Join(datadir, "genesis.json") if err := ioutil.WriteFile(json, []byte(genesis), 0600); err != nil { t.Fatalf("test %d: failed to write genesis file: %v", test, err) } - runGeth(t, "--datadir", datadir, "init", json).WaitExit() + runTomo(t, "--datadir", datadir, "init", json).WaitExit() } 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() + tomo := runTomo(t, append(args, []string{"--exec", "2+2", "console"}...)...) + tomo.WaitExit() } // Retrieve the DAO config flag from the database - path := filepath.Join(datadir, "geth", "chaindata") + path := filepath.Join(datadir, "tomo", "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/tomo/genesis_test.go similarity index 94% rename from cmd/geth/genesis_test.go rename to cmd/tomo/genesis_test.go index a00ae00c19..b2fe8ea306 100644 --- a/cmd/geth/genesis_test.go +++ b/cmd/tomo/genesis_test.go @@ -84,7 +84,7 @@ var customGenesisTests = []struct { }, } -// Tests that initializing Geth with a custom genesis block and chain definitions +// Tests that initializing tomo with a custom genesis block and chain definitions // work properly. func TestCustomGenesis(t *testing.T) { for i, tt := range customGenesisTests { @@ -97,14 +97,14 @@ func TestCustomGenesis(t *testing.T) { if err := ioutil.WriteFile(json, []byte(tt.genesis), 0600); err != nil { t.Fatalf("test %d: failed to write genesis file: %v", i, err) } - runGeth(t, "--datadir", datadir, "init", json).WaitExit() + runTomo(t, "--datadir", datadir, "init", json).WaitExit() // Query the custom genesis block - geth := runGeth(t, + tomo := runTomo(t, "--datadir", datadir, "--maxpeers", "0", "--port", "0", "--nodiscover", "--nat", "none", "--ipcdisable", "--exec", tt.query, "console") - geth.ExpectRegexp(tt.result) - geth.ExpectExit() + tomo.ExpectRegexp(tt.result) + tomo.ExpectExit() } } diff --git a/cmd/geth/main.go b/cmd/tomo/main.go similarity index 96% rename from cmd/geth/main.go rename to cmd/tomo/main.go index d94154245f..fd2bcde89c 100644 --- a/cmd/geth/main.go +++ b/cmd/tomo/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 . -// geth is the official command-line client for Ethereum. +// tomo is the official command-line client for Ethereum. package main import ( @@ -39,7 +39,7 @@ import ( ) const ( - clientIdentifier = "geth" // Client identifier to advertise over the network + clientIdentifier = "tomo" // Client identifier to advertise over the network ) var ( @@ -143,8 +143,8 @@ var ( ) func init() { - // Initialize the CLI app and start Geth - app.Action = geth + // Initialize the CLI app and start tomo + app.Action = tomo app.HideVersion = true // we have a command to print the version app.Copyright = "Copyright 2013-2017 The go-ethereum Authors" app.Commands = []cli.Command{ @@ -209,10 +209,10 @@ func main() { } } -// geth is the main entry point into the system if no special subcommand is ran. +// tomo 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 tomo(ctx *cli.Context) error { node := makeFullNode(ctx) startNode(ctx, node) node.Wait() diff --git a/cmd/geth/misccmd.go b/cmd/tomo/misccmd.go similarity index 92% rename from cmd/geth/misccmd.go rename to cmd/tomo/misccmd.go index aa9b1ee568..2015ac7388 100644 --- a/cmd/geth/misccmd.go +++ b/cmd/tomo/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 `) + utils.Fatalf(`Usage: tomo makecache `) } 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 `) + utils.Fatalf(`Usage: tomo makedag `) } block, err := strconv.ParseUint(args[0], 0, 64) if err != nil { @@ -123,17 +123,17 @@ func version(ctx *cli.Context) error { } func license(_ *cli.Context) error { - fmt.Println(`Geth is free software: you can redistribute it and/or modify + fmt.Println(`Tomo is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. -Geth is distributed in the hope that it will be useful, +Tomo is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of 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 .`) +along with tomo. If not, see .`) return nil } diff --git a/cmd/geth/monitorcmd.go b/cmd/tomo/monitorcmd.go similarity index 97% rename from cmd/geth/monitorcmd.go rename to cmd/tomo/monitorcmd.go index cd19caa276..e3e3252b36 100644 --- a/cmd/geth/monitorcmd.go +++ b/cmd/tomo/monitorcmd.go @@ -55,7 +55,7 @@ var ( ArgsUsage: " ", Category: "MONITOR COMMANDS", Description: ` -The Geth monitor is a tool to collect and visualize various internal metrics +The tomo monitor is a tool to collect and visualize various internal metrics gathered by the node, supporting different chart types as well as the capacity to display multiple metrics simultaneously. `, @@ -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 tomo 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 tomo (--%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 tomo 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/tomo/run_test.go similarity index 83% rename from cmd/geth/run_test.go rename to cmd/tomo/run_test.go index da82facac3..ba065a6aed 100644 --- a/cmd/geth/run_test.go +++ b/cmd/tomo/run_test.go @@ -27,14 +27,14 @@ import ( ) func tmpdir(t *testing.T) string { - dir, err := ioutil.TempDir("", "geth-test") + dir, err := ioutil.TempDir("", "tomo-test") if err != nil { t.Fatal(err) } return dir } -type testgeth struct { +type testtomo 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 "tomo-test" in runGeth. + reexec.Register("tomo-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 tomo 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 runTomo(t *testing.T, args ...string) *testtomo { + tt := &testtomo{} 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 "tomo". This actually runs the test binary but the TestMain // function will prevent any tests from running. - tt.Run("geth-test", args...) + tt.Run("tomo-test", args...) return tt } diff --git a/cmd/geth/testdata/empty.js b/cmd/tomo/testdata/empty.js similarity index 100% rename from cmd/geth/testdata/empty.js rename to cmd/tomo/testdata/empty.js diff --git a/cmd/geth/testdata/guswallet.json b/cmd/tomo/testdata/guswallet.json similarity index 100% rename from cmd/geth/testdata/guswallet.json rename to cmd/tomo/testdata/guswallet.json diff --git a/cmd/geth/testdata/passwords.txt b/cmd/tomo/testdata/passwords.txt similarity index 100% rename from cmd/geth/testdata/passwords.txt rename to cmd/tomo/testdata/passwords.txt diff --git a/cmd/geth/testdata/wrong-passwords.txt b/cmd/tomo/testdata/wrong-passwords.txt similarity index 100% rename from cmd/geth/testdata/wrong-passwords.txt rename to cmd/tomo/testdata/wrong-passwords.txt diff --git a/cmd/geth/usage.go b/cmd/tomo/usage.go similarity index 99% rename from cmd/geth/usage.go rename to cmd/tomo/usage.go index a1558c2330..6d5ede210d 100644 --- a/cmd/geth/usage.go +++ b/cmd/tomo/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 . -// Contains the geth command usage template and generator. +// Contains the tomo command usage template and generator. package main diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index 4f3d81f5d2..674c2b5f44 100644 --- a/cmd/utils/flags.go +++ b/cmd/utils/flags.go @@ -729,7 +729,7 @@ func setIPC(ctx *cli.Context, cfg *node.Config) { } // makeDatabaseHandles raises out the number of allowed file handles per process -// for Geth and returns half of the allowance to assign to the database. +// for tomo and returns half of the allowance to assign to the database. func makeDatabaseHandles() int { limit, err := fdlimit.Current() if err != nil { @@ -761,7 +761,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 `tomo account list`)") log.Warn("-------------------------------------------------------------------") accs := ks.Accounts() @@ -1276,11 +1276,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. tomo account new --keystore /tmp/mykeystore --lightkdf // // is equivalent after calling this method with: // -// geth --keystore /tmp/mykeystore --lightkdf account new +// tomo --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/consensus/clique/clique.go b/consensus/clique/clique.go index 2bdad9092a..2aa4648552 100644 --- a/consensus/clique/clique.go +++ b/consensus/clique/clique.go @@ -570,6 +570,13 @@ func (c *Clique) Prepare(chain consensus.ChainReader, header *types.Header) erro // Finalize implements consensus.Engine, ensuring no uncles are set, nor block // rewards given, and returns the final block. func (c *Clique) Finalize(chain consensus.ChainReader, header *types.Header, state *state.StateDB, txs []*types.Transaction, uncles []*types.Header, receipts []*types.Receipt) (*types.Block, error) { + // set block reward + // FIXME: unit Ether could be too plump + chainReward := new(big.Int).SetUint64(chain.Config().Clique.Reward * params.Ether) + + reward := new(big.Int).Set(chainReward) + state.AddBalance(header.Coinbase, reward) + // No block rewards in PoA, so the state remains as is and uncles are dropped header.Root = state.IntermediateRoot(chain.Config().IsEIP158(header.Number)) header.UncleHash = types.CalcUncleHash(nil) diff --git a/console/console.go b/console/console.go index b280d4e65d..5019ea180e 100644 --- a/console/console.go +++ b/console/console.go @@ -272,8 +272,8 @@ func (c *Console) AutoCompleteInput(line string, pos int) (string, []string, str // Welcome show summary of current Geth instance and some metadata about the // console's available modules. func (c *Console) Welcome() { - // Print some generic Geth metadata - fmt.Fprintf(c.printer, "Welcome to the Geth JavaScript console!\n\n") + // Print some generic Tomo metadata + fmt.Fprintf(c.printer, "Welcome to the Tomo JavaScript console!\n\n") c.jsre.Run(` console.log("instance: " + web3.version.node); console.log("coinbase: " + eth.coinbase); diff --git a/internal/cmdtest/test_cmd.go b/internal/cmdtest/test_cmd.go index 20e82ec2a9..c2969f8dd1 100644 --- a/internal/cmdtest/test_cmd.go +++ b/internal/cmdtest/test_cmd.go @@ -124,7 +124,7 @@ func (tt *TestCmd) matchExactOutput(want []byte) error { // Find the mismatch position. for i := 0; i < n; i++ { if want[i] != buf[i] { - return fmt.Errorf("Output mismatch at ◊:\n---------------- (stdout text)\n%s◊%s\n---------------- (expected text)\n%s", + return fmt.Errorf("Output mismatch at ◊:\n---------------- (stdout text)\n%s%s\n---------------- (expected text)\n%s", buf[:i], buf[i:n], want) } } diff --git a/params/config.go b/params/config.go index dc02c7ca37..868ed1ff84 100644 --- a/params/config.go +++ b/params/config.go @@ -135,6 +135,7 @@ func (c *EthashConfig) String() string { type CliqueConfig struct { Period uint64 `json:"period"` // Number of seconds between blocks to enforce Epoch uint64 `json:"epoch"` // Epoch length to reset votes and checkpoint + Reward uint64 `json:"reward"` // Block reward - unit Ether } // String implements the stringer interface, returning the consensus engine details. diff --git a/swarm/dev/Makefile b/swarm/dev/Makefile index 365964b7f5..10a0ac44e9 100644 --- a/swarm/dev/Makefile +++ b/swarm/dev/Makefile @@ -4,7 +4,7 @@ default: build build: go build -o bin/swarm github.com/ethereum/go-ethereum/cmd/swarm - go build -o bin/geth github.com/ethereum/go-ethereum/cmd/geth + go build -o bin/tomo github.com/ethereum/go-ethereum/cmd/tomo go build -o bin/bootnode github.com/ethereum/go-ethereum/cmd/bootnode cluster: build