Commit Graph

14969 Commits

Author SHA1 Message Date
Felix Lange 8c2d455ccd
build: upgrade to golangci-lint v1.55.2 (#28712)
This is primarily to make lint work again on macOS 14. The older version of golangci-lint kept crashing. 

Also included is a fix for a goroutine leak in the recently-introduced function MustRunCommandWithOutput.
2023-12-20 15:36:10 +01:00
Martin HS d3452a22cc
accounts: properly close managed wallets when closing manager (#28710) 2023-12-20 13:41:40 +01:00
Felix Lange 7124057bad
internal/build: fix crash in MustRunCommandWithOutput (#28709) 2023-12-20 07:56:41 +01:00
Felix Lange 9258a44b8f params: begin go-ethereum v1.13.8 release cycle 2023-12-19 13:32:25 +01:00
Felix Lange 3fd568855f params: go-ethereum v1.13.7 stable 2023-12-19 13:25:03 +01:00
dependabot[bot] 0cc192bd3a
build(deps): bump golang.org/x/crypto from 0.15.0 to 0.17.0 (#28702)
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.15.0 to 0.17.0.
- [Commits](https://github.com/golang/crypto/compare/v0.15.0...v0.17.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-19 10:50:02 +01:00
Martin HS 435bed5da0
ci: disable lint on travis (#28706) 2023-12-19 10:35:02 +01:00
Martin HS 5a9dda64ce
.travis: set lower GOGC value (#28705)
As documented on https://golangci-lint.run/usage/performance/ , a lower
GOGC value causes less peak mem consumption when running the linter.

Exceeding 3Gb is a common cause for build failures, according to
https://docs.travis-ci.com/user/common-build-problems/#my-build-script-is-killed-without-any-error
2023-12-19 09:24:23 +01:00
Martin HS 952b343cb3
build: make linter emit output (#28704) 2023-12-19 08:55:04 +01:00
wangyifan cd58897f18
core/rawdb: implement size reporting for live items in freezer_table (#28525)
This is the fix to issue #27483. A new hiddenBytes() is introduced to calculate the byte size of hidden items in the freezer table. When reporting the size of the freezer table, size of the hidden items will be subtracted from the total size.

---------

Co-authored-by: Yifan <Yifan Wang>
Co-authored-by: Gary Rong <garyrong0905@gmail.com>
2023-12-18 20:10:54 +01:00
Delweng 54a400ee71
internal/ethapi: ethSendTransaction check baseFee (#27834)
If the EIP-1559 is activated, reject 0-priced transactions in the rpc level
2023-12-18 20:09:41 +01:00
Felix Lange 4410c1416a params: begin v1.13.7 release cycle 2023-12-18 19:10:11 +01:00
Felix Lange a18b845ecd params: release go-ethereum v1.13.6 stable 2023-12-18 18:53:47 +01:00
Delweng c18c5c3d92
cmd/evm: t8n support custom tracers (#28557)
This change implements ability for the `evm t8n` tool to use custom tracers; either 'native' golang tracers or javascript tracers.
2023-12-18 15:16:25 +01:00
Martin HS 553bafc127
cmd/evm, cmd/clef, cmd/bootnode: fix / unify logging (#28696)
This change fixes a problem with our non-core binaries: evm, clef, bootnode.

First of all, they failed to convert from legacy loglevels 1 to 5, to the new slog loglevels -4 to 4.

Secondly, the logging was actually setup in the init phase, and then overridden in the main. This is not needed for evm, since it used the same flag name as the main geth verbosity. Better to let the flags/internal handle the logging init.
2023-12-18 14:11:27 +01:00
jwasinger 05bbc56677
cmd/evm: default to mirror mainnet forks enabled (#28691)
cmd/evm:  default to using dev chain config (all mainnet HFs activated at block/timestamp 0
2023-12-18 13:56:27 +01:00
Sebastian Stammler 02766d349a
internal/flags: add missing flag types for auto-env-var generation (#28692)
Certain flags, such as `--rpc.txfeecap` currently do not have an env-var auto-generated for them. This change adds three missing cli flag types to the auto env-var helper function to fix this.
2023-12-18 13:28:41 +01:00
Felix Lange 5b22a472d6
p2p/discover: add liveness check in collectTableNodes (#28686)
* p2p/discover: add liveness check in collectTableNodes

* p2p/discover: fix test

* p2p/discover: rename to appendLiveNodes

* p2p/discover: add dedup logic back

* p2p/discover: simplify

* p2p/discover: fix issue found by test
2023-12-18 10:47:21 +01:00
alex edc864f9ba
all: fix typos in comments (#28682)
chore(core,eth):fix a couple of typos
2023-12-18 09:35:12 +01:00
FletcherMan f1794ba278
miner: eliminate the dead loop possibility for `newWorkLoop` and `mainLoop` (#28677)
discard the intervalAdjust message if the channel is full
2023-12-15 11:48:55 +08:00
Elias Rad 0f74aad641
all: fix typos in comments (#28662)
Co-authored-by: Felix Lange <fjl@twurst.com>
2023-12-13 23:33:46 +01:00
Ursulafe b2ced97ac4
eth/fetcher, eth/gasestimator: fix typos in comments (#28675) 2023-12-13 23:32:17 +01:00
Sina Mahmoodi 2d14bb573c rename and document balance change reasons 2023-12-13 17:52:56 +03:30
Sina Mahmoodi 8b3180d8a7 revert gas refund 2023-12-13 17:51:19 +03:30
Sina Mahmoodi 64e35e93dd revert buyGas refactor 2023-12-13 16:44:56 +03:30
Sina Mahmoodi 54f4bc741d fix balance check 2023-12-13 13:50:04 +03:30
ucwong 81fd1b3cf9
core/txpool : small cleanup refactors (#28654) 2023-12-12 17:23:36 +02:00
Ford 17c2b3c194
eth/protocols/eth: fix typos in comments (#28652) 2023-12-12 14:47:59 +01:00
Ng Wei Han a3ca1b2818
cmd/utils: fix HTTPHost, WSHost flag priority (#28669)
Co-authored-by: Felix Lange <fjl@twurst.com>
2023-12-12 14:40:50 +01:00
Sina Mahmoodi 89d79d6d3c fix t8n tracer nil check 2023-12-12 11:48:25 +03:30
Sina Mahmoodi a52c80dec5 Fix test case 2023-12-12 11:34:41 +03:30
Sina Mahmoodi 0d254e4983 fix test 2023-12-11 16:17:49 +03:30
Sina Mahmoodi 5e82cbec8d nil check 2023-12-11 15:59:23 +03:30
Sina Mahmoodi 0484068df5 fix lint issues 2023-12-11 14:17:29 +03:30
Sina Mahmoodi ddd1b0a63f fix gas purchase 2023-12-11 12:55:24 +03:30
rjl493456442 e206d3f897
trie: remove inconsistent trie nodes during sync in path mode (#28595)
This fixes a database corruption issue that could occur during state healing.
When sync is aborted while certain modifications were already committed, and a
reorg occurs, the database would contain incorrect trie nodes stored by path.
These nodes need to detected/deleted in order to obtain a complete and fully correct state
after state healing.

---------

Co-authored-by: Felix Lange <fjl@twurst.com>
2023-12-08 14:28:23 +01:00
Péter Szilágyi d98d70f670
cmd/utils, eth: disallow invalid snap sync / snapshot flag combos (#28657)
* eth: prevent startup in snap mode without snapshots

* cmd/utils: try to fix bad flag combos wrt snap sync and snapshot generation
2023-12-08 15:16:04 +02:00
Felföldi Zsolt fff843cfaf
beacon/light: add CommitteeChain (#27766)
This change implements CommitteeChain which is a key component of the beacon light client. It is a passive data structure that can validate, hold and update a chain of beacon light sync committees and updates, starting from a checkpoint that proves the starting committee through a beacon block hash, header and corresponding state. Once synced to the current sync period, CommitteeChain can also validate signed beacon headers.
2023-12-08 13:38:00 +01:00
Martin HS 1048e2d6a3
cmd/evm: fix dump after state-test exec (#28650)
The dump after state-test didn't work, the problem was an error, "Already committed", which was silently ignored. 

This change re-initialises the state, so the dumping works again.
2023-12-08 11:06:01 +01:00
Martin HS 5a45e7a631
rpc: fix ns/µs mismatch in metrics (#28649)
The rpc/duration/all meter was in nanoseconds, the individual meter in microseconds.
This PR changes it so both of them use nanoseconds.
2023-12-08 09:40:50 +01:00
Sina Mahmoodi 0967291487 Track burnt and selfdestruct withdraw bal changes 2023-12-07 18:07:14 +03:30
Marius Kjærstad 77c4bbcaa5
build: upgrade -dlgo version to Go 1.21.5 (#28648) 2023-12-07 12:45:09 +02:00
Guillaume Ballet a113497dd7
tests/fuzzers/bls12381: deactivate BLS fuzzer when CGO_ENABLED=0 (#28653)
tests/fuzzers/bls12381: deactivate fuzzer when CGO_ENABLED=0
2023-12-07 10:07:20 +01:00
Sina Mahmoodi 9360cab0df assign values for balance reasons 2023-12-07 11:18:38 +03:30
Marius van der Wijden 55b483d82a
ethdb/pebble: remove a dependency (#28627)
The dependency was not really used anyway, so we can get rid of it.

Co-authored-by: Felix Lange <fjl@twurst.com>
2023-12-06 11:41:04 +01:00
Sina Mahmoodi c5e407ba66 resolve merge conflicts 2023-12-05 18:13:41 +03:30
Guillaume Ballet 69576df254
.github: use github actions to run 32-bit linux tests (#28549)
use github actions to run 32-bit linux tests
2023-12-05 14:45:40 +01:00
Sina Mahmoodi f862531c25 rm chainConfig from OnGenesisBlock 2023-12-05 16:49:03 +03:30
Sina Mahmoodi 9e5c96fdff add chainConfig to block events 2023-12-05 16:31:16 +03:30
Martin Holst Swende b8d44ed98b
log: remove lazy, remove unused interfaces, unexport methods (#28622)
This change 

- Removes interface `log.Format`, 
- Removes method `log.FormatFunc`, 
- unexports `TerminalHandler.TerminalFormat` formatting methods (renamed to `TerminalHandler.format`)
- removes the notion of `log.Lazy` values


The lazy handler was useful in the old log package, since it
could defer the evaluation of costly attributes until later in the
log pipeline: thus, if the logging was done at 'Trace', we could
skip evaluation if logging only was set to 'Info'.

With the move to slog, this way of deferring evaluation is no longer
needed, since slog introduced 'Enabled': the caller can thus do
the evaluate-or-not decision at the callsite, which is much more
straight-forward than dealing with lazy reflect-based evaluation.

Also, lazy evaluation would not work with 'native' slog, as in, these
two statements would be evaluated differently:

```golang
  log.Info("foo", "my lazy", lazyObj)
  slog.Info("foo", "my lazy", lazyObj)
```
2023-12-05 11:54:44 +01:00