Skip to content

Commit

Permalink
Merge pull request ethereum#19 from expanse-org/v1.6.x
Browse files Browse the repository at this point in the history
V1.6.6
  • Loading branch information
chrisfranko committed Jun 4, 2017
2 parents fd5b131 + 5757b6f commit bd76b31
Show file tree
Hide file tree
Showing 484 changed files with 54,613 additions and 8,530 deletions.
21 changes: 20 additions & 1 deletion .mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ RJ Catalano <rj@erisindustries.com>

Nchinda Nchinda <nchinda2@gmail.com>

Aron Fischer <homotopycolimit@users.noreply.github.com>
Aron Fischer <github@aron.guru> <homotopycolimit@users.noreply.github.com>

Vlad Gluhovsky <gluk256@users.noreply.github.com>

Expand All @@ -94,3 +94,22 @@ Nick Johnson <arachnid@notdot.net>
Henning Diedrich <hd@eonblast.com>
Henning Diedrich <hd@eonblast.com> Drake Burroughs <wildfyre@hotmail.com>

Felix Lange <fjl@twurst.com>
Felix Lange <fjl@twurst.com> <fjl@users.noreply.github.com>

Максим Чусовлянов <mchusovlianov@gmail.com>

Louis Holbrook <dev@holbrook.no>
Louis Holbrook <dev@holbrook.no> <nolash@users.noreply.github.com>

Thomas Bocek <tom@tomp2p.net>

Victor Tran <vu.tran54@gmail.com>

Justin Drake <drakefjustin@gmail.com>

Frank Wang <eternnoir@gmail.com>

Gary Rong <garyrong0905@gmail.com>

Guillaume Nicolas <guin56@gmail.com>
6 changes: 2 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@ go_import_path: github.com/expanse-org/go-expanse
sudo: false
matrix:
include:

- os: linux
dist: trusty
sudo: required
go: 1.8
go: 1.8.3
script:
- sudo -E apt-get -yq --no-install-suggests --no-install-recommends --force-yes install fuse
- sudo modprobe fuse
Expand All @@ -16,14 +15,13 @@ matrix:
- go run build/ci.go install

- os: osx
go: 1.8
go: 1.8.3
sudo: required
script:
- brew update
- brew install caskroom/cask/brew-cask
- brew cask install osxfuse
- go run build/ci.go install

