Skip to content
This repository was archived by the owner on Oct 4, 2019. It is now read-only.

Commit 498eb63

Browse files
Merge pull request #714 from ChainSafe/master
Merge Atlantis-enabled Geth Classic v6.0.0 into ethereumproject/go-ethereum
2 parents 6be652d + 27a46bd commit 498eb63

File tree

3,632 files changed

+5872
-1406361
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

3,632 files changed

+5872
-1406361
lines changed

.circleci/config.yml

+24-313
Original file line numberDiff line numberDiff line change
@@ -1,330 +1,41 @@
1-
sputnik_vm_steps: &sputnik_vm_steps
2-
steps:
3-
- restore_cache:
4-
key: v8-toolchain-{{ arch }}
5-
- attach_workspace:
6-
at: ~/
7-
- run:
8-
name: Compile SputnikVM-ffi
9-
command: |
10-
export GOPATH=$HOME/go
11-
export PATH=$PATH:$HOME/.cargo/bin:$HOME/janusbin
12-
cd $GOPATH/src/github.com/ethereumproject/go-ethereum
13-
make -C vendor/github.com/ETCDEVTeam/sputnikvm-ffi/c
14-
- persist_to_workspace:
15-
root: ~/
16-
paths:
17-
- go/src/github.com/ethereumproject/go-ethereum/vendor/github.com/ETCDEVTeam/sputnikvm-ffi/c/libsputnikvm.a
18-
19-
deploy_steps: &deploy_steps
20-
steps:
21-
- restore_cache:
22-
key: v8-toolchain-{{ arch }}
23-
- attach_workspace:
24-
at: ~/
25-
- deploy:
26-
name: Deploy to builds.etcdevteam.com
27-
command: |
28-
if [[ $CIRCLE_PROJECT_USERNAME != ethereumproject ]]; then echo "Deployments only enabled from ethereumproject/ repo. Exiting." && exit 0; fi
29-
export GOPATH=$HOME/go
30-
export PATH=$PATH:$HOME/.cargo/bin:$HOME/janusbin
31-
cd $GOPATH/src/github.com/ethereumproject/go-ethereum
32-
cp $GOPATH/bin/geth ./
33-
export VERSION=`janus version -format TAG_OR_NIGHTLY`
34-
./geth version | awk '/^Version: /{if (ENVIRON["VERSION"] != $2){printf "Expected: \"%s\", got \"%s\"\n",ENVIRON["VERSION"], $2; exit 1}}'
35-
36-
./scripts/deploy.sh gcloud-circleci.json.enc
37-
38-
unit_tests_steps: &unit_tests_steps
39-
steps:
40-
- restore_cache:
41-
key: v8-toolchain-{{ arch }}
42-
- attach_workspace:
43-
at: ~/
44-
- run:
45-
name: Run unit tests
46-
command: |
47-
export GOPATH=$HOME/go
48-
export GOBIN=$GOPATH/bin
49-
export PATH=$PATH:$GOBIN
50-
export TAGS="netgo deterministic"
51-
if [ $USE_SPUTNIK_VM == true ]; then
52-
export CGO_LDFLAGS="$GOPATH/src/github.com/ethereumproject/go-ethereum/vendor/github.com/ETCDEVTeam/sputnikvm-ffi/c/libsputnikvm.a -ldl"
53-
if [ "$(uname)" == "Darwin" ]; then
54-
export CGO_LDFLAGS="$CGO_LDFLAGS -lresolv"
55-
fi
56-
export TAGS="sputnikvm $TAGS"
57-
fi
58-
export PATH=$PATH:$HOME/.cargo/bin:$HOME/janusbin
59-
cd $GOPATH/src/github.com/ethereumproject/go-ethereum
60-
go env
61-
# Since core/ and tests/ packages are run deterministically, we can safely
62-
# infer that SputnikVM is functioning the same as the native VM without running
63-
# the schroedinger nondeterministic tests with sputnik enabled.
64-
go test -ldflags "-X github.com/ethereumproject/go-ethereum/core.UseSputnikVM=$USE_SPUTNIK_VM" -tags="$TAGS" ./...
65-
schroedinger -t 5 -f ./schroedinger-tests.txt
66-
67-
bats_tests_steps: &bats_tests_steps
68-
steps:
69-
- restore_cache:
70-
key: v8-toolchain-{{ arch }}
71-
- attach_workspace:
72-
at: ~/
73-
- run:
74-
name: Run bats tests
75-
command: |
76-
export GOPATH=$HOME/go
77-
export CGO_LDFLAGS="$GOPATH/src/github.com/ethereumproject/go-ethereum/vendor/github.com/ETCDEVTeam/sputnikvm-ffi/c/libsputnikvm.a -ldl"
78-
if [ "$(uname)" == "Darwin" ]; then
79-
export CGO_LDFLAGS="$CGO_LDFLAGS -lresolv"
80-
else
81-
export EXT_LD_FLAGS="-extldflags=-static"
82-
fi
83-
export PATH=$PATH:$HOME/.cargo/bin:$HOME/janusbin:$HOME/bin
84-
cd $GOPATH/src/github.com/ethereumproject/go-ethereum
85-
# go install ... doesn't work with netgo on CircleCI on Linux
86-
go build -tags="sputnikvm netgo" -ldflags "$EXT_LD_FLAGS -X main.Version=`janus version -format TAG_OR_NIGHTLY`" ./cmd/geth
87-
mkdir -p $GOPATH/bin
88-
mv ./geth $GOPATH/bin/
89-
bats tests/bats
90-
- persist_to_workspace:
91-
root: ~/
92-
paths:
93-
- go/*
94-
951
version: 2
962
jobs:
97-
mac_env_setup:
98-
macos:
99-
xcode: "9.0"
3+
build-linux-go-1.12:
4+
working_directory: ~/go-ethereum
5+
docker:
6+
- image: circleci/golang:1.12
1007
steps:
8+
- checkout
1019
- restore_cache:
102-
key: v8-toolchain-{{ arch }}
10+
keys:
11+
- go-mod-v4-{{ checksum "go.sum" }}
10312
- run:
104-
name: Prepare directories
105-
command: |
106-
export GOPATH=$HOME/go
107-
export PATH=$PATH:$HOME/.cargo/bin:$HOME/janusbin
108-
mkdir -p $GOPATH/src/github.com/ethereumproject
109-
- checkout:
110-
path: ~/go/src/github.com/ethereumproject/go-ethereum
111-
- run:
112-
name: Install required software
113-
command: |
114-
export GOPATH=$HOME/go
115-
export PATH=$PATH:$HOME/.cargo/bin:$HOME/janusbin]
116-
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain stable
117-
if [ ! -x ~/janusbin/janus ]; then
118-
cd $HOME; curl -sL https://raw.githubusercontent.com/ethereumproject/janus/master/get.sh | bash
119-
brew update
120-
export BDIR="$(brew --repo homebrew/core)" && echo "$BDIR" && git -C "$BDIR" reset --hard master && git -C "$BDIR" fetch origin ac2308d7640e45de0de1dbcbb6d4f42fcdd8adde && git -C "$BDIR" checkout FETCH_HEAD && HOMEBREW_NO_AUTO_UPDATE=1 brew install go && brew switch go 1.9.3 && git -C "$BDIR" checkout master && unset BDIR
121-
brew info go
122-
go version
123-
brew install bats
124-
brew install gpg2
125-
go get github.com/etcdevteam/go-schroedinger/cmd/schroedinger/...
126-
fi
127-
- persist_to_workspace:
128-
root: ~/
129-
paths:
130-
- go/src/github.com/ethereumproject/*
13+
name: Compile
14+
command: go build ./...
13115
- save_cache:
132-
key: v8-toolchain-{{ arch }}
16+
key: go-mod-v4-{{ checksum "go.sum" }}
13317
paths:
134-
- /usr/local/bin/bats
135-
- /usr/local/bin/go
136-
- /usr/local/bin/godoc
137-
- /usr/local/bin/gofmt
138-
- /usr/local/bin/gpg
139-
- /usr/local/opt
140-
- /usr/local/Cellar
141-
- /usr/local/Homebrew
142-
- ~/.cargo
143-
- ~/.rustup
144-
- ~/janusbin
145-
- ~/go/bin
146-
147-
linux_env_setup:
18+
- "/go/pkg/mod"
19+
tests-linux-go-1.12:
20+
working_directory: ~/go-ethereum
14821
docker:
149-
- image: circleci/golang:1.9
22+
- image: circleci/golang:1.12
15023
steps:
24+
- checkout
15125
- restore_cache:
152-
key: v8-toolchain-{{ arch }}
153-
- run:
154-
name: Prepare directories
155-
command: |
156-
export GOPATH=$HOME/go
157-
export PATH=$PATH:$HOME/.cargo/bin:$HOME/janusbin
158-
mkdir -p $GOPATH/src/github.com/ethereumproject
159-
- checkout:
160-
path: ~/go/src/github.com/ethereumproject/go-ethereum
26+
keys:
27+
- go-mod-v4-{{ checksum "go.sum" }}
16128
- run:
162-
name: Install required software
163-
command: |
164-
export GOPATH=$HOME/go
165-
export PATH=$PATH:$HOME/.cargo/bin:$HOME/janusbin
166-
git clone https://github.com/sstephenson/bats.git
167-
cd bats
168-
sudo ./install.sh ~/
169-
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain stable
170-
if [ ! -x ~/janusbin/janus ]; then
171-
cd $HOME; curl -sL https://raw.githubusercontent.com/ethereumproject/janus/master/get.sh | bash
172-
fi
173-
go get github.com/etcdevteam/go-schroedinger/cmd/schroedinger/...
174-
- persist_to_workspace:
175-
root: ~/
176-
paths:
177-
- go/src/github.com/ethereumproject/*
29+
name: Run tests
30+
command: go test ./...
17831
- save_cache:
179-
key: v8-toolchain-{{ arch }}
32+
key: go-mod-v4-{{ checksum "go.sum" }}
18033
paths:
181-
- ~/bin
182-
- ~/libexec
183-
- ~/.cargo
184-
- ~/.rustup
185-
- ~/janusbin
186-
- ~/go/bin
187-
188-
mac_sputnik_vm:
189-
macos:
190-
xcode: "9.0"
191-
<<: *sputnik_vm_steps
192-
193-
linux_sputnik_vm:
194-
docker:
195-
- image: circleci/golang:1.9
196-
<<: *sputnik_vm_steps
197-
198-
mac_evm_unit_tests:
199-
macos:
200-
xcode: "9.0"
201-
environment:
202-
USE_SPUTNIK_VM: false
203-
<<: *unit_tests_steps
204-
205-
linux_evm_unit_tests:
206-
docker:
207-
- image: circleci/golang:1.9
208-
environment:
209-
GOMAXPROCS: 2
210-
USE_SPUTNIK_VM: false
211-
<<: *unit_tests_steps
212-
213-
mac_sputnikvm_unit_tests:
214-
macos:
215-
xcode: "9.0"
216-
environment:
217-
USE_SPUTNIK_VM: true
218-
<<: *unit_tests_steps
219-
220-
linux_sputnikvm_unit_tests:
221-
docker:
222-
- image: circleci/golang:1.9
223-
environment:
224-
GOMAXPROCS: 2
225-
USE_SPUTNIK_VM: true
226-
<<: *unit_tests_steps
227-
228-
mac_bats_tests:
229-
macos:
230-
xcode: "9.0"
231-
<<: *bats_tests_steps
232-
233-
linux_bats_tests:
234-
docker:
235-
- image: circleci/golang:1.9
236-
<<: *bats_tests_steps
237-
238-
mac_deploy:
239-
macos:
240-
xcode: "9.0"
241-
<<: *deploy_steps
242-
243-
linux_deploy:
244-
docker:
245-
- image: circleci/golang:1.9
246-
<<: *deploy_steps
34+
- "/go/pkg/mod"
24735

24836
workflows:
24937
version: 2
250-
mac_build:
251-
jobs:
252-
- mac_env_setup:
253-
filters:
254-
tags:
255-
only: /.*/
256-
- mac_sputnik_vm:
257-
requires:
258-
- mac_env_setup
259-
filters:
260-
tags:
261-
only: /.*/
262-
- mac_evm_unit_tests:
263-
requires:
264-
- mac_env_setup
265-
filters:
266-
tags:
267-
only: /.*/
268-
- mac_sputnikvm_unit_tests:
269-
requires:
270-
- mac_sputnik_vm
271-
filters:
272-
tags:
273-
only: /.*/
274-
- mac_bats_tests:
275-
requires:
276-
- mac_sputnik_vm
277-
filters:
278-
tags:
279-
only: /.*/
280-
- mac_deploy:
281-
requires:
282-
- mac_evm_unit_tests
283-
- mac_sputnikvm_unit_tests
284-
- mac_bats_tests
285-
filters:
286-
branches:
287-
only: master
288-
tags:
289-
only: /.*/
290-
291-
linux_build:
38+
build-workflow:
29239
jobs:
293-
- linux_env_setup:
294-
filters:
295-
tags:
296-
only: /.*/
297-
- linux_sputnik_vm:
298-
requires:
299-
- linux_env_setup
300-
filters:
301-
tags:
302-
only: /.*/
303-
- linux_evm_unit_tests:
304-
requires:
305-
- linux_env_setup
306-
filters:
307-
tags:
308-
only: /.*/
309-
- linux_sputnikvm_unit_tests:
310-
requires:
311-
- linux_sputnik_vm
312-
filters:
313-
tags:
314-
only: /.*/
315-
- linux_bats_tests:
316-
requires:
317-
- linux_sputnik_vm
318-
filters:
319-
tags:
320-
only: /.*/
321-
- linux_deploy:
322-
requires:
323-
- linux_evm_unit_tests
324-
- linux_sputnikvm_unit_tests
325-
- linux_bats_tests
326-
filters:
327-
branches:
328-
only: master
329-
tags:
330-
only: /.*/
40+
- build-linux-go-1.12
41+
- tests-linux-go-1.12

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,5 @@ coverage.txt
3333
.vscode
3434

3535
accounts/testdata/keystore/accounts.db
36+
*sublime-project
37+
*sublime-workspace

.gitmodules

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "tests/testData"]
2+
path = tests/testData
3+
url = https://github.com/ethereum/tests.git

CODEOWNERS

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# These owners will be the default owners for everything in
2+
# the repo. Unless a later match takes precedence, @noot will
3+
# be requested for review when someone opens a pull request.
4+
* @noot

0 commit comments

Comments
 (0)