Commit Graph

14046 Commits

Author SHA1 Message Date
Lee Bousfield
1c9afc56ae
core: prevent negative fee during RPC calls (#25214)
During RPC calls such as eth_call and eth_estimateGas, st.evm.Config.NoBaseFee is set
which allows the gas price to be below the base fee. This results the tip being negative,
and balance being subtracted from the coinbase instead of added to it, which results in a
potentially negative coinbase balance interestingly. This can't happen during normal chain
processing as outside of RPC calls the gas price is required to be at least the base fee,
as NoBaseFee is false.

This change prevents this behavior by disabling fee payment when the fee is not set.

Co-authored-by: lightclient@protonmail.com <lightclient@protonmail.com>
Co-authored-by: Felix Lange <fjl@twurst.com>
2022-07-15 11:32:54 +02:00
henridf
4766b1107f
core: remove lock in BlockChain.ExportN (#25254)
* Remove locking in (*BlockChain).ExportN

Since ExportN is read-only, it shouldn't need the lock. (?)

* Add hash check to detect reorgs during export.

* fix check order

* Update blockchain.go

* Update blockchain.go

Co-authored-by: rjl493456442 <garyrong0905@gmail.com>
2022-07-14 15:55:54 +03:00
lightclient
434ca026c9
internal/ethapi: error if tx args includes chain id that doesn't match local (#25157)
* internal/ethapi: error if tx args includes chain id that doesn't match local

* internal/ethapi: simplify code a bit

Co-authored-by: Péter Szilágyi <peterke@gmail.com>
2022-07-14 13:17:25 +03:00
Péter Szilágyi
b53d38246e
Merge pull request #25096 from lightclient/remove-version-field
all: remove version field
2022-07-14 12:13:59 +03:00
Jens W
5b5dfba70a
accounts/abi/bind/backends: return hash of new blocks (#25163)
Co-authored-by: Jens <jmw.1906@gmx.de>
2022-07-14 10:34:16 +02:00
Ikko Ashimine
93f981bb61
accounts/abi: fix typo in comment (#25271) 2022-07-14 10:29:05 +02:00
Péter Szilágyi
e108d36575
Merge pull request #25293 from sandakersmann/master
build: upgrade -dlgo version to Go 1.18.4
2022-07-14 10:30:53 +03:00
Marius Kjærstad
9f9657850f
build: upgrade -dlgo version to Go 1.18.4 2022-07-12 23:19:41 +02:00
Péter Szilágyi
d740d6e741
Merge pull request #25290 from karalabe/tar-archive-folder-time
internal/build: add a timestamp to the tar archive folder
2022-07-12 14:39:05 +03:00
Péter Szilágyi
68cd0cda4a
internal/build: add a timestamp to the tar archive folder 2022-07-12 14:35:35 +03:00
Péter Szilágyi
48da9d5513
Merge pull request #25288 from karalabe/enable-sepolia-dnsdisc
params: enable DNS discovery on Sepolia too
2022-07-12 14:09:42 +03:00
Péter Szilágyi
e66a538a36
params: enable DNS discovery on Sepolia too 2022-07-12 14:06:23 +03:00
Philip Fan
3e759e28d7
eth/tracers: add initial revertReasonTracer tracer (#25265)
Adds a native tracer that returns that in case of failure returns the error message or the revert reason of a transaction.

Co-authored-by: Martin Holst Swende <martin@swende.se>
2022-07-12 10:10:12 +02:00
Seungbae.yu
44893be0d6
core, eth: pre-allocate map in storage copy (#25279) 2022-07-12 10:08:45 +03:00
Péter Szilágyi
714fb302a5
Merge pull request #25247 from sandakersmann/master
build: upgrade -dlgo version to Go 1.18.3
2022-07-11 10:33:12 +03:00
Seungbae.yu
b3fc9574ec
p2p/discover: fix typos in comments (#25272) 2022-07-10 10:15:54 +02:00
Brion
d839515434
rpc: add graceful shutdown timeout for HTTP server (#25258)
This change ensures the HTTP server will always terminate within
at most 5s, even when all connections are busy and do not become
idle.

Co-authored-by: Felix Lange <fjl@twurst.com>
2022-07-08 21:25:12 +02:00
lightclient
ae8ce72022
internal/ethapi: fix chain ID check to return all non-zero IDs (#25244) 2022-07-07 21:50:28 +02:00
Seungbae.yu
e394d01f2a
core/types: fix typo in comment (#25249) 2022-07-06 15:16:05 +02:00
aaronbuchwald
926b3e08ba
trie: fix typo in comment (#25241)
paralallel -> parallel
2022-07-06 08:49:09 +02:00
Marius Kjærstad
ed7a80f7fd
build: upgrade -dlgo version to Go 1.18.3 2022-07-06 00:12:39 +02:00
Sina Mahmoodi
cb7f35996d
internal/ethapi: add basefee to block overrides (#25219) 2022-07-05 14:48:34 +02:00
Marius van der Wijden
e3c1a7c671
go.mod: updated logfmt dependency (#25231)
This fixes an issue in abigen tests with go 1.17.
2022-07-05 14:45:44 +02:00
Marius van der Wijden
7217ef4c9c
consensus/beacon: verify timestamp is greater than parent timestamp (#25236) 2022-07-05 10:05:10 +03:00
Marius van der Wijden
87bb5db675
core: allow external processor (#25233) 2022-07-05 10:02:49 +03:00
Felix Lange
f6ac80c507
cmd/geth, cmd/devp2p: fix some cli parsing issues (#25234)
* cmd/geth: add some missing argument count checks

* internal/flags: skip cmds with no action func in MigrateGlobalFlags

* internal/flags: add Merge

* cmd/devp2p: re-add listener config flags in discv4 commands
2022-07-04 19:52:19 +02:00
スパイク
55f914a1d7
signer/core/apitypes: support primitive types int96/uint96 (#25105)
I have a EIP712 typehash using uint96, but it's currently not supported
by go-ethereum. This change fixes it.
2022-07-04 15:01:07 +02:00
Marius van der Wijden
5f6e870ee6
core: apply ttd override to uninitialized db (#25136)
* core: apply ttd override to genesis block

* core: apply overrides properly
2022-07-04 12:25:17 +03:00
Marius van der Wijden
e537193421
core: allow external code to set the block validator for malicious tests (#25119)
* core: don't validate state

* core: allow external validator

* core: revert

* core: comments

* Update blockchain_reader.go

* core: move SetValidator to blockchain.go

* core: rename method
2022-07-04 12:24:06 +03:00
Marius van der Wijden
62470eeaf8
consensus/beacon: copy td value so we can modify it (#25230)
* consensus/beacon: copy td value so we can modify it

* consensus/beacon: copy td value so we can modify it
2022-07-04 11:54:15 +03:00
Seungbae.yu
2697e44d81
all: change format 0x%x to %#x (#25221) 2022-07-04 11:03:32 +03:00
aaronbuchwald
953a29f5fd
Replace fmt.Errorf with errors.New in abi argument (#25181)
Replace unnecessary fmt.Errorf with errors.New in accounts/abi/argument.go
2022-07-04 09:21:00 +02:00
Péter Szilágyi
de1cecb22e
eth/catalyst: disallow importing blocks via newPayload during snap sync (#25210)
* eth/catalyst: disallow importing blocks via newPayload during snap sync

* eth/catalyst: make tests pass by using full sync only

* eth/catalysts: make the import delay a bit cleaner

* eth/catalyst: fix typo

Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>

Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>
2022-07-01 14:38:26 +03:00
Péter Szilágyi
692bfd1bf8
Merge pull request #25206 from dbadoy/master
common/prque: fix typo
2022-06-30 09:23:34 +03:00
Seungbae.yu
a1cb7282b0
common/prque: fix typo 2022-06-30 13:24:04 +09:00
Felix Lange
5e252282c0 params: begin v1.10.21 release cycle 2022-06-30 00:30:39 +02:00
Felix Lange
8f2416a89a params: go-ethereum v1.10.20 stable 2022-06-30 00:27:43 +02:00
Felix Lange
75ebeb7fe0
build/deb: fix auto-completion install paths (#25204) 2022-06-29 23:19:30 +02:00
Felix Lange
63b2d49b5b
build: upgrade to golangci-lint v1.46.2 (#25202)
This upgrade is required to fix lint issues with urfave/cli/v2, which
uses generics when built with Go 1.18
2022-06-29 20:49:04 +02:00
willian.eth
ea0bf08547
build: fix auto-completion scripts and include them in .deb package (#25195)
Co-authored-by: Felix Lange <fjl@twurst.com>
2022-06-29 19:41:39 +02:00
Marius van der Wijden
d12b1a91cd
consensus/beacon: check that only the latest pow block is valid ttd block (#25187)
* consensus/beacon: check that only the latest pow block is valid ttd block

* consensus/beacon: move verification to async function

* consensus/beacon: fix verifyTerminalPoWBlock, add test cases

* consensus/beacon: cosmetic changes

* consensus/beacon: apply karalabe's fixes
2022-06-29 15:13:19 +03:00
Seungbae.yu
c2070f8d15
common: increase StorageSize test coverage (#25188) 2022-06-29 12:13:00 +02:00
lightclient
3e693e1ef6
internal/ethapi: return chain id for EIP-155 legacy txs (#25155) 2022-06-29 11:58:59 +02:00
Andre Patta
9ecf8a97a9
cmd/utils: fix applying bootstrap nodes from config file (#25174) 2022-06-29 11:57:12 +02:00
aaronbuchwald
300f6121ad
core/rawdb: simplify TestDiskSeek to use memorydb (#25182) 2022-06-29 11:54:42 +02:00
Ruohui Wang
3f712e7447
core/rawdb: fix typo in comment (#25191) 2022-06-29 11:47:33 +02:00
Guillaume Ballet
d1890aa402
fix: linter warning (#25192) 2022-06-29 10:54:57 +02:00
zeim839
9a5c1000c7
cmd/geth, p2p: add support for custom discovery UDP port (#24979)
This adds a new flag to set the discovery port to be different from
the TCP listener port.

Co-authored-by: Felix Lange <fjl@twurst.com>
2022-06-28 17:25:47 +02:00
Marius van der Wijden
1438e7c324
params: set TTD for sepolia testnet (#25179) 2022-06-28 14:48:13 +02:00
willian.eth
52ed3570c4
cmd: migrate to urfave/cli/v2 (#24751)
This change updates our urfave/cli dependency to the v2 branch of the library.
There are some Go API changes in cli v2:

- Flag values can now be accessed using the methods ctx.Bool,
  ctx.Int, ctx.String, ... regardless of whether the flag is 'local' or
  'global'.

- v2 has built-in support for flag categories. Our home-grown category
  system is removed and the categories of flags are assigned as part of
  the flag definition.

For users, there is only one observable difference with cli v2: flags must now
strictly appear before regular arguments. For example, the following command is
now invalid:

   geth account import mykey.json --password file.txt

Instead, the command must be invoked as follows:

   geth account import --password file.txt mykey.json
2022-06-27 18:22:36 +02:00