lmittmann
bc013bc42e
all: prefer `new(big.Int)` over `big.NewInt(0)` ( #25087 )
...
minor performance improvement: `big.NewInt(0).Xxx` -> `new(big.Int).Xxx`
2 years ago
Marius van der Wijden
8cfd1214b7
common: improve pretty duration regex ( #25073 )
...
* common: improve pretty duration regex
* common: improve pretty duration regex
2 years ago
s7v7nislands
6ad620d642
cmd/ethkey: use accounts.TextHash ( #25069 )
2 years ago
lightclient
1cf58c7b81
readme,eth: remove references to eth.wiki ( #25086 )
2 years ago
Ivan Aracki
f74bb3a3bf
cmd/utils: update --ropsten description ( #25078 )
2 years ago
Martin Holst Swende
a907d7e81a
all: more linters ( #24783 )
...
This enables the following linters
- typecheck
- unused
- staticcheck
- bidichk
- durationcheck
- exportloopref
- gosec
WIth a few exceptions.
- We use a deprecated protobuf in trezor. I didn't want to mess with that, since I cannot meaningfully test any changes there.
- The deprecated TypeMux is used in a few places still, so the warning for it is silenced for now.
- Using string type in context.WithValue is apparently wrong, one should use a custom type, to prevent collisions between different places in the hierarchy of callers. That should be fixed at some point, but may require some attention.
- The warnings for using weak random generator are squashed, since we use a lot of random without need for cryptographic guarantees.
2 years ago
Gustavo Silva
eb94896270
Chore: Minimal gramatical errors (signleton -> singleton) ( #25057 )
...
core: fix typos
2 years ago
Luozhu
3f5b5ec3e5
internal/ethapi: fix typo in comment ( #25056 )
...
typo error: keccack256 -> keccak256
2 years ago
int88
594e321662
core/evm: fix error in comment ( #25040 )
...
Co-authored-by: Martin Holst Swende <martin@swende.se>
3 years ago
henridf
f5037185aa
core/types: improve LogForStorage and ReceiptForStorage comments ( #25032 )
...
Co-authored-by: Felix Lange <fjl@twurst.com>
3 years ago
Rajaram Gaunker
6160296445
core/types: remove unused field 'td' in Block ( #25010 )
3 years ago
Martin Holst Swende
b60a08d2fd
eth/catalyst: remove unauthenticated 'engine' api ( #24997 )
...
Removes engine from any unauthenticated RPC service.
3 years ago
Péter Szilágyi
c4dab8ceca
Merge pull request #25044 from karalabe/rpc-histograms
...
rpc: swap out timer metrics to histograms
3 years ago
Péter Szilágyi
106a162b7c
rpc: swap out timer metrics to histograms
3 years ago
Håvard Anda Estensen
138f0d7494
p2p: use errors.Is for error comparison ( #24882 )
...
Co-authored-by: Felix Lange <fjl@twurst.com>
3 years ago
Péter Szilágyi
41e75480df
eth, les, params: log chain config a bit saner ( #24904 )
...
Previously on Geth startup we just logged the chain config is a semi-json-y format. Whilst that worked while we had a handful of hard-forks defined, currently it's kind of unwieldy.
This PR converts that original data dump and converts it into a user friendly - alas multiline - log output.
3 years ago
Seungbae.yu
450f5da7e1
accounts: increase parseURL test coverage ( #25033 )
...
accounts/url: add test logic what check null string to parseURL()
3 years ago
Martin Holst Swende
403624a4a1
p2p/discover: fix panicky test ( #25038 )
3 years ago
Marius van der Wijden
5e8fa1da70
tests/fuzzers/bls12381: fix blst pairing ( #25037 )
...
* tests/fuzzers/bls12381: fix blst pairing
* tests/fuzzers/bls12381: only build on gofuzz
* tests/fuzzers/bls12381: remove unused code
* tests/fuzzers/bls12381: remove unused code
3 years ago
lwh
84b327244d
accounts/abi/bind: fix duplicate field names in the generated go struct ( #24924 )
...
* accounts/abi/bind: fix duplicate field names in the generated go struct #24627
* accounts, cmd/abigen: resolve name conflicts
* ci lint, accounts/abi: remove unused function overloadedArgName
Co-authored-by: Gary Rong <garyrong0905@gmail.com>
3 years ago
Sina Mahmoodi
d9566e39bd
eth/filters: fix getLogs for pending block ( #24949 )
...
* eth/filters: fix pending for getLogs
* add pending method to test backend
* fix block range validation
3 years ago
Martin Holst Swende
7e9514b8c3
params: update ropsten terminal total difficulty block ( #25018 )
3 years ago
aaronbuchwald
6b3e6cb2ab
trie: move locking into trieDB insert method ( #25030 )
...
Move locking into trieDB insert function
3 years ago
Ikko Ashimine
096daa9a7d
eth/tracers: fix typo in 4byte_tracer_legacy.js ( #25020 )
...
indentifier -> identifier
3 years ago
lightclient
10da98072c
eth/api: use `hexutil.Bytes` for account range method ( #25024 )
...
eth/api: use hexutil.Bytes for range at methods
3 years ago
rjl493456442
22defa5af7
all: introduce trie owner notion ( #24750 )
...
* cmd, core/state, light, trie, eth: add trie owner notion
* all: refactor
* tests: fix goimports
* core/state/snapshot: fix ineffasigns
Co-authored-by: Martin Holst Swende <martin@swende.se>
3 years ago
Martin Holst Swende
c375ee91e9
cmd/geth, core/state/snapshot: rework journal loading, implement account-check ( #24765 )
...
* cmd/geth, core/state/snapshot: rework journal loading, implement account-check
* core/state/snapshot, cmd/geth: polish code (#37 )
* core/state/snapshot: minor nits
* core/state/snapshot: simplify error logic
* cmd/geth: go format
Co-authored-by: rjl493456442 <garyrong0905@gmail.com>
3 years ago
Marius van der Wijden
d6b55749e6
tests/fuzzers/bls12381: fix blst deserializing ( #25036 )
...
* tests/fuzzers/bls12381: fix blst deserializing
* tests/fuzzers/bls12381: fix blst deserializing
3 years ago
Paweł Bylica
997f1c4f0a
core/vm: optimize jumpdest analysis ( #23500 )
...
core/vm: optimize PUSH opcode discrimination
3 years ago
s7v7nislands
b453767ccd
go.mod: clean up ( #25017 )
3 years ago
Jonathan Le Brun
5bc4e8f09d
go.mod: set go version to 1.17 ( #24926 )
...
set go version to 1.17
3 years ago
Ivan Kuznetsov
490c45c70f
consensus/misc: reduce allocations and improve comments in CalcBaseFee ( #24958 )
...
* consensus/misc: reduce allocations in CalcBaseFee
* consensus/misc: add formulas of CalcBaseFee
3 years ago
Martin Holst Swende
6f075bf6af
node: make jwt test less dependent on time ( #25016 )
3 years ago
Marius van der Wijden
2227589f9b
eth/catalyst: return 0x0 on Invalid block on top of pow block ( #25006 )
3 years ago
Marius van der Wijden
3c6d6f7ee8
tests/fuzzers/bls12381: Add BLST to fuzzing support ( #24249 )
...
* tests/fuzzers/bls12381: added blst library
* go.mod: added blst dependency
* tests/fuzzers/bls12381: stuff
* tests/fuzzers/bls12381: added blst to pairing fuzzer
3 years ago
Martin Holst Swende
d8a2305565
eth/tracers: add support for block overrides in debug_traceCall ( #24871 )
...
This PR adds support for block overrides when doing debug_traceCall.
- Previously, debug_traceCall against pending erroneously used a common.Hash{} stateroot when looking up the state, meaning that a totally empty state was used -- so it always failed,
- With this change, we reject executing debug_traceCall against pending.
- And we add ability to override all evm-visible header fields.
3 years ago
rjl493456442
f9806dc872
core: fix canonical hash marker update ( #24996 )
...
* core: fix reorg
* core: revert change for memory efficiency
* core: revert changes
3 years ago
Marius van der Wijden
8c0c0434c9
core/beacon: prevent invalid logsBloom length panic ( #24946 )
...
* core/beacon: prevent invalid logsBloom length panic
* core/beacon: prevent negative baseFeePerGas
* Update core/beacon/types.go
Co-authored-by: Martin Holst Swende <martin@swende.se>
* eth/catalys: go format
Co-authored-by: Martin Holst Swende <martin@swende.se>
3 years ago
Boqin Qin(秦 伯钦)
03157b6efa
eth/filters: use buffered channel to avoid goroutine leak ( #24928 )
3 years ago
Martin Holst Swende
2140aabf53
contracs/checkpointoracle: fix directives ( #24944 )
...
contracts/checkpointoracle: redefine go-generate logic
3 years ago
Marius van der Wijden
93fe17559b
eth/catalyst: fix edge case in NewPayload ( #24955 )
...
Fixes an issue where we would accept a NewPayload where the grandparent is already post ttd, and the parent still has a Difficulty
3 years ago
Harry Kalodner
8845227306
consensus/clique: fix race condition ( #24957 )
...
* consensus/clique: remove race condition
* consensus/clique: fix one more signer data race
Co-authored-by: Gary Rong <garyrong0905@gmail.com>
3 years ago
rjl493456442
a10660b7f8
cmd/geth: extend traverseRawState command ( #24954 )
...
This PR adds node verification into traverseRawState command, so corrupted trie nodes can also be detected.
3 years ago
Marius van der Wijden
86af788790
core: use less memory during reorgs ( #24616 )
...
This PR significantly reduces the memory consumption of a long reorg
3 years ago
Marius van der Wijden
be9742721f
params: set emergency ropsten TTD to 100_000_000_000_000_000_000_000 ( #24975 )
3 years ago
Martin Holst Swende
0287e1a7c0
cmd/abigen: accept combined-json via stdin ( #24960 )
3 years ago
Sina Mahmoodi
0559a9a61e
cmd/geth: exit when freezer has legacy receipts ( #24943 )
...
In #24028 we flagged a warning when finding legacy receipts in the freezer. This PR nudges users a bit more strongly by preventing geth from starting in this case until receipts have been migrated.
It also adds a flag --ignore-legacy-receipts which when present allows geth to start normally.
3 years ago
Felix Lange
d575a2d3bc
params: begin v1.10.19 release cycle
3 years ago
Felix Lange
de23cf910b
params: go-ethereum v1.10.18 stable
3 years ago
Felix Lange
b807f785c3
go.mod: upgrade to docker v1.6.2 ( #24956 )
...
This upgrade is necessary to silence a Dependabot warning.
3 years ago