Commit Graph

13708 Commits

Author SHA1 Message Date
Alex Beregszaszi
3b967d16ca
core/vm: implement EIP-3855: PUSH0 instruction (#24039)
* core/vm: Implement PUSH0

* Move PUSH0 to enable3855

* Add method doc
2022-05-06 14:36:45 +02:00
rjl493456442
1941c5e6c9
core/rawdb: untie freezer and ancient chain data (#24684)
Previously freezer has only been used for storing ancient chain data, while obviously it can be used more. This PR unties the chain data and freezer, keep the minimal freezer structure and move all other logic (like incrementally freezing block data) into a separate structure called ChainFreezer.

This PR also extends the database interface by adding a new ancient store function AncientDatadir which can return the root directory of ancient store. The ancient root directory can be used when we want to open some other ancient-stores (e.g. reverse diff freezer).
2022-05-06 13:28:42 +02:00
Mateusz Morusiewicz
cef1a86df2
miner: discard interrupted blocks (#24638)
During mining, when a new head arrives and interrupts the block building, the block being built should not be commited (but discarded). Committing the interrupted block introduces unnecessary delay, and possibly causes miner to mine on the previous head, which could result in higher uncle rate.
2022-05-06 11:19:30 +02:00
Ikko Ashimine
33d7a469f6
p2p/simulations: fix typo in network_test.go (#24824) 2022-05-05 20:20:11 +02:00
ImanSharaf
ca8e2f1ecf
p2p/simulations: escape mockerType value from request (#24822)
Co-authored-by: Felix Lange <fjl@twurst.com>
2022-05-05 19:44:36 +02:00
EXEC
256aae0bfa
eth/filters: remove explicit continue label in filterLogs (#24795)
The loop label can be removed because this 'continue' statement
is not in a nested loop.
2022-05-05 17:58:43 +02:00
s7v7nislands
1c90d97c1e
eth/protocols/eth: fix godoc comments (#24810)
Co-authored-by: Martin Holst Swende <martin@swende.se>
2022-05-05 17:35:36 +02:00
rjl493456442
7f6f01d46f
core: recover state when beacon sets canonical head if it's missing (#24613)
* core: recover the state in SetChainHead if the head state is missing

* core: disable test logging

* core: address comment from martin

* core: improve log level in case state is recovered

* core, eth, les, light: rename SetChainHead to SetCanonical
2022-05-05 10:36:26 +03:00
milesvant
11b56ace2a
core: fix WriteBlockAndSetHead documentation (#24818) 2022-05-05 10:22:00 +03:00
Péter Szilágyi
992151fa6d
Merge pull request #24817 from karalabe/fix-PC-regression
cmd, eth: fix required blocks regression
2022-05-05 10:02:41 +03:00
Péter Szilágyi
ecae8e4f65
cmd, eth: fix required blocks regression 2022-05-04 19:55:17 +03:00
Péter Szilágyi
0a9e384cd5
Merge pull request #24813 from holiman/jammy
build: ppa build for jammy (ubuntu 22.04)
2022-05-04 18:22:37 +03:00
Sina Mahmoodi
b3af0a5538
cmd/geth: fix init genesis for dev (#24693)
* cmd/geth: fix init genesis for dev

* use ancient flag for init genesis cmd
2022-05-04 16:14:14 +02:00
EXEC
d6b77f661c
eth/filters: fix code comment (#24799) 2022-05-04 15:32:51 +02:00
Sina Mahmoodi
d73df893a6
graphql: add rawReceipt field to transaction type (#24738)
* graphql: add tx receiptsRLP field

* use MarshalBinary

Co-authored-by: Ryan Schneider <ryanleeschneider@gmail.com>

* update schema

Co-authored-by: Ryan Schneider <ryanleeschneider@gmail.com>

* rename to rawReceipt

* indent fix

Co-authored-by: Ryan Schneider <ryanleeschneider@gmail.com>
2022-05-04 14:31:07 +02:00
Martin Holst Swende
c164aed1d1
build: ppa build for jammy (ubuntu 22.04) 2022-05-04 11:41:24 +02:00
Evgeny Kolyakov
8d84a701a5
build: fix formatted logs (#24807)
Changed `log.Fatal` to `log.Fatalf()` as it has a parameter...
2022-05-04 00:37:37 +03:00
Martin Holst Swende
53304ff6c7
cmd/utils: double limit on free-disk monitor (#24781)
This PR doubles the limit on which to trigger automatic shutdown, and also changes the timer to run once every 30s instead of 60s.
2022-05-03 12:12:40 +02:00
EXEC
6b60d68344
docker: speed up docker image build (#24796)
This PR improves the docker build speed for repeated builds where go.mod and go.sum do no change, by placing the downloaded dependencies in a lower layer
2022-05-03 11:17:24 +02:00
nujabes403
c153bd40d7
accounts: fix typo in comments (#24805) 2022-05-03 08:49:41 +02:00
rjl493456442
344d6f95cf
cmd: group network and db path flags together (#24698)
This PR groups all built-in network flags together and list them in the command as a whole.

And all database path flags(datadir, ancient) are also grouped, since usually these two are
used together.
2022-05-03 08:46:17 +02:00
Martin Holst Swende
5157d4540a
cmd/evm: make evm t8n handle post-merge transitions (#24546)
This adds the ability to run --state.fork=Merged, and have post-merge rules apply. When doing so, it also requires the input env to contain currentRandom, and enforces the currentDifficulty to be omitted or zero.
2022-05-02 16:26:30 +02:00
Martin Holst Swende
559a174899
cmd/clef: fixups to the python clef poc (#24440)
This PR fixes up the example python clef wrapper. The poc is intended to demonstrate how to wite a UI for clef, and had severely bitrotted.
With these changes, it "works" in the sense that all the built-in tests triggers the intended python callbacks (no errors about method not found). It does not "work" in the sense that the wrapper can be used as an actual UI. It will auto-reject any signing requests, for example.
2022-05-02 14:28:11 +02:00
hero5512
f94e23ca66
eth/filters: remove unused struct fields (#24782) 2022-04-29 10:07:52 +02:00
Joshua Gutow
84041e8f31
ethclient/gethclient: return storage proofs in GetProof (#24697)
Storage proofs were being unmarshalled from the RPC form to the go struct, but were not being included in the final returned struct.
2022-04-27 11:51:24 +02:00
s7v7nislands
5a584c2133
all: use common.FileExist for checking file existence (#24748) 2022-04-27 11:48:02 +02:00
Martin Holst Swende
c3a5054c27
cmd/utils: utilize beacon wrapper in makechain (#24620)
* cmd/utils: utilize beacon wrapper in makechain

* cmd/utils: fix fake-pow to also be wrapped in beacon

* consensus/misc: correct error message
2022-04-27 11:45:14 +02:00
tia-99
1f5943e4f9
core/types: fix unhandled errors in TestTransactionCoding (#24692) 2022-04-27 10:56:50 +02:00
Sina Mahmoodi
16701c5169
internal/ethapi: add db operations to api (#24739)
Adds `debug_dbGet` method to rpc api
2022-04-27 08:37:48 +02:00
John Difool
a52bcccfe1
consensus/ethash: fix typos in var names (#24745) 2022-04-26 10:16:57 +02:00
s7v7nislands
195c2d3d69
cmd/*: refactor get flag value (#24761) 2022-04-26 09:32:31 +02:00
Martin Holst Swende
0914234d10
cmd/geth, core/state/snapshot: fix flaw in dangling-storage check + inspect difflayers (#24677)
This PR fixes the flaw that @rjl493456442 found in https://github.com/ethereum/go-ethereum/pull/#issuecomment-1093817551 , namely, that the snapshot iterator uses the combined (disk + difflayers) 'view', wheres the raw iterator uses only the disk 'view'.

This PR instead splits up the work: one phase is iterating the disk layer data, another phase is loading the journalled difflayers and performing the same check there.
2022-04-26 09:08:43 +02:00
s7v7nislands
7ab15490e9
all: use 'embed' instead of go-bindata (#24744) 2022-04-25 11:15:14 +02:00
henopied
63972e7548
p2p: fix type of DiscSubprotocolError (#24747)
It was 'int' accidentally, should be DiscReason instead.
2022-04-25 11:05:47 +02:00
Nikita Kozhemyakin
fb801d8837
mobile: fix receipt encoding to json (#24701) 2022-04-25 09:35:04 +02:00
s7v7nislands
4024c1e869
fix typo (#24731) 2022-04-25 09:28:03 +02:00
jwasinger
7d7a96530b
cmd/evm: ensure input length is even (#24721)
* cmd/evm: ensure input length is even

* cmd/evm: minor nit + lintfix

Co-authored-by: Martin Holst Swende <martin@swende.se>
2022-04-25 09:16:49 +02:00
s7v7nislands
9e0a10004e
cmd/faucet: fix genesis flag and improve documentation (#24735) 2022-04-23 16:53:21 +02:00
s7v7nislands
2951b50bae
internal/flags: fix godoc (#24734) 2022-04-23 16:52:26 +02:00
Felix Lange
a15a32a2f1
.github: update CODEOWNERS (#24743) 2022-04-23 14:37:04 +02:00
Koosha K
7163e6d47f
README.md: update Go min required version to 1.16 (#24713) 2022-04-22 01:31:33 +02:00
Emmanuel T Odeke
a8bb49b8ea
eth/tracers/logger: remove unnecessary comparisons in accessList.equal (#24663)
This change removes extraneous/unnecessary checks for equality
when comparing 2 accessList values A and B. Given that we validate that
their lengths of A and B are equal, if so and if every element in A is
in B, reflexively every element in B is already in A. If that weren't
the case and an element g existed in A but not in B, that would mean
that there is an extra element and hence a mathematical contradiction.

Fixes #24658
2022-04-22 01:30:15 +02:00
Ikko Ashimine
40cfe71002
eth/downloader: fix typo in downloader.go (#24704)
synchornization -> synchronization
2022-04-20 16:17:29 +02:00
Enrique Ortiz
637cf34ded
core/vm: fix typo (#24714)
Was just browsing the code and found this.
2022-04-20 16:13:47 +02:00
Darioush Jalali
8bf0565ebb
trie: remove unused makeHashNode (#24702) 2022-04-20 16:12:06 +02:00
Felix Lange
bb5633c5ee
go.mod: upgrade btcec and add 'chainhash' module requirement (#24700)
See ethereum/go-ethereum#24554 and btcsuite/btcd#1839

This is an attempt to resolve a Go module dependency issue that arises
when both 'github.com/btcsuite/btcd/btcec/v2' and the older, non-v2
btcd module are required as dependencies.
2022-04-17 14:53:25 +02:00
rjl493456442
f0328f241b
eth/downloader: resolve local header by hash for beacon sync (#24691)
* eth/downlaoder: resolve local header by hash for beacon sync

* eth/downloader: fix error message

* eth/downloader: cap the reverse header resolving

* eth/downloader: re-enable tests

* eth/downloader: add warning logs
2022-04-14 09:49:23 +03:00
Marius Kjærstad
9f7bcb9d76
build: upgrade -dlgo version to Go 1.18.1 (#24689)
* build: upgrade -dlgo version to Go 1.18.1

* build: upgrade -dlgo version for macOS to Go 1.18.1
2022-04-14 08:45:04 +03:00
Péter Szilágyi
86216189a5
eth/downloader: remove stale beacon headers as backfilling progresses (#24670)
* eth/downloader: remove stale beacon headers as backfilling progresses

* eth/downloader: remove leftover from a previous design

* eth/downloader: do partial beacon cleanups if chain is large

* eth/downloader: linter != heart
2022-04-13 20:31:08 +03:00
Marius van der Wijden
ca298a2821
cmd/geth: support bigints for --override.terminaltotaldifficulty (#24646)
Co-authored-by: Felix Lange <fjl@twurst.com>
2022-04-13 11:28:23 +02:00