Commit Graph

12588 Commits

Author SHA1 Message Date
Martin Holst Swende
14bc6e5130
consensus/ethash: change eip3554 from 9.5M to 9.7M (#22870) 2021-05-17 10:49:23 +02:00
lightclient
597ecb39cc
cmd/evm: return json error if unmarshalling from stdin fails (#22871)
* cmd/evm: return json error if unmarshalling from stdin fails

* cmd/evm: make error capitalizations uniform (all lowercase starts)

* cmd/evm: capitalize error sent directly to stderror
2021-05-17 08:52:32 +02:00
Martin Holst Swende
addd8824cf
cmd/geth, eth, core: snapshot dump + unify with trie dump (#22795)
* cmd/geth, eth, core: snapshot dump + unify with trie dump

* cmd/evm: dump API fixes

* cmd/geth, core, eth: fix some remaining errors

* cmd/evm: dump - add limit, support address startkey, address review concerns

* cmd, core/state, eth: minor polishes, fix snap dump crash, unify format

Co-authored-by: Péter Szilágyi <peterke@gmail.com>
2021-05-12 11:05:39 +03:00
Péter Szilágyi
1cca781a02
Merge pull request #22840 from holiman/eip_3554
consensus/ethash: implement EIP-3554 (bomb delay)
2021-05-12 10:19:08 +03:00
Guillaume Ballet
a2c456a526
core: ensure a broken trie invariant crashes genesis creation (#22780)
* Ensure state could be created in ToBlock

* Fix rebase errors

* use a panic instead
2021-05-11 18:12:10 +03:00
Péter Szilágyi
f34f749e81
Merge pull request #22857 from karalabe/tracer-stack-fix-2
eth/tracers: do the JSON serialization via .js to capture C faults
2021-05-11 17:21:04 +03:00
Péter Szilágyi
0524cede37
eth/tracers: do the JSON serialization via .js to capture C faults 2021-05-11 16:23:54 +03:00
Ryan Schneider
ca98080798
cmd/geth, eth/gasprice: add configurable threshold to gas price oracle (#22752)
This adds a cmd line parameter `--gpo.ignoreprice`, to make the gas price oracle ignore transactions below the given threshold.
2021-05-11 11:25:51 +02:00
Felix Lange
643fd0efc6
core/types: remove support for legacy receipt/log storage encoding (#22852)
* core/types: remove support for legacy receipt storage encoding

* core/types: remove support for legacy log storage encoding
2021-05-11 11:43:35 +03:00
Felix Lange
e536bb52ff
eth/protocols/snap: adapt to uint256 API changes (#22851) 2021-05-10 13:35:07 +02:00
Felix Lange
c0e201b690
eth/protocols/eth, les: avoid Raw() when decoding HashOrNumber (#22841)
Getting the raw value is not necessary to decode this type, and
decoding it directly from the stream is faster.
2021-05-10 12:38:54 +02:00
Martin Holst Swende
ae5fcdc67f
go.mod: upgrade to github.com/holiman/uint256 v1.2.0 (#22745) 2021-05-10 12:29:33 +02:00
Ceelog
f19a679b09
cmd/geth: remove reference to monitor command (#22844)
'geth monitor' subcommand is no longer supported.
2021-05-10 12:19:32 +02:00
Marius Kjærstad
7ab7acfded
build: upgrade -dlgo version to Go 1.16.4 (#22848) 2021-05-10 12:18:42 +02:00
Felix Lange
700df1442d
rlp: add support for optional struct fields (#22832)
This adds support for a new struct tag "optional". Using this tag, structs used
for RLP encoding/decoding can be extended in a backwards-compatible way,
by adding new fields at the end.
2021-05-07 14:37:13 +02:00
Martin Holst Swende
17b1be2661
consensus/ethash: implement EIP-3554 (bomb delay) 2021-05-07 14:04:54 +02:00
Martin Holst Swende
8a070e8f7d
consensus/clique: add some missing checks (#22836) 2021-05-07 10:31:01 +02:00
Martin Holst Swende
a5669ae292
core, params: implement EIP-3529 (#22733)
* core, params: implement EIP-3529

* core/vm: add london instructionset

* core/vm: add method doc for EIP enabler

Co-authored-by: Péter Szilágyi <peterke@gmail.com>
2021-05-07 09:25:32 +03:00
Péter Szilágyi
e77ef8fa8a
Merge pull request #22809 from holiman/alt_3541
core: implement EIP-3541
2021-05-07 08:19:21 +03:00
Paweł Bylica
e69130d9f1
core/vm, params: implement EIP 3541 2021-05-06 11:28:46 +02:00
Martin Holst Swende
cc606be74c
all: define London+baikal, undefine yolov3, add london override flag (#22822)
* all: define London+baikal, undefine yolov3, add london override flag

* cmd, core, params: add baikal genesis definition
2021-05-06 12:07:42 +03:00
Evgeny Danilenko
df20b3b982
core/vm: avoid duplicate log in json logger (#22825) 2021-05-06 10:46:27 +02:00
Felix Lange
37b5595456 params: begin v1.10.4 release cycle 2021-05-05 13:21:13 +02:00
Felix Lange
991384a7f6 params: go-ethereum v1.10.3 stable 2021-05-05 13:20:06 +02:00
rene
0f3a1e7f9b
cmd/devp2p/internal/ethtest: send simultaneous requests on one connection (#22801)
This changes the SimultaneousRequests test to send the requests from the same
connection, as it doesn't really make sense to test whether a node can respond
to two requests with different request IDs from separate connections.
2021-05-05 12:27:27 +02:00
Felix Lange
41671d449f
build: fix windows installer build for NSIS v3.05 (#22821)
With the update to a newer AppVeyor build image, creating the Windows
installer no longer worked because of a string quoting error in EnvVarUpdate.nsh.

This applies the fix recommended in https://stackoverflow.com/questions/62081765.
2021-05-05 12:19:51 +02:00
Felix Lange
3a2b29c1ed
appveyor.yml: upgrade to VisualStudio 2019 image (#22811) 2021-05-04 23:39:09 +03:00
Felix Lange
973ad66b49
build: fix iOS framework build (#22813)
This fixes a regression introduced in #22804.
2021-05-04 21:45:45 +02:00
Felix Lange
d107f90d1c
go.mod: go mod tidy (#22814)
This updates go.mod for the addition of golang.org/x/sync.
2021-05-04 21:45:21 +02:00
Felix Lange
effaf18523
build: improve cross compilation setup (#22804)
This PR cleans up the CI build system and fixes a couple of issues.

- The go tool launcher code has been moved to internal/build. With the new
  toolchain functions, the environment of the host Go (i.e. the one that built
  ci.go) and the target Go (i.e. the toolchain downloaded by -dlgo) are isolated
  more strictly. This is important to make cross compilation and -dlgo work
  correctly in more cases.
- The -dlgo option now skips the download and uses the host Go if the running Go
  version matches dlgoVersion exactly.
- The 'test' command now supports -dlgo, -cc and -arch. Running unit tests with
  foreign GOARCH is occasionally useful. For example, it can be used to run
  32-bit tests on Windows. It can also be used to run darwin/amd64 tests on
  darwin/arm64 using Rosetta 2.
- The 'aar', 'xcode' and 'xgo' commands now use a slightly different method to
  install external tools. They previously used `go get`, but this comes with the
  annoying side effect of modifying go.mod. They now use `go install` instead,
  which is the recommended way of installing tools without modifying the local
  module.
- The old build warning about outdated Go version has been removed because we're
  much better at keeping backwards compatibility now.
2021-05-04 13:01:20 +02:00
Felix Lange
b8040a430e
cmd/utils: use eth DNS tree for snap discovery (#22808)
This removes auto-configuration of the snap.*.ethdisco.net DNS discovery tree.
Since measurements have shown that > 75% of nodes in all.*.ethdisco.net support
snap, we have decided to retire the dedicated index for snap and just use the eth
tree instead.

The dial iterators of eth and snap now use the same DNS tree in the default configuration,
so both iterators should use the same DNS discovery client instance. This ensures that
the record cache and rate limit are shared. Records will not be requested multiple times.

While testing the change, I noticed that duplicate DNS requests do happen even
when the client instance is shared. This is because the two iterators request the tree
root, link tree root, and first levels of the tree in lockstep. To avoid this problem, the
change also adds a singleflight.Group instance in the client. When one iterator
attempts to resolve an entry which is already being resolved, the singleflight object
waits for the existing resolve call to finish and returns the entry to both places.
2021-05-04 11:29:32 +02:00
Péter Szilágyi
640d2c5e30
Merge pull request #22803 from karalabe/silence-scary-warning
eth: don't print db upgrade warning on db init
2021-05-04 10:54:25 +03:00
Péter Szilágyi
856c379626
eth: don't print db upgrade warning on db init 2021-05-03 15:42:43 +03:00
Péter Szilágyi
fc1c1cbea9
Merge pull request #22739 from holiman/remove_code
core: remove old conversion to shuffle leveldb blocks into ancients
2021-05-03 15:37:46 +03:00
Marius van der Wijden
8f94fc26e3
cmd/utils: don't crash on nonexistent datadir (#22738) 2021-05-03 15:29:05 +03:00
Felix Lange
afb097eda8
params: remove dependency on crypto (#22788)
* params: remove dependency on crypto

Package params should not depend on package crypto because building
crypto requires cgo.

Since build/ci.go needs package params to get the go-ethereum version
number, C code must be compiled in order to run the build tool, which is
annoying for certain cross-compilation setups.

* params: add SectionHead
2021-05-03 15:28:02 +03:00
aaronbuchwald
ca9c576e62
core/vm: fix interpreter comments (#22797)
* Fix interpreter comment

* Fix comment
2021-05-03 11:58:00 +03:00
Paweł Bylica
0e00ee42ec
core/vm: clean up contract creation error handling (#22766)
Do not keep separate flag for "max code size exceeded" case, but instead
assign appropriate error for it sooner.
2021-05-01 13:19:24 +02:00
rene
8ff98108e5
cmd/devp2p: fix flakey tests in CI (#22757)
This PR fixes a couple of issues in the eth test suite that caused flakiness when run in the CI.
2021-04-30 22:47:36 +02:00
Péter Szilágyi
afc1abd878
Merge pull request #22789 from karalabe/snap-fix-batch
eth/protocols/snap: use storage batch, not account batch in st task
2021-04-30 21:12:09 +03:00
Péter Szilágyi
52b5d2d869
eth/protocols/snap: use storage batch, not account batch in st task 2021-04-30 18:24:34 +03:00
Péter Szilágyi
8681a2536c
Merge pull request #22777 from karalabe/snapshots-abort-resume-on-sync
core, eth: abort snapshot generation on snap sync and resume later
2021-04-30 17:04:05 +03:00
Péter Szilágyi
745757ac6b
core, eth: abort snapshot generation on snap sync and resume later 2021-04-30 17:03:10 +03:00
aaronbuchwald
bbb57fd64b
core/state: remove toAddr helper in tests (#22772) 2021-04-30 13:10:12 +02:00
aaronbuchwald
f66f1a16b3
eth/filters: fix comment on PublicFilterAPI timeoutLoop (#22782) 2021-04-30 13:00:48 +02:00
Martin Holst Swende
ff75b21f25
README.md: update commands table, add note about web3.js version (#22748) 2021-04-30 12:52:25 +02:00
aaronbuchwald
b778e37daa
core: fix typo in comment (#22773) 2021-04-30 12:50:02 +02:00
aaronbuchwald
dde6cb0b92
core/vm: replace repeated string with variable in tests (#22774) 2021-04-30 12:49:13 +02:00
aaronbuchwald
1e57ab5de6
core: remove unused else branch in reorg (#22783) 2021-04-30 12:47:05 +02:00
aaronbuchwald
8130dd5cef
core/vm: fix typo in comment (#22785) 2021-04-30 12:46:34 +02:00