Commit graph

14741 commits

Author SHA1 Message Date
HAOYUatHZ
23ca4d58a1
fix eth/protocols/snap/sync_test.go (#590) 2023-12-07 19:04:12 +08:00
HAOYUatHZ
60216e44c3
fix eth/protocols/snap/sync_test.go (#589) 2023-12-05 15:31:37 +08:00
HAOYUatHZ
8c5bae2e69
feat: dual code hash (#583)
* add crypto/codehash/codehash.go

fix

* init EmptyCodeHash

* fix

* WIP

* fix

* ???

* minor

* update light/trie.go

* update cmd/geth/snapshot.go

* update core/state/dump.go

* update core/state/snapshot/conversion.go

* update core/state/snapshot/generate.go

* update core/state/pruner/pruner.go

* update core/state/iterator.go

* update core/state/sync.go

* update core/state/state_object.go

* update core/state/statedb.go

* update core/vm/interface.go

* update core/vm/evm.go

* update core/vm/instructions.go

* update core/vm/contract.go

* update core/state_transition.go

* update les/server_requests.go

* update eth/protocols/snap/sync.go

* update internal/ethapi/api.go

* update cmd/geth/snapshot.go

* update ethclient/gethclient/gethclient.go

* gofmt

* fix `(s *stateObject) SetCode`

* fix tests

* minor

* minor

minor
2023-12-01 14:02:09 +08:00
HAOYUatHZ
b639349788
feat: add BlockTxCount limit and BlockPayloadSize limit (#584)
* update consensus/errors.go

* update core/error.go

* update core/types/block.go

* update rollup/rcfg/config.go

* update params/config.go

* update core/block_validator.go

* fix

* update miner/worker.go

* fix
2023-11-28 15:24:21 +08:00
HAOYUatHZ
c70a901ed3
fix: fix bn256Pairing & modexp precompiles tests (#585)
* fix: fix `bn256Pairing` & `modexp` precompiles tests

* fix failed jsons
2023-11-28 14:22:49 +08:00
HAOYUatHZ
17bd8b2815
feat: allow at most 4 inputs for Bn256Pairing precompile (#581)
* feat: allow at most 4 inputs for `Bn256Pairing` precompile

* mv core/vm/testdata/precompiles/bn256Pairing.json core/vm/testdata/precompiles/fail-bn256Pairing.json
2023-11-24 13:50:53 +08:00
HAOYUatHZ
563e36e542
feat: restrict modexp input length (#580)
* feat: restrict `modexp` inputs length

* mv core/vm/testdata/precompiles/modexp.json core/vm/testdata/precompiles/fail-modexp.json

* mv core/vm/testdata/precompiles/modexp_eip2565.json core/vm/testdata/precompiles/fail-modexp_eip2565.json
2023-11-24 13:50:20 +08:00
HAOYUatHZ
9fc7318213
ci: add github action workflow (#577)
* ci: add github test actions

* gofmt cmd/utils/flags.go

* fix some tests

* rename
2023-11-23 16:48:27 +08:00
HAOYUatHZ
fc8e8622d3
feat: add eth_getLogs block range limit (#576)
* update cmd/geth/main.go

* update `eth/ethconfig` package

* update `eth/filters` package

* update cmd/utils/flags.go

* fix cmd/utils/flags.go

* fix eth/filters/filter.go
2023-11-23 14:38:28 +08:00
HAOYUatHZ
fccf142288
feat: add archimedes fork (disable sha256, ripemd160, blake2f precompiles) (#574)
* update core/vm/contracts.go

* update core/vm/evm.go

* update core/vm/runtime/runtime.go

* update params/config.go

* update `(c *ChainConfig) Description()`

* fix
2023-11-22 15:15:10 +08:00
HAOYUatHZ
8f446dd407
feat: add Address.Bytes32() (#572) 2023-11-20 17:13:33 +08:00
HAOYUatHZ
f9d396cf57
feat: improve hexutil.Decode (#571) 2023-11-20 17:09:11 +08:00
HAOYUatHZ
932d6e371c
add crypto/poseidon package (#570) 2023-11-20 16:48:21 +08:00
HAOYUatHZ
5ffd345358
feat: http&ws compression (#569) 2023-11-20 16:39:12 +08:00
HAOYUatHZ
6f99663b3b
feat(ws): increase wsReadBuffer, wsWriteBuffer & `wsMessageSizeLi… (#568)
feat(ws): increase `wsReadBuffer`, `wsWriteBuffer` & `wsMessageSizeLimit`
2023-11-20 15:34:59 +08:00
HAOYUatHZ
ec2054c3ea
rename back imports in rollup packages (#567) 2023-11-20 13:19:16 +08:00
HAOYUatHZ
401a366b9e
add rollup/rollup_sync_service package (#566) 2023-11-20 13:12:53 +08:00
HAOYUatHZ
5d454ae542
add rollup/sync_service package (#565) 2023-11-20 13:06:18 +08:00
HAOYUatHZ
261983dbdb
add l2trace.go (#554)
* feat: add l2trace.go

* minor

minor

* clean up
2023-11-08 16:29:19 +08:00
HAOYUatHZ
76756cea1c
gofmt rollup packages (#556) 2023-11-08 16:25:02 +08:00
HAOYUatHZ
94995b7e10
add L1MessageTx type (#555)
* init

* rename

* fix

* fix

* gofmt
2023-11-08 16:20:31 +08:00
HAOYUatHZ
f4743ad29b
rollup: add rollup/circuitcapacitychecker package (#544) 2023-10-25 15:55:54 +08:00
HAOYUatHZ
a6ac896a2e
rollup: add rollup/withdrawtrie package (#543) 2023-10-24 16:06:16 +08:00
HAOYUatHZ
803286714a
rollup: add rollup/fees package (#541) 2023-10-24 16:05:10 +08:00
HAOYUatHZ
bbe71acf87
rollup: add rollup/rcfg package (#542)
add `rollup/rcfg` package
2023-10-24 16:03:01 +08:00
moomin
a8617c6d4d
txpool/legacypool: remove already known error in legacypool (#28400) 2023-10-23 18:36:11 +03:00
rjl493456442
ab04aeb855
core, eth, trie: filter out boundary nodes and remove dangling nodes in stacktrie (#28327)
* core, eth, trie: filter out boundary nodes in stacktrie

* eth/protocol/snap: add comments

* Update trie/stacktrie.go

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

* eth, trie: remove onBoundary callback

* eth/protocols/snap: keep complete boundary nodes

* eth/protocols/snap: skip healing if the storage trie is already complete

* eth, trie: add more metrics

* eth, trie: address comment

---------

Co-authored-by: Martin Holst Swende <martin@swende.se>
2023-10-23 18:31:56 +03:00
Delweng
43e6a3c196
graphql: return error if block from>to (#28393)
As per discussion in ethereum/execution-apis#475
2023-10-23 17:25:26 +02:00
rjl493456442
3853f50082
trie/triedb/pathdb, core/rawdb: enhance error message in freezer (#28198)
This PR adds more error message for debugging purpose.
2023-10-23 15:46:39 +02:00
hyunchel
062598bb40
core/blockchain: fix typos and grammar (#28295) 2023-10-23 15:23:41 +02:00
kaliubuntu0206
54f35c68be
ethstats: fix bug in block reporting (#28398)
Fixes a bug where the ethstats omits to report full block contents. This bug was a side-effect of https://github.com/ethereum/go-ethereum/pull/26777,  where `CurrentBlock` was changed to return a header instead of a block, leading to a failed type assertion.
2023-10-23 15:06:05 +02:00
aaronbuchwald
6c6982163b
core/state/pruner: track number of skipped items during state pruning (#28368) 2023-10-23 13:24:32 +08:00
Inphi
ffc6a0f36e
event: fix Resubscribe deadlock when unsubscribing after inner sub ends (#28359)
A goroutine is used to manage the lifetime of subscriptions managed by
resubscriptions. When the subscription ends with no error, the resub
goroutine ends as well. However, the resub goroutine needs to live
long enough to read from the unsub channel. Otheriwse, an Unsubscribe
call deadlocks when writing to the unsub channel.

This is fixed by adding a buffer to the unsub channel.
2023-10-22 17:37:56 +02:00
kevaundray
a6a0ae45b6
crypto/kzg4844: use the new trusted setup file and format (#28383)
Changes the trusted_setup to the one created during the kzg-ceremony. The trusted setup file can be found in the consensus specs: https://github.com/ethereum/consensus-specs/blob/dev/presets/mainnet/trusted_setups/trusted_setup_4096.json
---------

Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>
2023-10-22 16:05:04 +02:00
Martin Holst Swende
c1d5a012ea
core/state, tests: fix memory leak via fastcache (#28387)
This change fixes a memory leak, when running either state-tests or blockchain-tests, we allocate a `1MB` fastcache during snapshot generation. `fastcache` is a bit special, and requires a `Reset()` (it has it's own memory allocator). 

The `1MB` was hidden [here](https://github.com/ethereum/go-ethereum/blob/master/tests/state_test_util.go#L333) and [here](https://github.com/ethereum/go-ethereum/blob/master/tests/block_test_util.go#L146) respectively.
2023-10-20 13:35:49 +02:00
Marius van der Wijden
cd29535672
crypto/blake2b: put architecture-dependent features behind build-tag (#28381)
This change to fixes a compilation-flaw on master, by putting architecture-specific functions behind corresponding build tags.
2023-10-19 14:04:26 +02:00
Sina Mahmoodi
4d3c0d41f4
eth/filters: fix flaky test TestPendingTxFilterDeadlock (#28376) 2023-10-19 10:30:55 +02:00
Brandon Liu
ec1a0502bf
rpc: increase timeout in TestClientWebsocketPing (#28371) 2023-10-19 10:08:36 +02:00
Marius van der Wijden
d10a2f6ab7
tests/fuzzers: update fuzzers to be based on go-native fuzzing (#28352)
This change modifies the fuzzers to use the native golang fuzzing framework instead of go-fuzz
2023-10-18 15:01:16 +02:00
lightclient
da55b23d21
eth/fetcher: downgrade stale txs log from warn to debug (#28364) 2023-10-17 19:52:53 +03:00
Marius van der Wijden
d782dc2341
tests/fuzzers/les: fix crash in fuzzer (#28362) 2023-10-17 15:20:22 +02:00
lightclient
20d5256e40
core/chain_makers: add SetParentBeaconRoot(..) to chain makers (#28252) 2023-10-17 14:43:46 +02:00
Adrian Sutton
b85c86022e
api/bind: add CallOpts.BlockHash to allow calling contracts at a specific block hash (#28084)
* api/bind: Add CallOpts.BlockHash to allow calling contracts at a specific block hash.

* ethclient: Add BalanceAtHash, NonceAtHash and StorageAtHash functions
2023-10-17 15:34:01 +03:00
Brandon Liu
f62502e123
internal/ethapi, accounts/abi/bind: use errors.Is for error comparison (#28348)
Co-authored-by: lightclient <lightclient@protonmail.com>
2023-10-17 14:11:04 +02:00
Kero
1f11d2d340
ethclient: ensure the close of canceled context (#28349) 2023-10-17 14:09:48 +02:00
rjl493456442
1b1611b8d0
core, trie, eth: refactor stacktrie constructor (#28350)
This change enhances the stacktrie constructor by introducing an option struct. It also simplifies the `Hash` and `Commit` operations, getting rid of the special handling round root node.
2023-10-17 14:09:25 +02:00
Péter Szilágyi
aeb0abf80a params: begin v1.13.5 release cycle 2023-10-17 14:18:45 +03:00
Péter Szilágyi
3f907d6a6f params: release Geth v1.13.4 2023-10-17 14:17:27 +03:00
Marius van der Wijden
667966c5c1
eth/fetcher: fix fetcher timeout (#28220)
This changes fixes a bug in the fetcher, where the timeout for how long to remember underpriced transaction was erroneously compared, and the timeout never hit.
---------

Co-authored-by: Martin Holst Swende <martin@swende.se>
2023-10-17 10:38:00 +02:00
xiaolou86
00c63830e4
cmd: fix typos (#28323) 2023-10-17 15:53:10 +08:00