install:
- go get golang.org/x/tools/cmd/cover
script:
Expand Down
24 changes: 23 additions & 1 deletion AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -3,40 +3,51 @@
Ales Katona <ales@coinbase.com>
Alex Leverington <alex@ethdev.com>
Alexandre Van de Sande <alex.vandesande@ethdev.com>
Aron Fischer <homotopycolimit@users.noreply.github.com>
Aron Fischer <github@aron.guru>
Bas van Kervel <bas@ethdev.com>
Benjamin Brent <benjamin@benjaminbrent.com>
Brian Schroeder <bts@gmail.com>
Casey Detrio <cdetrio@gmail.com>
Christoph Jentzsch <jentzsch.software@gmail.com>
Daniel A. Nagy <nagy.da@gmail.com>
Diego Siqueira <DiSiqueira@users.noreply.github.com>
Elliot Shepherd <elliot@identitii.com>
Enrique Fynn <enriquefynn@gmail.com>
Ethan Buchman <ethan@coinculture.info>
Fabian Vogelsteller <fabian@frozeman.de>
Fabio Berger <fabioberger1991@gmail.com>
Felix Lange <fjl@twurst.com>
Frank Wang <eternnoir@gmail.com>
Gary Rong <garyrong0905@gmail.com>
Gregg Dourgarian <greggd@tempworks.com>
Guillaume Nicolas <guin56@gmail.com>
Gustav Simonsson <gustav.simonsson@gmail.com>
Hao Bryan Cheng <haobcheng@gmail.com>
Henning Diedrich <hd@eonblast.com>
Isidoro Ghezzi <isidoro.ghezzi@icloud.com>
Jae Kwon <jkwon.work@gmail.com>
Jamie Pitts <james.pitts@gmail.com>
Jason Carver <jacarver@linkedin.com>
Jeff R. Allen <jra@nella.org>
Jeffrey Wilcke <jeffrey@ethereum.org>
Jens Agerberg <github@agerberg.me>
Jonathan Brown <jbrown@bluedroplet.com>
Joseph Chow <ethereum@outlook.com>
Justin Clark-Casey <justincc@justincc.org>
Justin Drake <drakefjustin@gmail.com>
Kenji Siu <kenji@isuntv.com>
Kobi Gurkan <kobigurk@gmail.com>
Lefteris Karapetsas <lefteris@refu.co>
Leif Jurvetson <leijurv@gmail.com>
Lewis Marshall <lewis@lmars.net>
Louis Holbrook <dev@holbrook.no>
Luca Zeug <luclu@users.noreply.github.com>
Maran Hidskes <maran.hidskes@gmail.com>
Marek Kotewicz <marek.kotewicz@gmail.com>
Martin Holst Swende <martin@swende.se>
Matthew Di Ferrante <mattdf@users.noreply.github.com>
Matthew Wampler-Doty <matthew.wampler.doty@gmail.com>
Micah Zoltu <micah@zoltu.net>
Nchinda Nchinda <nchinda2@gmail.com>
Nick Dodson <silentcicero@outlook.com>
Nick Johnson <arachnid@notdot.net>
Expand All @@ -47,17 +58,28 @@ RJ Catalano <rj@erisindustries.com>
Ramesh Nair <ram@hiddentao.com>
Ricardo Catalinas Jiménez <r@untroubled.be>
Rémy Roy <remyroy@remyroy.com>
Shintaro Kaneko <kaneshin0120@gmail.com>
Stein Dekker <dekker.stein@gmail.com>
Steven Roose <stevenroose@gmail.com>
Taylor Gerring <taylor.gerring@gmail.com>
Thomas Bocek <tom@tomp2p.net>
Tosh Camille <tochecamille@gmail.com>
Valentin Wüstholz <wuestholz@users.noreply.github.com>
Victor Farazdagi <simple.square@gmail.com>
Victor Tran <vu.tran54@gmail.com>
Viktor Trón <viktor.tron@gmail.com>
Ville Sundell <github@solarius.fi>
Vincent G <caktux@gmail.com>
Vitalik Buterin <v@buterin.com>
Vivek Anand <vivekanand1101@users.noreply.github.com>
Vlad Gluhovsky <gluk256@users.noreply.github.com>
Yohann Léon <sybiload@gmail.com>
Yoichi Hirai <i@yoichihirai.com>
Zahoor Mohamed <zahoor@zahoor.in>
Zsolt Felföldi <zsfelfoldi@gmail.com>
holisticode <holistic.computing@gmail.com>
ken10100147 <sunhongping@kanjian.com>
ligi <ligi@ligi.de>
xiekeyang <xiekeyang@users.noreply.github.com>
ΞTHΞЯSPHΞЯΞ <{viktor.tron,nagydani,zsfelfoldi}@gmail.com>
Максим Чусовлянов <mchusovlianov@gmail.com>
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ ADD . /go-expanse
RUN \
apk add --update git go make gcc musl-dev linux-headers && \
(cd go-expanse && make gexp) && \
cp go-expanse/build/bin/gexp /gexp && \
cp go-expanse/build/bin/gexp /usr/local/bin/ && \
apk del git go make gcc musl-dev linux-headers && \
rm -rf /go-expanse && rm -rf /var/cache/apk/*

EXPOSE 9656
EXPOSE 42786
EXPOSE 42786/udp

ENTRYPOINT ["/gexp"]
ENTRYPOINT ["gexp"]
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ clean:
# You need to put $GOBIN (or $GOPATH/bin) in your PATH to use 'go generate'.

devtools:
go get -u golang.org/x/tools/cmd/stringer
go get -u github.com/jteeuwen/go-bindata/go-bindata
go get -u github.com/fjl/gencodec
go install ./cmd/abigen
env GOBIN= go get -u golang.org/x/tools/cmd/stringer
env GOBIN= go get -u github.com/jteeuwen/go-bindata/go-bindata
env GOBIN= go get -u github.com/fjl/gencodec
env GOBIN= go install ./cmd/abigen

# Cross Compilation Targets (xgo)

Expand Down
25 changes: 17 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ This command will:
(via the trailing `console` subcommand) through which you can invoke all official [`web3` methods](https://github.com/expanse-org/wiki/wiki/JavaScript-API)
as well as Gexp's own [management APIs](https://github.com/expanse-org/go-expanse/wiki/Management-APIs).
This too is optional and if you leave it out you can always attach to an already running Gexp instance
with `gexp --attach`.
with `gexp attach`.

### Full node on the Expanse test network

Expand All @@ -84,21 +84,24 @@ $ gexp --testnet --fast --cache=512 console
```

The `--fast`, `--cache` flags and `console` subcommand have the exact same meaning as above and they
are equially useful on the testnet too. Please see above for their explanations if you've skipped to
are equally useful on the testnet too. Please see above for their explanations if you've skipped to
here.

Specifying the `--testnet` flag however will reconfigure your Gexp instance a bit:

* Instead of using the default data directory (`~/.expanse` on Linux for example), Gexp will nest
itself one level deeper into a `testnet` subfolder (`~/.expanse/testnet` on Linux).
* Instead of connecting the main Expanse network, the client will connect to the test network,
itself one level deeper into a `testnet` subfolder (`~/.expanse/testnet` on Linux). Note, on OSX
and Linux this also means that attaching to a running testnet node requires the use of a custom
endpoint since `gexp attach` will try to attach to a production node endpoint by default. E.g.
`gexp attach <datadir>/testnet/gexp.ipc`. Windows users are not affected by this.
* Instead of connecting the main Ethereum network, the client will connect to the test network,
>>>>>>> 6171d01b1195abd7ac75044dcd507d4758d83cde
which uses different P2P bootnodes, different network IDs and genesis states.

*Note: Although there are some internal protective measures to prevent transactions from crossing
over between the main network and test network (different starting nonces), you should make sure to
always use separate accounts for play-money and real-money. Unless you manually move accounts, Gexp
will by default correctly separate the two networks and will not make any accounts available between
them.*
over between the main network and test network, you should make sure to always use separate accounts
for play-money and real-money. Unless you manually move accounts, Gexp will by default correctly
separate the two networks and will not make any accounts available between them.*

#### Docker quick start

Expand Down Expand Up @@ -162,6 +165,12 @@ and agree upon. This consists of a small JSON file (e.g. call it `genesis.json`)

```json
{
"config": {
"chainId": 0,
"homesteadBlock": 0,
"eip155Block": 0,
"eip158Block": 0
},
"alloc" : {},
"coinbase" : "0x0000000000000000000000000000000000000000",
"difficulty" : "0x20000",
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.6.0
1.6.6
6 changes: 3 additions & 3 deletions accounts/abi/bind/backends/simulated.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ import (
"github.com/expanse-org/go-expanse/accounts/abi/bind"
"github.com/expanse-org/go-expanse/common"
"github.com/expanse-org/go-expanse/common/math"
"github.com/expanse-org/go-expanse/consensus/ethash"
"github.com/expanse-org/go-expanse/core"
"github.com/expanse-org/go-expanse/core/state"
"github.com/expanse-org/go-expanse/core/types"
"github.com/expanse-org/go-expanse/core/vm"
"github.com/expanse-org/go-expanse/ethdb"
"github.com/expanse-org/go-expanse/event"
"github.com/expanse-org/go-expanse/params"
"github.com/expanse-org/go-expanse/pow"
)

// This nil assignment ensures compile time that SimulatedBackend implements bind.ContractBackend.
Expand All @@ -61,7 +61,7 @@ func NewSimulatedBackend(alloc core.GenesisAlloc) *SimulatedBackend {
database, _ := ethdb.NewMemDatabase()
genesis := core.Genesis{Config: params.AllProtocolChanges, Alloc: alloc}
genesis.MustCommit(database)
blockchain, _ := core.NewBlockChain(database, genesis.Config, new(pow.FakePow), new(event.TypeMux), vm.Config{})
blockchain, _ := core.NewBlockChain(database, genesis.Config, ethash.NewFaker(), new(event.TypeMux), vm.Config{})
backend := &SimulatedBackend{database: database, blockchain: blockchain, config: genesis.Config}
backend.rollback()
return backend
Expand Down Expand Up @@ -248,7 +248,7 @@ func (b *SimulatedBackend) callContract(ctx context.Context, call ethereum.CallM
// Execute the call.
msg := callmsg{call}

evmContext := core.NewEVMContext(msg, block.Header(), b.blockchain)
evmContext := core.NewEVMContext(msg, block.Header(), b.blockchain, nil)
// Create a new environment which holds all relevant information
// about the transaction and calling mechanisms.
vmenv := vm.NewEVM(evmContext, statedb, b.config, vm.Config{})
Expand Down
2 changes: 1 addition & 1 deletion accounts/keystore/account_cache.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2016 The go-ethereum Authors
// Copyright 2017 The go-ethereum Authors
// This file is part of the go-ethereum library.
//
// The go-ethereum library is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion accounts/keystore/account_cache_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2016 The go-ethereum Authors
// Copyright 2017 The go-ethereum Authors
// This file is part of the go-ethereum library.
//
// The go-ethereum library is free software: you can redistribute it and/or modify
Expand Down
5 changes: 2 additions & 3 deletions accounts/keystore/key.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,14 +124,13 @@ func (k *Key) UnmarshalJSON(j []byte) (err error) {
if err != nil {
return err
}

privkey, err := hex.DecodeString(keyJSON.PrivateKey)
privkey, err := crypto.HexToECDSA(keyJSON.PrivateKey)
if err != nil {
return err
}

k.Address = common.BytesToAddress(addr)
k.PrivateKey = crypto.ToECDSA(privkey)
k.PrivateKey = privkey

return nil
}
Expand Down
3 changes: 1 addition & 2 deletions accounts/keystore/keystore.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2015 The go-ethereum Authors
// Copyright 2017 The go-ethereum Authors
// This file is part of the go-ethereum library.
//
// The go-ethereum library is free software: you can redistribute it and/or modify
Expand Down Expand Up @@ -450,7 +450,6 @@ func (ks *KeyStore) ImportECDSA(priv *ecdsa.PrivateKey, passphrase string) (acco
if ks.cache.hasAddress(key.Address) {
return accounts.Account{}, fmt.Errorf("account already exists")
}

return ks.importKey(key, passphrase)
}

Expand Down
3 changes: 2 additions & 1 deletion accounts/keystore/keystore_passphrase.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,8 @@ func DecryptKey(keyjson []byte, auth string) (*Key, error) {
if err != nil {
return nil, err
}
key := crypto.ToECDSA(keyBytes)
key := crypto.ToECDSAUnsafe(keyBytes)

return &Key{
Id: uuid.UUID(keyId),
Address: crypto.PubkeyToAddress(key.PublicKey),
Expand Down
2 changes: 1 addition & 1 deletion accounts/keystore/keystore_passphrase_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func TestKeyEncryptDecrypt(t *testing.T) {
// Decrypt with the correct password
key, err := DecryptKey(keyjson, password)
if err != nil {
t.Errorf("test %d: json key failed to decrypt: %v", i, err)
t.Fatalf("test %d: json key failed to decrypt: %v", i, err)
}
if key.Address != address {
t.Errorf("test %d: key address mismatch: have %x, want %x", i, key.Address, address)
Expand Down
2 changes: 1 addition & 1 deletion accounts/keystore/keystore_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2015 The go-ethereum Authors
// Copyright 2017 The go-ethereum Authors
// This file is part of the go-ethereum library.
//
// The go-ethereum library is free software: you can redistribute it and/or modify
Expand Down
3 changes: 2 additions & 1 deletion accounts/keystore/presale.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ func decryptPreSaleKey(fileContent []byte, password string) (key *Key, err error
return nil, err
}
ethPriv := crypto.Keccak256(plainText)
ecKey := crypto.ToECDSA(ethPriv)
ecKey := crypto.ToECDSAUnsafe(ethPriv)

key = &Key{
Id: nil,
Address: crypto.PubkeyToAddress(ecKey.PublicKey),
Expand Down
4 changes: 2 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ environment:

install:
- rmdir C:\go /s /q
- appveyor DownloadFile https://storage.googleapis.com/golang/go1.8.windows-%GETH_ARCH%.zip
- 7z x go1.8.windows-%GETH_ARCH%.zip -y -oC:\ > NUL
- appveyor DownloadFile https://storage.googleapis.com/golang/go1.8.3.windows-%GETH_ARCH%.zip
- 7z x go1.8.3.windows-%GETH_ARCH%.zip -y -oC:\ > NUL
- go version
- gcc --version

Expand Down
13 changes: 7 additions & 6 deletions build/ci-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ for Ubuntu. Packages are built for the all Ubuntu versions which are supported b
Canonical:

- Trusty Tahr (14.04 LTS)
- Wily Werewolf (15.10)
- Xenial Xerus (16.04 LTS)
- Yakkety Yak (16.10)
- Zesty Zapus (17.04)

Packages of develop branch commits have suffix -unstable and cannot be installed alongside
the stable version. Switching between release streams requires user intervention.
Expand All @@ -21,29 +21,30 @@ variable which Travis CI makes available to certain builds.
We want to build go-expanse with the most recent version of Go, irrespective of the Go
version that is available in the main Ubuntu repository. In order to make this possible,
our PPA depends on the ~gophers/ubuntu/archive PPA. Our source package build-depends on
golang-1.7, which is co-installable alongside the regular golang package. PPA dependencies
golang-1.8, which is co-installable alongside the regular golang package. PPA dependencies
can be edited at https://launchpad.net/%7Eethereum/+archive/ubuntu/ethereum/+edit-dependencies

## Building Packages Locally (for testing)

You need to run Ubuntu to do test packaging.

Add the gophers PPA and install Go 1.7 and Debian packaging tools:
Add the gophers PPA and install Go 1.8 and Debian packaging tools:

$ sudo apt-add-repository ppa:gophers/ubuntu/archive
$ sudo apt-get update
$ sudo apt-get install build-essential golang-1.7 devscripts debhelper
$ sudo apt-get install build-essential golang-1.8 devscripts debhelper

Create the source packages:

$ go run build/ci.go debsrc -workdir dist

Then go into the source package directory for your running distribution and build the package:

$ cd dist/expanse-unstable-1.5.0+xenial
$ cd dist/expanse-beta-1.5.0+xenial

$ dpkg-buildpackage

Built packages are placed in the dist/ directory.

$ cd ..
$ dpkg-deb -c gexp-unstable_1.5.0+xenial_amd64.deb
$ dpkg-deb -c gexp-beta_1.6.0+xenial_amd64.deb
Loading

0 comments on commit bd76b31

Please sign in to comment.