Compare commits
16 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
810389c07a | ||
|
|
3badd3782b | ||
|
|
be2a264915 | ||
|
|
b81baf5423 | ||
|
|
64359c9417 | ||
|
|
5a3853f83f | ||
|
|
532d746036 | ||
|
|
c66e18b175 | ||
|
|
2d4bd3b3ad | ||
|
|
a96d6c68e2 | ||
|
|
504815091f | ||
|
|
4dd3e7fe35 | ||
|
|
4c614909ff | ||
|
|
b0a23c73cf | ||
|
|
922c1f8f9f | ||
|
|
fd27393df3 |
@@ -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
|
||||
|
||||
14
Dockerfile
Normal file
14
Dockerfile
Normal file
@@ -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"]
|
||||
22
README.md
22
README.md
@@ -1,28 +1,14 @@
|
||||
## Ethereum Go
|
||||
|
||||
Official golang implementation of the Ethereum protocol
|
||||
|
||||
| Linux | OSX | ARM | Windows | Tests
|
||||
----------|---------|-----|-----|---------|------
|
||||
develop | [](https://build.ethdev.com/builders/Linux%20Go%20develop%20branch/builds/-1) | [](https://build.ethdev.com/builders/OSX%20Go%20develop%20branch/builds/-1) | [](https://build.ethdev.com/builders/ARM%20Go%20develop%20branch/builds/-1) | [](https://build.ethdev.com/builders/Windows%20Go%20develop%20branch/builds/-1) | [](https://travis-ci.org/ethereum/go-ethereum) [](https://codecov.io/github/ethereum/go-ethereum?branch=develop)
|
||||
master | [](https://build.ethdev.com/builders/Linux%20Go%20master%20branch/builds/-1) | [](https://build.ethdev.com/builders/OSX%20Go%20master%20branch/builds/-1) | [](https://build.ethdev.com/builders/ARM%20Go%20master%20branch/builds/-1) | [](https://build.ethdev.com/builders/Windows%20Go%20master%20branch/builds/-1) | [](https://travis-ci.org/ethereum/go-ethereum) [](https://codecov.io/github/ethereum/go-ethereum?branch=master)
|
||||
Official golang implementation of the Ethereum protocol.
|
||||
|
||||
[](https://godoc.org/github.com/ethereum/go-ethereum)
|
||||
[](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"
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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)),
|
||||
@@ -861,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):
|
||||
|
||||
@@ -30,7 +30,7 @@ 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
|
||||
VersionPatch = 1 // Patch version component of the current release
|
||||
VersionMeta = "stable" // Version metadata to append to the version string
|
||||
)
|
||||
|
||||
|
||||
@@ -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 && \
|
||||
|
||||
@@ -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 && \
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user