Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

eth/tracers: replace hardcoded txGas with actual #7

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
184 commits
Select commit Hold shift + click to select a range
2c097bb
mobile: better api for java users (#21580)
MariusVanDerWijden Sep 21, 2020
129cf07
p2p: move rlpx into separate package (#21464)
renaynay Sep 22, 2020
fdb7424
cmd/clef, cmd/geth: use SplitAndTrim from cmd/utils (#21579)
binacs Sep 22, 2020
e1365b2
trie: fix gaped range proof test case (#21484)
rjl493456442 Sep 23, 2020
25b1608
trie: support empty range proof (#21199)
rjl493456442 Sep 23, 2020
0921f8a
internal/ethapi: add optional parameter blockNrOrHash to estimateGas …
MariusVanDerWijden Sep 23, 2020
e5defcc
trie: extend range proof (#21250)
rjl493456442 Sep 23, 2020
c154442
internal/ethapi: fix nil deref + fix estimateGas console bindings (#2…
MariusVanDerWijden Sep 23, 2020
a25899f
cmd/devp2p: add eth protocol test suite (#21598)
renaynay Sep 23, 2020
39f8268
cmd/devp2p/internal/ethtest: update version in handshake (#21603)
renaynay Sep 23, 2020
fdd42d4
cmd/devp2p/internal/ethtest: lower protocol version to 64 (#21604)
renaynay Sep 24, 2020
b5d362b
params: update CHTs for Geth v1.9.22
karalabe Sep 28, 2020
7ddb44b
Merge pull request #21635 from karalabe/cht-1.9.22
karalabe Sep 28, 2020
c71a7e2
params: release Geth v1.9.22
karalabe Sep 28, 2020
c995914
params: begin v1.9.23 release cycle
karalabe Sep 28, 2020
420b786
accounts/abi: ABI explicit difference between Unpack and UnpackIntoIn…
MariusVanDerWijden Sep 28, 2020
a90e645
mobile: added constructor for big int (#21597)
MariusVanDerWijden Sep 28, 2020
0ddd461
core/vm, params: make 2200 in line with spec (#21605)
holiman Sep 28, 2020
eebfb13
core: free pointer from slice after popping element from price heap (…
aaronbuchwald Sep 28, 2020
a04294d
internal/web3ext: improve eth_getBlockByNumber and eth_getBlockByHash…
mrFranklin Sep 28, 2020
b007df8
light: fix wrong description in a comment (#21573)
azuchi Sep 28, 2020
6660929
p2p/enode: remove unused code (#21612)
mrFranklin Sep 28, 2020
901471f
build: keep geth-sources.jar build result for JavaDoc (#21596)
MariusVanDerWijden Sep 28, 2020
4ee11b0
cmd/bootnode,internal/debug: fix some comments (#21623)
mrFranklin Sep 29, 2020
6c8310e
trie: use stacktrie for Derivesha operation (#21407)
gballet Sep 29, 2020
dad2658
accounts, signer: implement gnosis safe support (#21593)
holiman Sep 29, 2020
053ed9c
trie: polishes to trie committer (#21351)
rjl493456442 Sep 30, 2020
9d1e202
trie: add Commit-sequence tests for stacktrie commit (#21643)
holiman Sep 30, 2020
a15d71a
core/state/snapshot: stop generator if it hits missing trie nodes (#2…
karalabe Oct 5, 2020
d9890a6
cmd/faucet: enable DNS discovery for known networks (#21636)
fjl Oct 5, 2020
2b2fd74
params: update goerli testnet bootnodes (#21659)
q9f Oct 6, 2020
eb87121
core/bloombits: faster generator (#21625)
holiman Oct 6, 2020
e43d827
core/types: optimize bloom filters (#21624)
holiman Oct 6, 2020
716864d
cmd/devp2p/internal/ethtest: improve eth test suite (#21615)
renaynay Oct 7, 2020
015e789
node: relax websocket connection header check (#21646)
fjl Oct 7, 2020
6d29e19
signer/core: don't mismatch reject and no accounts (#21677)
holiman Oct 8, 2020
5e86e4e
p2p/discover: remove use of shared hash instance for key derivation (…
fjl Oct 8, 2020
43cd31e
core/vm: dedup config check in markdown logger (#21655)
gballet Oct 8, 2020
905ed10
eth/downloader: fix data race around the ancientlimit (#21681)
rjl493456442 Oct 9, 2020
19a1c95
eth/downloader: cache parent hash instead of recomputing (#21678)
MariusVanDerWijden Oct 9, 2020
706f5e3
core: fix txpool off-by-one error (#21683)
holiman Oct 9, 2020
86dd005
trie: polish commit function (#21692)
rjl493456442 Oct 12, 2020
66c3eb2
accouts, consensus, core: fix some comments (#21617)
mrFranklin Oct 12, 2020
32341f8
console: fix admin.sleepBlocks (#21629)
de1acr0ix Oct 13, 2020
c37e68e
all: replace RWMutex with Mutex in places where RLock is not used (#2…
mrFranklin Oct 13, 2020
94d1f58
consensus/clique: unexport calcDifficulty and improve comment (#21619)
mrFranklin Oct 13, 2020
348c3bc
trie: fix flaw in stacktrie pool reuse (#21699)
holiman Oct 13, 2020
5c6155f
internal/web3ext: improve some web3 apis (#21639)
mrFranklin Oct 13, 2020
7a5a822
eth, p2p: use truncated names (#21698)
holiman Oct 13, 2020
2a9ea6b
cmd/geth, cmd/utils: fixed flags name (#21700)
Neurone Oct 13, 2020
1e10489
miner: don't interrupt mining after successful sync (#21701)
holiman Oct 13, 2020
1fed223
accounts/keystore: fix flaky test (#21703)
MariusVanDerWijden Oct 13, 2020
bdc7554
params: update CHTs (#21706)
rjl493456442 Oct 14, 2020
4eb01b2
miner: set etherbase even if mining isn't possible at the moment (#21…
holiman Oct 14, 2020
524aaf5
p2p/discover: implement v5.1 wire protocol (#21647)
fjl Oct 14, 2020
8c2f271
params: go-ethereum v1.9.23 stable
fjl Oct 15, 2020
51d026c
params: begin v1.9.24 release cycle
fjl Oct 15, 2020
b305591
core/vm: marshall returnData as hexstring in trace logs (#21715)
MariusVanDerWijden Oct 16, 2020
cef3e2d
console: don't exit on ctrl-c, only on ctrl-d (#21660)
renaynay Oct 20, 2020
6e71371
miner: fixed race condition in tests (#21664)
MariusVanDerWijden Oct 20, 2020
9d25f34
core: track and improve tx indexing/unindexing (#21331)
rjl493456442 Oct 20, 2020
3e82c9e
eth/api: fix potential nil deref in AccountRange (#21710)
aaronbuchwald Oct 20, 2020
85d81b2
les: remove clientPeerSet and serverSet (#21566)
zsfelfoldi Oct 21, 2020
91c4607
core: fix blockchain insert report time interval calculation (#21723)
hwanjo Oct 21, 2020
fb2c79d
accounts/usbwallet: fix ledger version check (#21733)
svenski123 Oct 21, 2020
6487c00
all: implement EIP-2929 (gas cost increases for state access opcodes)…
holiman Oct 23, 2020
95f720f
cmd/devp2p/internal/ethtest: update test chain (#21742)
fjl Oct 23, 2020
f5182c7
utils, params: add yolov2 bootnode
holiman Oct 23, 2020
8a94aa9
Merge pull request #21745 from holiman/yolov2_bootnodes
karalabe Oct 23, 2020
68ac4eb
params: update yolov2 bootnode with elastic ip
holiman Oct 23, 2020
7b748e5
Merge pull request #21747 from holiman/yolov2update
karalabe Oct 23, 2020
1a55e20
cmd/geth: fix dir path in geth attach for yolov2 network (#21749)
prestwich Oct 26, 2020
296a27d
accounts/abi/bind: restore error functionality (#21743)
MariusVanDerWijden Oct 27, 2020
18145ad
core/state: maintain one more diff layer (#21730)
rjl493456442 Oct 28, 2020
43c278c
core/state: disable snapshot iteration if it's not fully constructed …
rjl493456442 Oct 28, 2020
b63e3c3
core: improve snapshot journal recovery (#21594)
rjl493456442 Oct 29, 2020
b63bffe
les, p2p/simulations/adapters: fix issues found while simulating les …
rjl493456442 Oct 30, 2020
3eebf34
common: remove ToHex and ToHexArray (#21610)
MariusVanDerWijden Nov 4, 2020
e640267
core/state/snapshot: fix journal recovery from generating old journal…
rjl493456442 Nov 4, 2020
5d20fbb
cmd/devp2p, internal/utesting: implement TAP output (#21760)
fjl Nov 4, 2020
36bb7ac
cmd/devp2p/internal/ethtest: add correct chain files and improve test…
renaynay Nov 4, 2020
175506e
core/types, rlp: optimize derivesha (#21728)
holiman Nov 4, 2020
6cfe494
build: stop verbose output to keep travis from overflowing
karalabe Nov 5, 2020
97fc1c3
Merge pull request #21787 from karalabe/pod-non-verbose
karalabe Nov 5, 2020
81ff700
consensus/ethash: fix the percentage progress report
holiman Nov 9, 2020
7b7b327
core/state/snapshot: update generator marker in sync with flushes
karalabe Nov 9, 2020
8167897
trie, tests/fuzzers: implement a stacktrie fuzzer + stacktrie fixes (…
holiman Nov 9, 2020
eb694ea
travis: drop Go 1.13 builders as it's not supported any more
karalabe Nov 9, 2020
1143dc6
build: stop building for Ubuntu Eoan, not supported any more
karalabe Nov 9, 2020
9e688fb
Merge pull request #21806 from karalabe/deprecate-eoan
karalabe Nov 9, 2020
040928d
Merge pull request #21805 from karalabe/travis-drop-1.13
karalabe Nov 9, 2020
7c30f4d
Merge pull request #21804 from karalabe/snapshot-marker-sync
karalabe Nov 9, 2020
0c34eae
Merge pull request #21803 from holiman/ethash
karalabe Nov 9, 2020
c52dfd5
p2p/simulations/adapters/exec: fix some issues (#21801)
rjl493456442 Nov 10, 2020
941d8b5
scripts: create oss-fuzz script in go-ethereum (#21808)
holiman Nov 10, 2020
70868b1
fuzzers: removed fuzzbuzz configuration (#21813)
MariusVanDerWijden Nov 10, 2020
27d93c1
build: add -dlgo flag in ci.go (#21824)
fjl Nov 11, 2020
d990df9
consensus/ethash: use 64bit indexes for the DAG generation (#21793)
slavikus Nov 11, 2020
d494074
build: fix regressions with the -dlgo change (#21831)
fjl Nov 11, 2020
920a287
.travis.yml: move test builders after install builders (#21833)
fjl Nov 11, 2020
cc05b05
params: release Geth v1.9.24 with Go 1.15.5 (#21842)
karalabe Nov 12, 2020
919229d
params: begin v1.9.25 release cycle
fjl Nov 12, 2020
a19b423
crypto/bn256: improve bn256 fuzzer (#21815)
holiman Nov 13, 2020
9ded4e3
crypto/bn256: better comments for u, P and Order (#21836)
MariusVanDerWijden Nov 13, 2020
0703c91
tests/fuzzers: improve the fuzzers (#21829)
holiman Nov 13, 2020
6f4cccf
core/vm, protocol_params: implement eip-2565 modexp repricing (#21607)
holiman Nov 13, 2020
2045a2b
core, all: split vm.Context into BlockContext and TxContext (#21672)
MariusVanDerWijden Nov 13, 2020
cf856ea
accounts/abi: template: set events Raw field in Parse methods (#21807)
nfeignon Nov 13, 2020
92c56eb
common: fix documentation of Address.SetBytes (#21814)
PascalDierich Nov 16, 2020
1ea7537
crypto/bn256: refine comments according to #19577, #21595, and #21836…
SadPencil Nov 17, 2020
844485e
consensus/ethash: fix usage of *reflect.SliceHeader (#21372)
prestonvanloon Nov 17, 2020
d513584
cmd/geth: remove retesteth
holiman Nov 17, 2020
db87223
crypto/secp256k1: add checking z sign in affineFromJacobian (#18419)
hbakhtiyor Nov 17, 2020
6b98580
cmd/geth: improve les test on windows (#21860)
holiman Nov 17, 2020
23524f8
all: disable recording preimage of trie keys (#21402)
rjl493456442 Nov 18, 2020
b9ff57c
metrics: fix the panic for reading empty cpu stats (#21864)
rjl493456442 Nov 18, 2020
2808046
Merge pull request #21861 from holiman/remove_retesteth
karalabe Nov 19, 2020
f1e1d9f
node: support expressive origin rules in ws.origins (#21481)
wbt Nov 19, 2020
6f88d65
trie, rpc, cmd/geth: fix tests on 32-bit and windows + minor rpc fixe…
holiman Nov 19, 2020
ebb9591
crypto/bn256: fix bn256Mul fuzzer to not hang on large input (#21872)
holiman Nov 20, 2020
3ef5277
p2p: avoid spinning loop on out-of-handles (#21878)
holiman Nov 20, 2020
bddf5aa
les/utils: protect against WeightedRandomSelect overflow (#21839)
zsfelfoldi Nov 23, 2020
f6e1aed
github: Add new style of issue-templates
ligi Nov 23, 2020
6104ab6
tests/fuzzers/bls1381: add bls fuzzer (#21796)
holiman Nov 23, 2020
ead8146
Merge pull request #21890 from ligi/issue_templates
karalabe Nov 23, 2020
6b58409
cmd/faucet: improve handling of facebook post url (#21838)
LieutenantRoger Nov 24, 2020
bddd103
les: fix GetProofsV2 bug (#21896)
zsfelfoldi Nov 24, 2020
7e7a3f0
github: Remove vulnerability.md (#21894)
ligi Nov 24, 2020
59b480a
cmd/devp2p/internal/ethtest: add 'large announcement' tests (#21792)
MariusVanDerWijden Nov 24, 2020
29efe1f
core/types: fixed typo (#21897)
MariusVanDerWijden Nov 25, 2020
c92faee
all: simplify nested complexity and if blocks ending with a return st…
alexprut Nov 25, 2020
f59ed35
graphql: always return 400 if errors are present in the response (#21…
atoulme Nov 25, 2020
810f9e0
all: remove redundant conversions and import names (#21903)
alexprut Nov 25, 2020
429e714
p2p/discover: fix deadlock in discv5 message dispatch (#21858)
nisdas Nov 25, 2020
fa572cd
crypto: signing builds with signify/minisign (#21798)
gballet Nov 27, 2020
b71334a
accounts, signer: fix Ledger Live account derivation path (clef) (#21…
svenski123 Nov 29, 2020
566cb4c
accounts/keystore: add missing function doc for SignText (#21914)
pmerkleplant Nov 30, 2020
aba0c23
cmd/geth: make tests run quicker + use less memory and disk (#21919)
holiman Nov 30, 2020
a1ddd9e
cmd/devp2p/internal/ethtest: add transaction tests (#21857)
MariusVanDerWijden Nov 30, 2020
e7db1db
p2p/nodestate: fix deadlock during shutdown of les server (#21927)
holiman Nov 30, 2020
a2795c8
les: fix nodiscover option (#21906)
zsfelfoldi Dec 1, 2020
908c180
params: update CHTs (#21941)
rjl493456442 Dec 2, 2020
e9e86ae
eth: fix error in tracing if reexec is set (#21830)
holiman Dec 2, 2020
0b2f144
go.mod: update github.com/golang/snappy(#21934)
holiman Dec 2, 2020
d7a64dc
cmd/devp2p: add node filter for snap + fix arg error (#21950)
holiman Dec 3, 2020
62cedb3
core/vm/runtime: remove duplicated line (#21956)
ziogaschr Dec 4, 2020
7770e41
core: improve contextual information on core errors (#21869)
holiman Dec 4, 2020
15339cf
cmd/geth: implement vulnerability check (#21859)
holiman Dec 4, 2020
581c028
les: cosmetic rewrite of the arm64 float bug workaround (#21960)
gballet Dec 7, 2020
6a4e730
crypto/secp256k1: add workaround for go mod vendor (#21735)
steveruckdashel Dec 8, 2020
ed0670c
accounts/abi/bind: allow specifying signer on transactOpts (#21356)
MariusVanDerWijden Dec 8, 2020
bd848aa
common: improve printing of Hash and Address (#21834)
lobatt Dec 8, 2020
40b6ccf
core,les: headerchain import in batches (#21471)
holiman Dec 9, 2020
915643a
cmd/geth: add test to verify regexps in version check (#21962)
holiman Dec 9, 2020
f935b1d
crypto/signify, build: fix archive signing with signify (#21977)
fjl Dec 9, 2020
817a3fb
p2p/enode: avoid crashing for invalid IP (#21981)
fjl Dec 9, 2020
9f6bb49
les, light: remove untrusted header retrieval in ODR (#21907)
rjl493456442 Dec 10, 2020
b44f24e
core, trie: speed up some tests with quadratic processing flaw (#21987)
holiman Dec 10, 2020
0045410
les: introduce forkID (#21974)
rjl493456442 Dec 10, 2020
1d1f5fe
build: upgrade to Go 1.15.6 (#21986)
fjl Dec 11, 2020
e787272
params: go-ethereum v1.9.25 stable
fjl Dec 11, 2020
fc0662b
params: begin v1.9.26 release cycle
fjl Dec 11, 2020
1a715d7
les: rework float conversion on arm64 and other architectures (#21994)
gballet Dec 11, 2020
62dc59c
miner, test: fix potential goroutine leak (#21989)
lzhfromustc Dec 11, 2020
b47f4ca
cmd/faucet: use Twitter API instead of scraping webpage (#21850)
maxsam4 Dec 11, 2020
88c6962
core/txpool: remove "local" notion from the txpool price heap (#21478)
rjl493456442 Dec 11, 2020
efe6dd2
consensus/ethash: implement faster difficulty calculators (#21976)
holiman Dec 11, 2020
c49aae9
consensus: refactor FinalizeAndAssemble to use Finalize (#21993)
Dec 11, 2020
4d48980
core, eth, les: implement unclean-shutdown marker (#21893)
holiman Dec 11, 2020
38c1d59
abi/bind: fix error-handling in generated wrappers for functions retu…
connorwstein Dec 12, 2020
00d10e6
cmd/abigen: clarify abigen alias flag usage (#21875)
huahuayu Dec 12, 2020
017831d
core, eth: split eth package, implement snap protocol (#21482)
karalabe Dec 14, 2020
4859929
cmd/geth: fixed parallelization flaw in account import test (#22002)
MariusVanDerWijden Dec 14, 2020
0fe66f8
eth/protocols/eth: remove magic numbers in test (#21999)
Mr-Leshiy Dec 14, 2020
8cde296
eth, core: speed up some tests (#22000)
holiman Dec 15, 2020
c7f2536
les: les/4 minimalistic version (#21909)
zsfelfoldi Dec 15, 2020
3c46f55
cmd/faucet: sort requests by newest first (#22018)
MariusVanDerWijden Dec 17, 2020
37b2d02
eth/tracers: share tx gas price with js tracer
gballet Sep 11, 2020
44877c2
eth/tracers: use `go generate`
gballet Sep 21, 2020
86b6908
eth/tracers: try with another version of go-bindata
gballet Sep 21, 2020
ad40b6a
eth/tracers: export txGas
gballet Sep 21, 2020
c4e1371
eth, eth/tracers: pass intrinsic gas to js tracers
s1na Dec 17, 2020
f8173ab
eth/tracers: regenerate assets + unexport test-struct + add testcase
holiman Dec 21, 2020
87dffcf
eth/tracers: simplify tests + make table-driven
holiman Dec 21, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
12 changes: 7 additions & 5 deletions .github/ISSUE_TEMPLATE.md → .github/ISSUE_TEMPLATE/bug.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
Hi there,

Please note that this is an issue tracker reserved for bug reports and feature requests.

For general questions please use [discord](https://discord.gg/nthXNEv) or the Ethereum stack exchange at https://ethereum.stackexchange.com.
---
name: Report a bug
about: Something with go-ethereum is not working as expected
title: ''
labels: 'type:bug'
assignees: ''
---

#### System information

Expand Down
17 changes: 17 additions & 0 deletions .github/ISSUE_TEMPLATE/feature.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
name: Request a feature
about: Report a missing feature - e.g. as a step before submitting a PR
title: ''
labels: 'type:feature'
assignees: ''
---

# Rationale

Why should this feature exist?
What are the use-cases?

# Implementation

Do you have ideas regarding the implementation of this feature?
Are you willing to implement this feature?
9 changes: 9 additions & 0 deletions .github/ISSUE_TEMPLATE/question.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
name: Ask a question
about: Something is unclear
title: ''
labels: 'type:docs'
assignees: ''
---

This should only be used in very rare cases e.g. if you are not 100% sure if something is a bug or asking a question that leads to improving the documentation. For general questions please use [discord](https://discord.gg/nthXNEv) or the Ethereum stack exchange at https://ethereum.stackexchange.com.
138 changes: 53 additions & 85 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,69 +24,6 @@ jobs:
script:
- go run build/ci.go lint

- stage: build
os: linux
dist: xenial
go: 1.13.x
env:
- GO111MODULE=on
script:
- go run build/ci.go install
- go run build/ci.go test -coverage $TEST_PACKAGES

- stage: build
os: linux
dist: xenial
go: 1.14.x
env:
- GO111MODULE=on
script:
- go run build/ci.go install
- go run build/ci.go test -coverage $TEST_PACKAGES

# These are the latest Go versions.
- stage: build
os: linux
arch: amd64
dist: xenial
go: 1.15.x
env:
- GO111MODULE=on
script:
- go run build/ci.go install
- go run build/ci.go test -coverage $TEST_PACKAGES

- stage: build
if: type = pull_request
os: linux
arch: arm64
dist: xenial
go: 1.15.x
env:
- GO111MODULE=on
script:
- go run build/ci.go install
- go run build/ci.go test -coverage $TEST_PACKAGES

- stage: build
os: osx
osx_image: xcode11.3
go: 1.15.x
env:
- GO111MODULE=on
script:
- echo "Increase the maximum number of open file descriptors on macOS"
- NOFILE=20480
- sudo sysctl -w kern.maxfiles=$NOFILE
- sudo sysctl -w kern.maxfilesperproc=$NOFILE
- sudo launchctl limit maxfiles $NOFILE $NOFILE
- sudo launchctl limit maxfiles
- ulimit -S -n $NOFILE
- ulimit -n
- unset -f cd # workaround for https://github.com/travis-ci/travis-ci/issues/8703
- go run build/ci.go install
- go run build/ci.go test -coverage $TEST_PACKAGES

# This builder does the Ubuntu PPA upload
- stage: build
if: type = push
Expand All @@ -109,7 +46,7 @@ jobs:
- python-paramiko
script:
- echo '|1|7SiYPr9xl3uctzovOTj4gMwAC1M=|t6ReES75Bo/PxlOPJ6/GsGbTrM0= ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA0aKz5UTUndYgIGG7dQBV+HaeuEZJ2xPHo2DS2iSKvUL4xNMSAY4UguNW+pX56nAQmZKIZZ8MaEvSj6zMEDiq6HFfn5JcTlM80UwlnyKe8B8p7Nk06PPQLrnmQt5fh0HmEcZx+JU9TZsfCHPnX7MNz4ELfZE6cFsclClrKim3BHUIGq//t93DllB+h4O9LHjEUsQ1Sr63irDLSutkLJD6RXchjROXkNirlcNVHH/jwLWR5RcYilNX7S5bIkK8NlWPjsn/8Ua5O7I9/YoE97PpO6i73DTGLh5H9JN/SITwCKBkgSDWUt61uPK3Y11Gty7o2lWsBjhBUm2Y38CBsoGmBw==' >> ~/.ssh/known_hosts
- go run build/ci.go debsrc -goversion 1.15 -upload ethereum/ethereum -sftp-user geth-ci -signer "Go Ethereum Linux Builder <geth-ci@ethereum.org>"
- go run build/ci.go debsrc -upload ethereum/ethereum -sftp-user geth-ci -signer "Go Ethereum Linux Builder <geth-ci@ethereum.org>"

# This builder does the Linux Azure uploads
- stage: build
Expand All @@ -129,23 +66,23 @@ jobs:
- 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
- go run build/ci.go install -dlgo
- go run build/ci.go archive -type tar -signer LINUX_SIGNING_KEY -signify SIGNIFY_KEY -upload gethstore/builds
- go run build/ci.go install -dlgo -arch 386
- go run build/ci.go archive -arch 386 -type tar -signer LINUX_SIGNING_KEY -signify SIGNIFY_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
- GOARM=5 go run build/ci.go install -dlgo -arch arm -cc arm-linux-gnueabi-gcc
- GOARM=5 go run build/ci.go archive -arch arm -type tar -signer LINUX_SIGNING_KEY -signify SIGNIFY_KEY -upload gethstore/builds
- GOARM=6 go run build/ci.go install -dlgo -arch arm -cc arm-linux-gnueabi-gcc
- GOARM=6 go run build/ci.go archive -arch arm -type tar -signer LINUX_SIGNING_KEY -signify SIGNIFY_KEY -upload gethstore/builds
- GOARM=7 go run build/ci.go install -dlgo -arch arm -cc arm-linux-gnueabihf-gcc
- GOARM=7 go run build/ci.go archive -arch arm -type tar -signer LINUX_SIGNING_KEY -signify SIGNIFY_KEY -upload gethstore/builds
- go run build/ci.go install -dlgo -arch arm64 -cc aarch64-linux-gnu-gcc
- go run build/ci.go archive -arch arm64 -type tar -signer LINUX_SIGNING_KEY -signify SIGNIFY_KEY -upload gethstore/builds

# This builder does the Linux Azure MIPS xgo uploads
- stage: build
Expand All @@ -163,19 +100,19 @@ jobs:
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 archive -arch mips -type tar -signer LINUX_SIGNING_KEY -signify SIGNIFY_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 archive -arch mipsle -type tar -signer LINUX_SIGNING_KEY -signify SIGNIFY_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 archive -arch mips64 -type tar -signer LINUX_SIGNING_KEY signify SIGNIFY_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
- go run build/ci.go archive -arch mips64le -type tar -signer LINUX_SIGNING_KEY -signify SIGNIFY_KEY -upload gethstore/builds

# This builder does the Android Maven and Azure uploads
- stage: build
Expand All @@ -202,7 +139,7 @@ jobs:
git:
submodules: false # avoid cloning ethereum/tests
before_install:
- curl https://dl.google.com/go/go1.15.linux-amd64.tar.gz | tar -xz
- curl https://dl.google.com/go/go1.15.5.linux-amd64.tar.gz | tar -xz
- export PATH=`pwd`/go/bin:$PATH
- export GOROOT=`pwd`/go
- export GOPATH=$HOME/go
Expand All @@ -214,7 +151,7 @@ jobs:

- mkdir -p $GOPATH/src/github.com/ethereum
- ln -s `pwd` $GOPATH/src/github.com/ethereum/go-ethereum
- go run build/ci.go aar -signer ANDROID_SIGNING_KEY -deploy https://oss.sonatype.org -upload gethstore/builds
- go run build/ci.go aar -signer ANDROID_SIGNING_KEY -signify SIGNIFY_KEY -deploy https://oss.sonatype.org -upload gethstore/builds

# This builder does the OSX Azure, iOS CocoaPods and iOS Azure uploads
- stage: build
Expand All @@ -229,8 +166,8 @@ jobs:
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
- go run build/ci.go install -dlgo
- go run build/ci.go archive -type tar -signer OSX_SIGNING_KEY -signify SIGNIFY_KEY -upload gethstore/builds

# Build the iOS framework and upload it to CocoaPods and Azure
- gem uninstall cocoapods -a -x
Expand All @@ -245,7 +182,38 @@ jobs:

# 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
- go run build/ci.go xcode -signer IOS_SIGNING_KEY -signify SIGNIFY_KEY -deploy trunk -upload gethstore/builds

# These builders run the tests
- stage: build
os: linux
arch: amd64
dist: xenial
go: 1.15.x
env:
- GO111MODULE=on
script:
- go run build/ci.go test -coverage $TEST_PACKAGES

- stage: build
if: type = pull_request
os: linux
arch: arm64
dist: xenial
go: 1.15.x
env:
- GO111MODULE=on
script:
- go run build/ci.go test -coverage $TEST_PACKAGES

- stage: build
os: linux
dist: xenial
go: 1.14.x
env:
- GO111MODULE=on
script:
- go run build/ci.go test -coverage $TEST_PACKAGES

# This builder does the Azure archive purges to avoid accumulating junk
- stage: build
Expand Down
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ android:
$(GORUN) build/ci.go aar --local
@echo "Done building."
@echo "Import \"$(GOBIN)/geth.aar\" to use the library."

@echo "Import \"$(GOBIN)/geth-sources.jar\" to add javadocs"
@echo "For more info see https://stackoverflow.com/questions/20994336/android-studio-how-to-attach-javadoc"

ios:
$(GORUN) build/ci.go xcode --local
@echo "Done building."
Expand Down
60 changes: 40 additions & 20 deletions accounts/abi/abi.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,36 +80,56 @@ func (abi ABI) Pack(name string, args ...interface{}) ([]byte, error) {
return append(method.ID, arguments...), nil
}

// Unpack output in v according to the abi specification.
func (abi ABI) Unpack(v interface{}, name string, data []byte) (err error) {
func (abi ABI) getArguments(name string, data []byte) (Arguments, error) {
// since there can't be naming collisions with contracts and events,
// we need to decide whether we're calling a method or an event
var args Arguments
if method, ok := abi.Methods[name]; ok {
if len(data)%32 != 0 {
return fmt.Errorf("abi: improperly formatted output: %s - Bytes: [%+v]", string(data), data)
return nil, fmt.Errorf("abi: improperly formatted output: %s - Bytes: [%+v]", string(data), data)
}
return method.Outputs.Unpack(v, data)
args = method.Outputs
}
if event, ok := abi.Events[name]; ok {
return event.Inputs.Unpack(v, data)
args = event.Inputs
}
return fmt.Errorf("abi: could not locate named method or event")
if args == nil {
return nil, errors.New("abi: could not locate named method or event")
}
return args, nil
}

// Unpack unpacks the output according to the abi specification.
func (abi ABI) Unpack(name string, data []byte) ([]interface{}, error) {
args, err := abi.getArguments(name, data)
if err != nil {
return nil, err
}
return args.Unpack(data)
}

// UnpackIntoInterface unpacks the output in v according to the abi specification.
// It performs an additional copy. Please only use, if you want to unpack into a
// structure that does not strictly conform to the abi structure (e.g. has additional arguments)
func (abi ABI) UnpackIntoInterface(v interface{}, name string, data []byte) error {
args, err := abi.getArguments(name, data)
if err != nil {
return err
}
unpacked, err := args.Unpack(data)
if err != nil {
return err
}
return args.Copy(v, unpacked)
}

// UnpackIntoMap unpacks a log into the provided map[string]interface{}.
func (abi ABI) UnpackIntoMap(v map[string]interface{}, name string, data []byte) (err error) {
// since there can't be naming collisions with contracts and events,
// we need to decide whether we're calling a method or an event
if method, ok := abi.Methods[name]; ok {
if len(data)%32 != 0 {
return fmt.Errorf("abi: improperly formatted output")
}
return method.Outputs.UnpackIntoMap(v, data)
}
if event, ok := abi.Events[name]; ok {
return event.Inputs.UnpackIntoMap(v, data)
args, err := abi.getArguments(name, data)
if err != nil {
return err
}
return fmt.Errorf("abi: could not locate named method or event")
return args.UnpackIntoMap(v, data)
}

// UnmarshalJSON implements json.Unmarshaler interface.
Expand Down Expand Up @@ -250,10 +270,10 @@ func UnpackRevert(data []byte) (string, error) {
if !bytes.Equal(data[:4], revertSelector) {
return "", errors.New("invalid data for unpacking")
}
var reason string
typ, _ := NewType("string", "", nil)
if err := (Arguments{{Type: typ}}).Unpack(&reason, data[4:]); err != nil {
unpacked, err := (Arguments{{Type: typ}}).Unpack(data[4:])
if err != nil {
return "", err
}
return reason, nil
return unpacked[0].(string), nil
}
17 changes: 7 additions & 10 deletions accounts/abi/abi_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,18 +181,15 @@ func TestConstructor(t *testing.T) {
if err != nil {
t.Error(err)
}
v := struct {
A *big.Int
B *big.Int
}{new(big.Int), new(big.Int)}
//abi.Unpack(&v, "", packed)
if err := abi.Constructor.Inputs.Unpack(&v, packed); err != nil {
unpacked, err := abi.Constructor.Inputs.Unpack(packed)
if err != nil {
t.Error(err)
}
if !reflect.DeepEqual(v.A, big.NewInt(1)) {

if !reflect.DeepEqual(unpacked[0], big.NewInt(1)) {
t.Error("Unable to pack/unpack from constructor")
}
if !reflect.DeepEqual(v.B, big.NewInt(2)) {
if !reflect.DeepEqual(unpacked[1], big.NewInt(2)) {
t.Error("Unable to pack/unpack from constructor")
}
}
Expand Down Expand Up @@ -743,7 +740,7 @@ func TestUnpackEvent(t *testing.T) {
}
var ev ReceivedEvent

err = abi.Unpack(&ev, "received", data)
err = abi.UnpackIntoInterface(&ev, "received", data)
if err != nil {
t.Error(err)
}
Expand All @@ -752,7 +749,7 @@ func TestUnpackEvent(t *testing.T) {
Sender common.Address
}
var receivedAddrEv ReceivedAddrEvent
err = abi.Unpack(&receivedAddrEv, "receivedAddr", data)
err = abi.UnpackIntoInterface(&receivedAddrEv, "receivedAddr", data)
if err != nil {
t.Error(err)
}
Expand Down
Loading