From fd27393df37969f889c29e213a35a1604145bf46 Mon Sep 17 00:00:00 2001 From: Jeffrey Wilcke Date: Tue, 15 Nov 2016 00:40:40 +0100 Subject: [PATCH 01/10] utils: unstable 1.5.1 --- cmd/utils/version.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/utils/version.go b/cmd/utils/version.go index 6baec76139..801017e802 100644 --- a/cmd/utils/version.go +++ b/cmd/utils/version.go @@ -28,10 +28,10 @@ import ( ) const ( - VersionMajor = 1 // Major version component of the current release - VersionMinor = 5 // Minor version component of the current release - VersionPatch = 0 // Patch version component of the current release - VersionMeta = "stable" // Version metadata to append to the version string + VersionMajor = 1 // Major version component of the current release + VersionMinor = 5 // Minor version component of the current release + VersionPatch = 1 // Patch version component of the current release + VersionMeta = "unstable" // Version metadata to append to the version string ) // Version holds the textual version string. From b0a23c73cf8513c74da47b981251935fff0d1e8c Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Tue, 15 Nov 2016 15:46:41 +0100 Subject: [PATCH 02/10] VERSION: bump unstable version to 1.5.1 --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index bc80560fad..26ca594609 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.5.0 +1.5.1 From 4c614909ffccfc571f7225f3e8e83baccbe0a1d6 Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Tue, 15 Nov 2016 15:47:04 +0100 Subject: [PATCH 03/10] README: update for develop->master switch, remove old build table --- README.md | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index ce26061dee..6e5a88e3ca 100644 --- a/README.md +++ b/README.md @@ -1,28 +1,14 @@ ## Ethereum Go -Official golang implementation of the Ethereum protocol - - | Linux | OSX | ARM | Windows | Tests -----------|---------|-----|-----|---------|------ -develop | [![Build+Status](https://build.ethdev.com/buildstatusimage?builder=Linux%20Go%20develop%20branch)](https://build.ethdev.com/builders/Linux%20Go%20develop%20branch/builds/-1) | [![Build+Status](https://build.ethdev.com/buildstatusimage?builder=Linux%20Go%20develop%20branch)](https://build.ethdev.com/builders/OSX%20Go%20develop%20branch/builds/-1) | [![Build+Status](https://build.ethdev.com/buildstatusimage?builder=ARM%20Go%20develop%20branch)](https://build.ethdev.com/builders/ARM%20Go%20develop%20branch/builds/-1) | [![Build+Status](https://build.ethdev.com/buildstatusimage?builder=Windows%20Go%20develop%20branch)](https://build.ethdev.com/builders/Windows%20Go%20develop%20branch/builds/-1) | [![Buildr+Status](https://travis-ci.org/ethereum/go-ethereum.svg?branch=develop)](https://travis-ci.org/ethereum/go-ethereum) [![codecov.io](https://codecov.io/github/ethereum/go-ethereum/coverage.svg?branch=develop)](https://codecov.io/github/ethereum/go-ethereum?branch=develop) -master | [![Build+Status](https://build.ethdev.com/buildstatusimage?builder=Linux%20Go%20master%20branch)](https://build.ethdev.com/builders/Linux%20Go%20master%20branch/builds/-1) | [![Build+Status](https://build.ethdev.com/buildstatusimage?builder=OSX%20Go%20master%20branch)](https://build.ethdev.com/builders/OSX%20Go%20master%20branch/builds/-1) | [![Build+Status](https://build.ethdev.com/buildstatusimage?builder=ARM%20Go%20master%20branch)](https://build.ethdev.com/builders/ARM%20Go%20master%20branch/builds/-1) | [![Build+Status](https://build.ethdev.com/buildstatusimage?builder=Windows%20Go%20master%20branch)](https://build.ethdev.com/builders/Windows%20Go%20master%20branch/builds/-1) | [![Buildr+Status](https://travis-ci.org/ethereum/go-ethereum.svg?branch=master)](https://travis-ci.org/ethereum/go-ethereum) [![codecov.io](https://codecov.io/github/ethereum/go-ethereum/coverage.svg?branch=master)](https://codecov.io/github/ethereum/go-ethereum?branch=master) +Official golang implementation of the Ethereum protocol. [![API Reference]( https://camo.githubusercontent.com/915b7be44ada53c290eb157634330494ebe3e30a/68747470733a2f2f676f646f632e6f72672f6769746875622e636f6d2f676f6c616e672f6764646f3f7374617475732e737667 )](https://godoc.org/github.com/ethereum/go-ethereum) [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/ethereum/go-ethereum?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) -## Automated development builds - -The following builds are built automatically by our build servers after each push to the [develop](https://github.com/ethereum/go-ethereum/tree/develop) branch. - -* [Docker](https://registry.hub.docker.com/u/ethereum/client-go/) -* [OS X](https://build.ethdev.com/builds/OSX%20Go%20develop%20branch/Mist-OSX-latest.dmg) -* Ubuntu - [trusty](https://build.ethdev.com/builds/Linux%20Go%20develop%20deb%20i386-trusty/latest/) | - [utopic](https://build.ethdev.com/builds/Linux%20Go%20develop%20deb%20i386-utopic/latest/) -* [Windows 64-bit](https://build.ethdev.com/builds/Windows%20Go%20develop%20branch/Geth-Win64-latest.zip) -* [ARM](https://build.ethdev.com/builds/ARM%20Go%20develop%20branch/geth-ARM-latest.tar.bz2) +Automated builds are available for stable releases and the unstable master branch. +Binary archives are published at https://geth.ethereum.org/downloads/. ## Building the source @@ -273,7 +259,7 @@ Please make sure your contributions adhere to our coding guidelines: * Code must adhere to the official Go [formatting](https://golang.org/doc/effective_go.html#formatting) guidelines (i.e. uses [gofmt](https://golang.org/cmd/gofmt/)). * Code must be documented adhering to the official Go [commentary](https://golang.org/doc/effective_go.html#commentary) guidelines. - * Pull requests need to be based on and opened against the `develop` branch. + * Pull requests need to be based on and opened against the `master` branch. * Commit messages should be prefixed with the package(s) they modify. * E.g. "eth, rpc: make trace configs optional" From 504815091fc8339cd06003e6394408a7a5738ebd Mon Sep 17 00:00:00 2001 From: Nick Johnson Date: Tue, 15 Nov 2016 17:57:56 +0000 Subject: [PATCH 04/10] containers/docker: Fix dockerfiles for new branch layout; add dockerfile in root --- Dockerfile | 14 ++++++++++++++ containers/docker/develop-alpine/Dockerfile | 2 +- containers/docker/master-alpine/Dockerfile | 2 +- 3 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000000..2d35c0141d --- /dev/null +++ b/Dockerfile @@ -0,0 +1,14 @@ +FROM alpine:3.3 + +ADD . /go-ethereum +RUN \ + apk add --update go make gcc musl-dev && \ + (cd go-ethereum && make geth) && \ + cp go-ethereum/build/bin/geth /geth && \ + apk del go make gcc musl-dev && \ + rm -rf /go-ethereum && rm -rf /var/cache/apk/* + +EXPOSE 8545 +EXPOSE 30303 + +ENTRYPOINT ["/geth"] diff --git a/containers/docker/develop-alpine/Dockerfile b/containers/docker/develop-alpine/Dockerfile index f3247d1788..3393c43374 100644 --- a/containers/docker/develop-alpine/Dockerfile +++ b/containers/docker/develop-alpine/Dockerfile @@ -2,7 +2,7 @@ FROM alpine:3.4 RUN \ apk add --update go git make gcc musl-dev && \ - git clone --depth 1 --branch develop https://github.com/ethereum/go-ethereum && \ + git clone --depth 1 https://github.com/ethereum/go-ethereum && \ (cd go-ethereum && make geth) && \ cp go-ethereum/build/bin/geth /geth && \ apk del go git make gcc musl-dev && \ diff --git a/containers/docker/master-alpine/Dockerfile b/containers/docker/master-alpine/Dockerfile index 3393c43374..5131c473a6 100644 --- a/containers/docker/master-alpine/Dockerfile +++ b/containers/docker/master-alpine/Dockerfile @@ -2,7 +2,7 @@ FROM alpine:3.4 RUN \ apk add --update go git make gcc musl-dev && \ - git clone --depth 1 https://github.com/ethereum/go-ethereum && \ + git clone --depth 1 --branch release/1.5 https://github.com/ethereum/go-ethereum && \ (cd go-ethereum && make geth) && \ cp go-ethereum/build/bin/geth /geth && \ apk del go git make gcc musl-dev && \ From a96d6c68e2933ab4121358bee91d1bd011efe67a Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Tue, 15 Nov 2016 22:20:18 +0100 Subject: [PATCH 05/10] cmd/utils: remove jit flag handling (#3273) The jit config options are not handled, but random selection still took place, printing confusing messages. --- cmd/utils/flags.go | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index 6d9482e693..cac8773e2b 100644 --- a/cmd/utils/flags.go +++ b/cmd/utils/flags.go @@ -22,13 +22,11 @@ import ( "io/ioutil" "math" "math/big" - "math/rand" "os" "path/filepath" "runtime" "strconv" "strings" - "time" "github.com/ethereum/ethash" "github.com/ethereum/go-ethereum/accounts" @@ -717,16 +715,6 @@ func RegisterEthService(ctx *cli.Context, stack *node.Node, extra []byte) { Fatalf("The %v flags are mutually exclusive", netFlags) } - // initialise new random number generator - rand := rand.New(rand.NewSource(time.Now().UnixNano())) - // get enabled jit flag - jitEnabled := ctx.GlobalBool(VMEnableJitFlag.Name) - // if the jit is not enabled enable it for 10 pct of the people - if !jitEnabled && rand.Float64() < 0.1 { - jitEnabled = true - glog.V(logger.Info).Infoln("You're one of the lucky few that will try out the JIT VM (random). If you get a consensus failure please be so kind to report this incident with the block hash that failed. You can switch to the regular VM by setting --jitvm=false") - } - ethConf := ð.Config{ Etherbase: MakeEtherbase(stack.AccountManager(), ctx), ChainConfig: MakeChainConfig(ctx, stack), @@ -742,8 +730,6 @@ func RegisterEthService(ctx *cli.Context, stack *node.Node, extra []byte) { ExtraData: MakeMinerExtra(extra, ctx), NatSpec: ctx.GlobalBool(NatspecEnabledFlag.Name), DocRoot: ctx.GlobalString(DocRootFlag.Name), - EnableJit: jitEnabled, - ForceJit: ctx.GlobalBool(VMForceJitFlag.Name), GasPrice: common.String2Big(ctx.GlobalString(GasPriceFlag.Name)), GpoMinGasPrice: common.String2Big(ctx.GlobalString(GpoMinGasPriceFlag.Name)), GpoMaxGasPrice: common.String2Big(ctx.GlobalString(GpoMaxGasPriceFlag.Name)), From 2d4bd3b3adddbc42c2e5b14920e22178e8b355d4 Mon Sep 17 00:00:00 2001 From: Jeffrey Wilcke Date: Tue, 15 Nov 2016 22:48:00 +0100 Subject: [PATCH 06/10] les: fixed logging --- les/server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/les/server.go b/les/server.go index 60af6a9e18..c763e8c632 100644 --- a/les/server.go +++ b/les/server.go @@ -395,7 +395,7 @@ func makeCht(db ethdb.Database) bool { } else { lastChtNum++ - glog.V(logger.Info).Infoln("CHT %d %064x\n", lastChtNum, root) + glog.V(logger.Detail).Infof("cht: %d %064x", lastChtNum, root) storeChtRoot(db, lastChtNum, root) var data [8]byte From 5a3853f83f931b6a68353cb1f3611f1db345e340 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Wed, 16 Nov 2016 01:44:37 +0200 Subject: [PATCH 07/10] travis: only install the needed three android platforms (#3274) --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 4eda6d49b8..b525482472 100644 --- a/.travis.yml +++ b/.travis.yml @@ -75,7 +75,7 @@ matrix: - mkdir -p $ANDROID_HOME/platforms - mv -f $HOME/.android.platforms $ANDROID_HOME/platforms - - echo "y" | android update sdk --no-ui --filter platform + - echo "y" | android update sdk --no-ui --filter `android list sdk | grep "SDK Platform Android" | grep -E 'API 15|API 19|API 24' | awk '{print $1}' | cut -d '-' -f 1 | tr '\n' ','` - go run build/ci.go aar -signer ANDROID_SIGNING_KEY -deploy https://oss.sonatype.org -upload gethstore/builds - mv -f $ANDROID_HOME/platforms $HOME/.android.platforms From 64359c9417244c7a824ea90b39a20b06f702bc08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Wed, 16 Nov 2016 01:46:40 +0200 Subject: [PATCH 08/10] cmd/utils, mobile, params: set the correct field on testnet EIP 155 (#3272) --- cmd/utils/flags.go | 79 +++++++++++++++++----------------------------- mobile/geth.go | 1 + mobile/params.go | 5 ++- params/config.go | 2 ++ 4 files changed, 36 insertions(+), 51 deletions(-) diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index cac8773e2b..dd18fd78ca 100644 --- a/cmd/utils/flags.go +++ b/cmd/utils/flags.go @@ -847,61 +847,40 @@ func MakeChainConfigFromDb(ctx *cli.Context, db ethdb.Database) *params.ChainCon (genesis.Hash() == params.MainNetGenesisHash && !ctx.GlobalBool(TestNetFlag.Name)) || (genesis.Hash() == params.TestNetGenesisHash && ctx.GlobalBool(TestNetFlag.Name)) - // Set any missing chainConfig fields due to them being unset or system upgrade if defaults { - if config.HomesteadBlock == nil { - if ctx.GlobalBool(TestNetFlag.Name) { - config.HomesteadBlock = params.TestNetHomesteadBlock - } else { - config.HomesteadBlock = params.MainNetHomesteadBlock - } + // Homestead fork + if ctx.GlobalBool(TestNetFlag.Name) { + config.HomesteadBlock = params.TestNetHomesteadBlock + } else { + config.HomesteadBlock = params.MainNetHomesteadBlock } - if config.DAOForkBlock == nil { - if ctx.GlobalBool(TestNetFlag.Name) { - config.DAOForkBlock = params.TestNetDAOForkBlock - } else { - config.DAOForkBlock = params.MainNetDAOForkBlock - } - config.DAOForkSupport = true - } - if config.EIP150Block == nil { - if ctx.GlobalBool(TestNetFlag.Name) { - config.EIP150Block = params.TestNetHomesteadGasRepriceBlock - } else { - config.EIP150Block = params.MainNetHomesteadGasRepriceBlock - } - } - if config.EIP150Hash == (common.Hash{}) { - if ctx.GlobalBool(TestNetFlag.Name) { - config.EIP150Hash = params.TestNetHomesteadGasRepriceHash - } else { - config.EIP150Hash = params.MainNetHomesteadGasRepriceHash - } - } - if config.EIP155Block == nil { - if ctx.GlobalBool(TestNetFlag.Name) { - config.EIP150Block = params.TestNetSpuriousDragon - } else { - config.EIP155Block = params.MainNetSpuriousDragon - } - } - if config.EIP158Block == nil { - if ctx.GlobalBool(TestNetFlag.Name) { - config.EIP158Block = params.TestNetSpuriousDragon - } else { - config.EIP158Block = params.MainNetSpuriousDragon - } - } - if config.ChainId.BitLen() == 0 { - if ctx.GlobalBool(TestNetFlag.Name) { - config.ChainId = params.TestNetChainID - } else { - config.ChainId = params.MainNetChainID - } + // DAO fork + if ctx.GlobalBool(TestNetFlag.Name) { + config.DAOForkBlock = params.TestNetDAOForkBlock + } else { + config.DAOForkBlock = params.MainNetDAOForkBlock } config.DAOForkSupport = true - } + // DoS reprice fork + if ctx.GlobalBool(TestNetFlag.Name) { + config.EIP150Block = params.TestNetHomesteadGasRepriceBlock + config.EIP150Hash = params.TestNetHomesteadGasRepriceHash + } else { + config.EIP150Block = params.MainNetHomesteadGasRepriceBlock + config.EIP150Hash = params.MainNetHomesteadGasRepriceHash + } + // DoS state cleanup fork + if ctx.GlobalBool(TestNetFlag.Name) { + config.EIP155Block = params.TestNetSpuriousDragon + config.EIP158Block = params.TestNetSpuriousDragon + config.ChainId = params.TestNetChainID + } else { + config.EIP155Block = params.MainNetSpuriousDragon + config.EIP158Block = params.MainNetSpuriousDragon + config.ChainId = params.MainNetChainID + } + } // Force override any existing configs if explicitly requested switch { case ctx.GlobalBool(SupportDAOFork.Name): diff --git a/mobile/geth.go b/mobile/geth.go index d7f0800e0b..e209b667ca 100644 --- a/mobile/geth.go +++ b/mobile/geth.go @@ -130,6 +130,7 @@ func NewNode(datadir string, config *NodeConfig) (*Node, error) { if config.EthereumEnabled { ethConf := ð.Config{ ChainConfig: ¶ms.ChainConfig{ + ChainId: big.NewInt(config.EthereumChainConfig.ChainID), HomesteadBlock: big.NewInt(config.EthereumChainConfig.HomesteadBlock), DAOForkBlock: big.NewInt(config.EthereumChainConfig.DAOForkBlock), DAOForkSupport: config.EthereumChainConfig.DAOForkSupport, diff --git a/mobile/params.go b/mobile/params.go index 48344a5387..1b9f124b44 100644 --- a/mobile/params.go +++ b/mobile/params.go @@ -27,6 +27,7 @@ import ( // MainnetChainConfig returns the chain configurations for the main Ethereum network. func MainnetChainConfig() *ChainConfig { return &ChainConfig{ + ChainID: params.MainNetChainID.Int64(), HomesteadBlock: params.MainNetHomesteadBlock.Int64(), DAOForkBlock: params.MainNetDAOForkBlock.Int64(), DAOForkSupport: true, @@ -46,9 +47,10 @@ func MainnetGenesis() string { // TestnetChainConfig returns the chain configurations for the Ethereum test network. func TestnetChainConfig() *ChainConfig { return &ChainConfig{ + ChainID: params.TestNetChainID.Int64(), HomesteadBlock: params.TestNetHomesteadBlock.Int64(), DAOForkBlock: 0, - DAOForkSupport: false, + DAOForkSupport: true, EIP150Block: params.TestNetHomesteadGasRepriceBlock.Int64(), EIP150Hash: Hash{params.TestNetHomesteadGasRepriceHash}, EIP155Block: params.TestNetSpuriousDragon.Int64(), @@ -63,6 +65,7 @@ func TestnetGenesis() string { // ChainConfig is the core config which determines the blockchain settings. type ChainConfig struct { + ChainID int64 // Chain ID for replay protection HomesteadBlock int64 // Homestead switch block DAOForkBlock int64 // TheDAO hard-fork switch block DAOForkSupport bool // Whether the nodes supports or opposes the DAO hard-fork diff --git a/params/config.go b/params/config.go index d27973a329..6d8d73a9be 100644 --- a/params/config.go +++ b/params/config.go @@ -24,6 +24,7 @@ import ( // MainnetChainConfig is the chain parameters to run a node on the main network. var MainnetChainConfig = &ChainConfig{ + ChainId: MainNetChainID, HomesteadBlock: MainNetHomesteadBlock, DAOForkBlock: MainNetDAOForkBlock, DAOForkSupport: true, @@ -35,6 +36,7 @@ var MainnetChainConfig = &ChainConfig{ // TestnetChainConfig is the chain parameters to run a node on the test network. var TestnetChainConfig = &ChainConfig{ + ChainId: TestNetChainID, HomesteadBlock: TestNetHomesteadBlock, DAOForkBlock: TestNetDAOForkBlock, DAOForkSupport: false, From b81baf54239c3a757f1b0d5170240c8b483b8e72 Mon Sep 17 00:00:00 2001 From: Jeffrey Wilcke Date: Wed, 16 Nov 2016 10:46:22 +0100 Subject: [PATCH 09/10] utils: bump stable --- cmd/utils/version.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/utils/version.go b/cmd/utils/version.go index 801017e802..a3f7cfbba9 100644 --- a/cmd/utils/version.go +++ b/cmd/utils/version.go @@ -28,10 +28,10 @@ import ( ) const ( - VersionMajor = 1 // Major version component of the current release - VersionMinor = 5 // Minor version component of the current release - VersionPatch = 1 // Patch version component of the current release - VersionMeta = "unstable" // Version metadata to append to the version string + VersionMajor = 1 // Major version component of the current release + VersionMinor = 5 // Minor version component of the current release + VersionPatch = 1 // Patch version component of the current release + VersionMeta = "stable" // Version metadata to append to the version string ) // Version holds the textual version string. From be2a264915f57c3048444033e5824d6b40b7cad4 Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Wed, 16 Nov 2016 10:53:35 +0100 Subject: [PATCH 10/10] build: set GO15VENDOREXPERIMENT in env.sh This should fix the 'make' build with Go 1.5. --- build/env.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build/env.sh b/build/env.sh index 3914555d1b..af560305b3 100755 --- a/build/env.sh +++ b/build/env.sh @@ -20,7 +20,8 @@ fi # Set up the environment to use the workspace. GOPATH="$workspace" -export GOPATH +GO15VENDOREXPERIMENT=1 +export GOPATH GO15VENDOREXPERIMENT # Run the command inside the workspace. cd "$ethdir/go-ethereum"