Commit Graph

13004 Commits

Author SHA1 Message Date
lightclient
6f2c3f2114
cmd/geth: add ancient flag to db inspect (#23946) 2021-11-22 09:07:17 +02:00
Anatole
e0761432a4
eth: fix typo in comment (#23941) 2021-11-22 02:53:16 +01:00
Martin Holst Swende
e761255ba7
cmd/evm: make t9n intrinsicGas output hex, fixes #23883 (#23889) 2021-11-19 10:53:20 +01:00
courtier
c52def7f11
eth/gasprice: sanitize max header and block history (#23886)
Fixes #23452
2021-11-18 19:20:36 +01:00
Lee Bousfield
16341e0563
ethclient: fix tx sender cache miss detection (#23877)
This fixes a bug in TransactionSender where it would return the
zero address for transactions where the sender address wasn't
cached already.

Co-authored-by: Felix Lange <fjl@twurst.com>
2021-11-17 14:44:41 +01:00
lightclient
fa96718512
cmd/evm: rename t8n result to match types.Header (ReceiptRoot->ReceiptsRoot) (#23924) 2021-11-17 13:50:08 +01:00
Jesse Tane
33f2813809
cmd/geth: add flag --dev.gaslimit for dev mode (#23686)
* cmd, core: add flag --dev.gaslimit to allow configuring initial block gas limit in dev mode

* core: use provided gaslimit

Co-authored-by: Martin Holst Swende <martin@swende.se>
2021-11-16 13:45:02 +01:00
Martin Holst Swende
b7a6409cc1
core/rawdb: better error message in freezer (#23901)
* core/rawdb: better error message in freezer

* Apply suggestions from code review
2021-11-16 11:33:56 +02:00
Sina Mahmoodi
05acc272b5
eth/tracers: make native 4byte default, remove js version (#23916) 2021-11-16 08:44:57 +01:00
lightclient
b0b708bf23
cmd/evm: add gasUsed to t8n result (#23919)
* cmd/evm: add gas used accumulator to t8n result

* cmd/evm: update t8n tests to include gas used field
2021-11-16 08:43:58 +01:00
Joshua Colvin
abc74a5ffe
accounts/abi/bind/backends: fix race condition in simulated backend (#23898)
Now that `SimulatedBackend.SuggestGasPrice` inspects member values, a lock needs to be added to prevent a race condition.
2021-11-12 15:50:08 +01:00
Ward Bradt
e9294a7fe9
eth/tracers: add golang 4byte tracer (#23882)
* native 4byte tracer

* Update eth/tracers/native/4byte.go

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

* Update eth/tracers/native/4byte.go

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

* goimports

* eth/tracers: make 4byte tracer not care about create

Co-authored-by: Martin Holst Swende <martin@swende.se>
2021-11-11 20:20:46 +01:00
meowsbits
5358e491f3
cmd/devp2p: update TTL max for Cloudflare (#23885)
This was apparently recently changed by Cloudflare, and
began returning an error: 'TTL must be between 60 and 86400
seconds, or 1 for Automatic'

Date: 2021-11-10 15:25:20-08:00
Signed-off-by: meows <b5c6@protonmail.com>
2021-11-11 17:07:11 +01:00
Sina Mahmoodi
c57df9ca28
core/rawdb: add slow path for getting legacy logs (#23879)
* eth/tracers: add slow path for getting legacy logs

* core/rawdb: fix test
2021-11-11 15:04:06 +01:00
Andrei Maiboroda
f32feeb260
core/vm: implement EIP-2681: Limit account nonce to 2^64-1 (#23853)
This retroactively implements requirements or EIP-2681 for the account nonce upper limit.
2021-11-11 15:00:58 +01:00
Péter Szilágyi
e185a8c818
Merge pull request #23880 from eltociear/patch-3
p2p: fix typo in v4wire.go
2021-11-10 16:15:51 +02:00
Ikko Ashimine
fb7da82dde
p2p: fix typo in v4wire.go
Neigbors -> Neighbors
2021-11-10 22:18:12 +09:00
Martin Holst Swende
0efed7f58b
cmd/devp2p/internal/ethtest: clarify protocol version in tests (#23872)
Debugging recent geth failures in hive, it took a while to realize that it's because
geth doesn't support eth/65 any longer. This PR makes such failures a bit more
easy to figure out.
2021-11-09 14:45:34 +01:00
Martin Holst Swende
6b9c77f060
eth/tracers: package restructuring (#23857)
* eth/tracers: restructure tracer package

* core/vm/runtime: load js tracers

* eth/tracers: mv bigint js code to own file

* eth/tracers: add method docs for native tracers

* eth/tracers: minor doc fix

* core,eth: cancel evm on nativecalltracer stop

* core/vm: fix failing test

Co-authored-by: Sina Mahmoodi <itz.s1na@gmail.com>
2021-11-09 12:09:35 +01:00
Felix Lange
9489853321
core: check effective tip in txpool pricelimit validation (#23855)
The price limit is supposed to exclude transactions with too low fee
amount. Before EIP-1559, it was sufficient to check the limit against
the gas price of the transaction. After 1559, it is more complicated
because the concept of 'transaction gas price' does not really exist.

When mining, the price limit is used to exclude transactions below a
certain effective fee amount. This change makes it apply the same check
earlier, in tx validation. Transactions below the specified fee amount
cannot enter the pool.

Fixes #23837
2021-11-08 16:25:35 +02:00
Péter Szilágyi
ad11691daf
params: begin v1.10.13 release cycle 2021-11-08 15:44:11 +02:00
Péter Szilágyi
6c4dc6c388
params: release Geth v1.10.12 2021-11-08 15:42:08 +02:00
Sina Mahmoodi
787a3b185c
eth/tracers: make native calltracer default (#23867) 2021-11-08 14:08:12 +01:00
Péter Szilágyi
851256e856
Merge pull request #23869 from karalabe/cht-1.10.12-ropsten
params: update Ropsten CHT too
2021-11-08 14:13:21 +02:00
Péter Szilágyi
c4fff0f56e
params: update Ropsten CHT too 2021-11-08 14:12:22 +02:00
Péter Szilágyi
aa2727f82c
Merge pull request #23868 from karalabe/cht-1.10.12
params: update CHTs for the 1.10.12 release
2021-11-08 13:41:28 +02:00
Péter Szilágyi
e61b8cb1f8
params: update CHTs for the 1.10.12 release 2021-11-08 13:40:32 +02:00
Martin Holst Swende
e1c000b0dd
cmd/geth: add support for sepolia testnet (#23730)
* cmd/geth: add support for sepolia testnet

* core: last details on sepolia genesis

* params: fix sepolia hash + reduce testing code

* Update params/bootnodes.go

* cmd/geth: fix attach path for sepolia

* params: update bootnodes

* params: fix

* core: fix docstring

* params: add sepolia CHT
2021-11-08 13:06:01 +02:00
Felföldi Zsolt
8be8ba450e
les/vflux: fixed panic and data races (#23865)
* les/vflux/server: fix BalanceOperation

* les/vflux/client: fixed data races
2021-11-08 10:29:59 +01:00
Martin Holst Swende
476fb565ce
miner, consensus/clique: avoid memory leak during block stasis (#23861)
This PR fixes a problem which arises on clique networks when there is a network stall. Previously, the worker packages were tracked, even if the sealing engine decided not to seal the block (due to clique rules about recent signing). These tracked-but-not-sealed blocks kept building up in memory. 
This PR changes the situation so the sealing engine instead returns an error, and the worker can thus un-track the package.
2021-11-05 16:17:13 +01:00
Sina Mahmoodi
8d7e6062ec
eth/tracers: support for golang tracers + add golang callTracer (#23708)
* eth/tracers: add basic native loader

* eth/tracers: add GetResult to tracer interface

* eth/tracers: add native call tracer

* eth/tracers: fix call tracer json result

* eth/tracers: minor fix

* eth/tracers: fix

* eth/tracers: fix benchTracer

* eth/tracers: test native call tracer

* eth/tracers: fix

* eth/tracers: rm extra make

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

* eth/tracers: rm extra make

* eth/tracers: make callFrame private

* eth/tracers: clean-up and comments

* eth/tracers: add license

* eth/tracers: rework the model a bit

* eth/tracers: move tracecall tests to subpackage

* cmd/geth: load native tracers

* eth/tracers: minor fix

* eth/tracers: impl stop

* eth/tracers: add native noop tracer

* renamings

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

* eth/tracers: more renamings

* eth/tracers: make jstracer non-exported, avoid cast

* eth/tracers, core/vm: rename vm.Tracer to vm.EVMLogger for clarity

* eth/tracers: minor comment fix

* eth/tracers/testing: lint nitpicks

* core,eth: cancel evm on nativecalltracer stop

* Revert "core,eth: cancel evm on nativecalltracer stop"

This reverts commit 01bb908790a369c1bb9d3937df9325c6857bf855.

* eth/tracers: linter nits

* eth/tracers: fix output on err

Co-authored-by: Martin Holst Swende <martin@swende.se>
2021-11-05 11:48:21 +01:00
Martin Holst Swende
3bbeb94c1c
eth: make traceChain avoid OOM on long-running tracing (#23736)
This PR changes long-running chain tracing, so that it at some points releases the memory trie db, and switch over to a fresh disk-backed trie.
2021-11-04 18:54:00 +01:00
Felix Lange
53b94f135a
rpc: linear time batch response matching (#23856)
This avoids quadratic time complexity in the lookup of the batch element
corresponding to an RPC response. Unfortunately, the new approach
requires additional memory for the mapping from ID to index.

Fixes #22805
2021-11-04 17:44:35 +01:00
Martin Holst Swende
03bc8b7858
core: more efficient nonce-update in txpool (#22231)
* Adjust pending nonce update operation

Benchmark the speed of transaction insertion under multiple accounts

core: fix rebase issues + docstring

core: make benchmark test use sync:ed method

* core: address review comments

* core: add memreport to benchmark

Co-authored-by: WeiLoy <wei_loy@163.com>
2021-11-02 18:32:23 +01:00
Martin Holst Swende
f49e90e32c
cmd/puppeth: make it possible to have pw-protected keyfiles (#22148) 2021-11-02 13:21:25 +01:00
Martin Holst Swende
178debe435
consensus/ethash: avoid runtime errors due to OOD on mmap writes (#23799)
When we map a file for generating the DAG, we do a simple truncate to e.g. 1Gb. This is fine, even if we have nowhere near 1Gb disk available, as the actual file doesn't take up the full 1Gb, merely a few bytes. When we start generating into it, however, it eventually crashes with a unexpected fault address .

This change fixes it (on linux systems) by using the Fallocate syscall, which preallocates suffcient space on disk to avoid that situation. 


Co-authored-by: Felix Lange <fjl@twurst.com>
2021-11-02 11:33:54 +01:00
rjl493456442
2e8b58f076
cmd/geth: implement data import and export (#22931)
This PR offers two more database sub commands for exporting and importing data.
Two exporters are implemented: preimage and snapshot data respectively. 
The import command is generic, it can take any data export and import into leveldb. 
The data format has a 'magic' for disambiguation, and a version field for future compatibility.
2021-11-02 11:31:45 +01:00
Martin Holst Swende
551bd6e721
eth/tracers: invoke enter/exit on 0-value calls to inex accounts (#23828) 2021-11-01 19:06:33 +01:00
Ziyuan Zhong(仲梓源)
c576fa153a
core: fix snapshot missing when recovery from crash (#23496)
It is because write known block only checks block and state without snapshot, which could lead to gap between newest snapshot and newest block state. However, new blocks which would cause snapshot to become fixed were ignored, since state was already known. 


Co-authored-by: Gary Rong <garyrong0905@gmail.com>
Co-authored-by: Martin Holst Swende <martin@swende.se>
2021-11-01 14:09:36 +01:00
Marius van der Wijden
c2e64db3b1
accounts/abi/bind/backends: make suggestGasPrice compatible with non-1559 chains (#23840) 2021-11-01 10:01:22 +01:00
chuwt
1e4becb5c1
rpc/client: fix typo (#23834) 2021-11-01 08:14:00 +01:00
Martin Holst Swende
ff844918e8
rpc: avoid crashing on clique getSigner during sync (#23832) 2021-11-01 07:51:03 +01:00
Lee Bousfield
c113520d5d
miner: fix receipt deep copy in worker (#23835) 2021-11-01 07:50:29 +01:00
Sparty
57c252ef4e
accounts/abi/bin/backends: return basefee in suggestGasPrice (#23838)
Co-authored-by: mrx <mrx@mrx.com>
2021-11-01 07:49:45 +01:00
XuDon9 Liu AKA Rapper Of CN background diablo & revelations, a man optimistic, negative, silent, active, Taoism
410e731bea
optimize the judge of invalide notification.number (#22658)
Don't bother fetching genesis

Co-authored-by: wuff1996 <33193253+wuff1996@users.noreply.github.com>
2021-10-31 19:38:48 +01:00
Martin Holst Swende
31870a59ff
eth/filters, p2p/simulations: fix benchmarks (#23806)
Some benchmarks in eth/filters were not good: they weren't reproducible, relying on geth chaindata to be present.

Another one was rejected because the receipt was lacking a backing transcation.

The p2p simulation benchmark had a lot of the warnings below, due to the framework calling both
Stop() and Close(). Apparently, the simulated adapter is the only implementation which has a Close(),
and there is no need to call both Stop and Close on it.
2021-10-29 14:37:00 +02:00
Martin Holst Swende
32150f8aa9
cmd/geth, cmd/evm, params: implement Arrow Glacier (EIP 4345) (#23810)
This PR adds support for ArrowGlacier, as defined by

    https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/arrow-glacier.md
    https://eips.ethereum.org/EIPS/eip-4345

> Starting with FORK_BLOCK_NUMBER the client will calculate the difficulty based on a fake block number suggesting to the client that the difficulty bomb is adjusting 10,700,000 blocks later than the actual block number.

This also adds support for evm t8n to return the calculated difficulty, so it can be used to construct test.
2021-10-28 22:18:14 +02:00
Marius van der Wijden
bff330335b
core: fixed stale comment in txlist (#23825) 2021-10-28 14:59:51 +02:00
Martin Holst Swende
52c02ccb1f
cmd/evm: handle rlp errors in t9n (#23771)
* cmd/evm: handle rlp errors in t9n

* cmd/evm/testdata: fix readme
2021-10-27 13:28:50 +02:00
Martin Holst Swende
eab4d898fd
core: fix benchmark tests (#23803)
Fixes crashes in various benchmarks in the core package
2021-10-27 13:08:51 +02:00