Commit Graph

13405 Commits

Author SHA1 Message Date
rjl493456442
195c979168
core: fix benchmark panic (#24657)
This PR fixes a few panics in the chain marker benchmarks. The root
cause for panic is in chain marker the genesis header/block is not
accessible, while it's expected to be obtained in tests. So this PR
avoids touching genesis header at all to avoid panic.
2022-04-12 11:34:07 +03:00
Marius van der Wijden
c40943a167
cmd: set DefaultGasLimit to 30M (#24680)
* cmd: set DefaultGasLimit to 30M, rem deprec. Flag

* cmd: revert flag deprecation
2022-04-12 08:48:03 +03:00
Felix Lange
59f0e8ae60
core/types: make "miner" optional in Header JSON (#24666)
"miner" is not set for pending block responses in some cases.

Fixes #24632
2022-04-11 21:19:13 +03:00
Vaibhaw
40b736463a
build/deb: update Debian control file to remove unencrypted git protocol (#24676) 2022-04-11 21:04:08 +03:00
aaronbuchwald
6c3fea0fc9
log: modify lock defer unlock order in sync handler (#24667)
This modifies the order of Lock() defer Unlock() to follow the more
typically used pattern.
2022-04-08 16:02:16 +02:00
rjl493456442
c1b69bd121
les: fix panic in ultralight client sync (#24641) 2022-04-08 15:48:52 +02:00
Eng Zer Jun
8d066f1f42
all: use T.TempDir to create temporary test directories (#24633)
This commit replaces ioutil.TempDir with t.TempDir in tests. The
directory created by t.TempDir is automatically removed when the test
and all its subtests complete.

Prior to this commit, temporary directory created using ioutil.TempDir
had to be removed manually by calling os.RemoveAll, which is omitted in
some tests. The error handling boilerplate e.g.

	defer func() {
		if err := os.RemoveAll(dir); err != nil {
			t.Fatal(err)
		}
	}

is also tedious, but t.TempDir handles this for us nicely.

Reference: https://pkg.go.dev/testing#T.TempDir
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2022-04-08 15:44:55 +02:00
Tangui Clairet
bf5cacfb8f
accounts/abi: handle tuple arrays in ParseSelector (#24587)
Closes #24571
2022-04-08 15:38:23 +02:00
Martin Holst Swende
92e3c56e7b
cmd/geth: inspect snapshot dangling storage (#24643)
* cmd/geth: inspect snapshot dangling storage

* cmd/geth: make verify-state invoke verify-dangling
2022-04-08 15:08:46 +02:00
Péter Szilágyi
9fd8825d5a
Merge pull request #24659 from karalabe/snapshot-remove-noo
core/state/snapshot: remove noop map item assignment
2022-04-07 12:58:44 +03:00
Péter Szilágyi
f6891ba40d
core/state/snapshot: remove noop map item assignment 2022-04-07 09:36:44 +03:00
Tbnoapi
65825cd134
README: remove mentions of fast sync (#24656)
Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>
2022-04-07 09:23:55 +03:00
Péter Szilágyi
111a1b73cf
Merge pull request #24652 from karalabe/block-fetcher-timeouts
eth/fetcher: if peers never respond, drop them
2022-04-06 10:43:18 +03:00
Sina Mahmoodi
fb3a081c7e
eth/tracers: refactor traceTx to separate out struct logging (#24326)
* eth/tracers: refactor traceTx to separate out struct logging

review fix

Update eth/tracers/api.go

Co-authored-by: Martin Holst Swende <martin@swende.se>

Mv ExecutionResult type to logger package

review fix

impl GetResult for StructLogger

make formatLogs private

confused exit and end..

account for intrinsicGas in structlogger, fix TraceCall test

Add Stop method to logger

Simplify traceTx

Fix test

rm logger from blockchain test

account for refund in structLogger

* use tx hooks in struct logger

* minor

* avoid executionResult in struct logger

* revert blockchain test changes
2022-04-06 09:34:18 +02:00
Péter Szilágyi
7e2bbb9cbb
eth/fetcher: if peers never respond, drop them 2022-04-06 10:18:57 +03:00
Tatsuya Shimoda
0654014652
rpc: fixed a typo (#24642) 2022-04-05 10:45:20 +03:00
John Adler
aa123939c2
README: update free space required (#24636) 2022-04-05 08:45:13 +03:00
rjl493456442
28ec26094b
eth/downloader: retrieve pivot header from local chain if necessary (#24610)
* eth/downloader: retrieve pivot header from local chain if necessary

* eth/downloader: improve readability

* eth/downloader: update fix

* eth/downloader: add beacon sync tests

* eth/downloader: remove duplicated code
2022-04-04 10:10:16 +03:00
Martin Holst Swende
1e973a96b4
eth: clarify the error string on getlogs failure (#24617)
This PR makes the errors we spit out a bit more clear about what block is problematic.
2022-03-31 21:16:03 +02:00
Sina Mahmoodi
3fd16af5a9
core,eth: implement tx-level hooks for tracers (#24510)
* core,eth: add empty tx logger hooks

* core,eth: add initial and remaining gas to tx hooks

* store tx gasLimit in js tracer

* use gasLimit to compute intrinsic cost for js tracer

* re-use rules in transitiondb

* rm logs

* rm logs

* Mv some fields from Start to TxStart

* simplify sender lookup in prestate tracer

* mv env to TxStart

* Revert "mv env to TxStart"

This reverts commit 656939634b9aff19f55a1cd167345faf8b1ec310.

* Revert "simplify sender lookup in prestate tracer"

This reverts commit ab65bce48007cab99e68232e7aac2fe008338d50.

* Revert "Mv some fields from Start to TxStart"

This reverts commit aa50d3d9b2559addc80df966111ef5fb5d0c1b6b.

* fix intrinsic gas for prestate tracer

* add comments

* refactor

* fix test case

* simplify consumedGas calc in prestate tracer
2022-03-31 11:51:44 +02:00
rjl493456442
da16d089c0
trie, les, tests, core: implement trie tracer (#24403)
Trie tracer is an auxiliary tool to capture all deleted nodes
which can't be captured by trie.Committer. The deleted nodes
can be removed from the disk later.
2022-03-31 09:28:32 +02:00
Nic Jansma
127dc5982e
eth: change snapshot extension registration failure to warning instead of error (#24475)
* core: Change Snapshot extension registration failed to Debug

* Update eth/handler.go

Co-authored-by: Martin Holst Swende <martin@swende.se>
2022-03-30 10:28:27 +02:00
Guruprasad Kamath
8cacb42278
core: verify genesis extradata for clique (#24470)
* Add extra-data checks for clique genesis

* Update genesis.go

* Update genesis.go

* core: simplify clique genesis check

Co-authored-by: Felix Lange <fjl@twurst.com>
Co-authored-by: Martin Holst Swende <martin@swende.se>
2022-03-30 10:27:25 +02:00
zhiqiangxu
9f75994b5e
common/compiler: add extra include paths to solidity compiler (#24541)
This PR adds a ExtraAllowedPath field to Solidity and exposes two APIs: CompileSource and CompileFiles, which were hidden inside CompileSolidityString and CompileSolidity before.
2022-03-29 22:38:59 +02:00
Martin Holst Swende
67c070c379
eth/tracers/logger: use omitempty to reduce log bloat (#24547)
Makes the evm json output less verbose: omitting output of `memory` and `returndata` in case they are empty.
2022-03-29 22:36:55 +02:00
Zhang Zhuo
b5a129ea24
internal/ethapi: add refund to StructLogRes (#24567)
* internal/ethapi: add refund to StructLogRes

* Update internal/ethapi/api.go

Co-authored-by: rjl493456442 <garyrong0905@gmail.com>

Co-authored-by: rjl493456442 <garyrong0905@gmail.com>
2022-03-29 22:34:10 +02:00
ucwong
763b3f8d1f
go.mod : upnp 1.0.3 stable version (#24573) 2022-03-29 22:33:19 +02:00
rjl493456442
25bd17d725
core/state/snapshot: clean up the generation code (#24479) 2022-03-29 20:37:35 +02:00
flowerofdream
33022c2e7d
rlp: fix typo in comment (#24595)
Co-authored-by: Yong Yang <yangyong775654@163.com>
2022-03-29 20:30:09 +02:00
Martin Holst Swende
8ec8b81b29
params: begin v1.10.18 release cycle 2022-03-29 19:19:40 +02:00
Martin Holst Swende
25c9b49fdb
params: go-ethereum v1.10.17 stable 2022-03-29 19:18:26 +02:00
Marius van der Wijden
de6a113f84
eth/catalyst: only apply block if we actually have the state (#24598)
* eth/catalyst: only apply block if we actually have the state

* add header to payload queue

* Update cmd/geth/dbcmd.go

Co-authored-by: Martin Holst Swende <martin@swende.se>

Co-authored-by: Martin Holst Swende <martin@swende.se>
2022-03-29 18:26:18 +02:00
jwasinger
b502b6ac97
cmd/geth: change to non-fatal error message when legacy receipt storage is not implemented (#24603)
* cmd/geth: only check for presence of legacy receipts if developer mode is not enabled

* cmd/geth: degrade log level

* cmd/geth: fix format

Co-authored-by: Gary Rong <garyrong0905@gmail.com>
2022-03-29 10:40:42 +02:00
Péter Szilágyi
1027cb52c4
Merge pull request #24605 from karalabe/revert-setting-ttd
core: set ttd override on all chain variations
2022-03-29 11:39:45 +03:00
Zhang Zhuo
b06e8c4a8a
core/vm: fix sstore gas comment type (#24583) 2022-03-29 11:21:11 +03:00
Péter Szilágyi
b45d82e94a
core: set ttd override on all chain variations 2022-03-29 11:03:01 +03:00
Martin Holst Swende
0fffd3acbd
build: close sftp connection when done (#24593) 2022-03-27 13:21:36 +02:00
Martin Holst Swende
eb3ebceaa1
internal/build: exit sftp upload (#24590) 2022-03-25 16:46:31 +01:00
Martin Holst Swende
d1c243f841
internal/build: prevent travis timeout during ppa upload (#24589) 2022-03-25 15:43:07 +01:00
Martin Holst Swende
19b9cf714f
internal/build: show ppa upload process stdout on stdout (#24588) 2022-03-25 15:06:29 +01:00
Martin Holst Swende
6a44bf6826
build: upgrade to golangci-lint v1.45.2 (#24586) 2022-03-25 13:46:33 +01:00
Marius van der Wijden
a8040bc2c5
node: allow JWT pass by file only (#24579) 2022-03-24 15:04:47 +01:00
Marius van der Wijden
535f25d65f
eth/catalyst: fix log message (#24574) 2022-03-23 21:00:26 +01:00
Martin Holst Swende
f252154599
eth/downloader: fix flakey test (#24576) 2022-03-23 20:57:53 +01:00
Sina Mahmoodi
fd4f60f49b
core/rawdb: simple legacy receipt converter (#24028)
* cmd,core: add simple legacy receipt converter

core/rawdb: use forEach in migrate

core/rawdb: batch reads in forEach

core/rawdb: make forEach anonymous fn

cmd/geth: check for legacy receipts on node startup

fix err msg

Co-authored-by: rjl493456442 <garyrong0905@gmail.com>

fix log

Co-authored-by: rjl493456442 <garyrong0905@gmail.com>

fix some review comments

add warning to cmd

drop isLegacy fn from migrateTable params

add test for windows rename

test replacing in windows case

* minor fix

* sanity check for tail-deletion

* add log before moving files around

* speed-up hack for mainnet

* fix mainnet check, use networkid instead

* check mainnet genesis

* review fixes

* resume previous migration attempt

* core/rawdb: lint fix

Co-authored-by: Martin Holst Swende <martin@swende.se>
2022-03-23 20:57:32 +01:00
rjl493456442
e0e8bf31c5
eth/downloader: ignore zero size header batch for importing (#24569)
* eth/downloader: ignore zero size header batch for importing

* core, light: reject empty header batch for importing
2022-03-22 18:58:05 +01:00
rjl493456442
7ae6c4a790
core: store genesis allocation and recommit them if necessary (#24460)
* core: store genesis allocation and recommit them if necessary

* core: recover predefined genesis allocation if possible
2022-03-22 10:53:22 +01:00
ucwong
34501ed235
crypto/bls12381: go format 2022-03-22 10:32:13 +01:00
rjl493456442
6afb717be5
core/rawdb: fix db commands (#24540) 2022-03-22 10:19:04 +01:00
Péter Szilágyi
51de2bc9dc
eth/downloader: terminate beacon sync early when linked to local chain (#24550)
* eth/downloader: terminate beacon sync early when linked to local chain

* eth/downloader: fix backfiller resume on early beacon termination
2022-03-21 10:43:54 +02:00