Commit graph

14656 commits

Author SHA1 Message Date
HAOYUatHZ
edb91fee55
test: skip TestExecutionSpec (#647) 2024-02-28 16:23:11 +08:00
HAOYUatHZ
001a80226a
feat: add RowConsumption & RowUsage types (#625) 2024-01-31 10:41:51 +08:00
HAOYUatHZ
14d8266fc2
fix: fix (r *Receipt) decodeTyped (#617) 2024-01-15 20:49:35 +08:00
HAOYUatHZ
713fc8c254
feat: feevault (#614)
* update core/blockchain.go

* update core/vm/evm.go

* update core/evm.go

* fix bugs

* update core/vm/instructions.go
2024-01-11 12:48:37 +08:00
HAOYUatHZ
07d5fddde8
feat: l1datafee (#611)
* update params/config.go

* update core/state_transition.go

update core/state_transition.go

* update core/state_prefetcher.go

* update core/state_processor.go

* update core/types/gen_receipt_json.go

* update core/types/receipt.go

* update internal/ethapi/api.go

* update Message type and interface

* update accounts/abi/bind/backends/simulated.go

* update eth/tracers/api.go

* eth/tracers/logger/logger.go WIP

* update eth/state_accessor.go

update eth/state_accessor.go

* update les/state_accessor.go

* update cmd/evm/internal/t8ntool/execution.go

* update core/rawdb/accessors_chain.go

* update eth/api_backend.go

* update les/api_backend.go

* update `ValidateTransactionWithState`

* update light/txpool.go

* refactor `ErrInsufficientFundsWithL1DataFee`

* clean up `rollup/fees/rollup_fee.go`

* update tests/state_test_util.go

* fix tests
2024-01-09 16:58:02 +08:00
HAOYUatHZ
adfec9a0a3
feat: L1 msg tx (#610)
* update consensus/errors.go

* update core/types/receipt.go

* update core/genesis.go

* update core/blockchain.go

* update core/types/block.go

* update eth/handler.go

* update internal/ethapi/api.go

* update core/block_validator.go

* update internal/jsre/deps/web3.js

* add core/rawdb/accessors_skipped_txs.go & core/rawdb/accessors_skipped_txs_test.go

* update core/rawdb/schema.go

* update core/state_transition.go part-1

* update accounts/abi/bind/backends/simulated.go & interfaces.go

* update core/types/transaction.go

* update core/types/transaction_marshalling.go part-1

* update core/types/transaction_marshalling.go part-2

* update core/state_transition.go part-2

* update core/types/transaction_signing.go
2023-12-28 16:09:51 +08:00
HAOYUatHZ
35b8da75a0
correctly handle finalized&safe block number (#605)
* better naming

* update eth/api_backend.go

* update eth/gasprice/feehistory.go
2023-12-22 15:24:58 +08:00
HAOYUatHZ
44fed24237
add rollup_sync_service (#600)
* update cmd/geth/main.go

* update cmd/utils/flags.go

* add core/rawdb/accessors_rollup_event.go and tests

* update eth/ethconfig/gen_config.go

* update eth/ethconfig/config.go

* update core/rawdb/schema.go

* update eth/backend.go

* fix rollup/rollup_sync_service/rollup_sync_service.go
2023-12-21 16:17:47 +08:00
Nazarii Denha
857b28caa6
feat: return 0 for DIFFICULTY opcode (#603)
* disable selfdestruct and selfdestruct 6780

* return 0 for op DIFFICULTY

* fix test

* Revert "disable selfdestruct and selfdestruct 6780"

This reverts commit 6767a82d743fd17c8b45c5d7c335c0f1a0aac5cb.
2023-12-20 17:37:05 +08:00
HAOYUatHZ
ebae7861bc
add sync_service (#596)
* update node/config.go

* update eth/backend.go

* update params/config.go

* update core/events.go

* add core/rawdb/accessors_l1_message.go

* add core/rawdb/accessors_l1_message_test.go

* update ethdb/memorydb/memorydb.go

* update core/rawdb/schema.go

* update cmd/utils/flags.go

* update cmd/geth/main.go

* update core/rawdb/database.go

* update cmd/devp2p/internal/ethtest/suite_test.go

* update console/console_test.go

* update eth/catalyst/api_test.go

* update eth/catalyst/simulated_beacon_test.go

* update ethclient/ethclient_test.go

* update ethclient/gethclient/gethclient_test.go

* update graphql/graphql_test.go

* update les/api_test.go

* update miner/stress/clique/main.go
2023-12-14 19:19:52 +08:00
HAOYUatHZ
a6859fb6bd
fix types in gethclient.Client.GetProof (#599) 2023-12-14 19:04:52 +08:00
HAOYUatHZ
36ddb8d069
Revert "fix testGetProof (#597)" (#598)
This reverts commit ed07a8aff1.
2023-12-14 19:02:36 +08:00
HAOYUatHZ
ed07a8aff1
fix testGetProof (#597) 2023-12-14 18:01:02 +08:00
HAOYUatHZ
2cb5e034c1
feat: change BLOCKHASH opcode behavior to `keccak(chain_id || block… (#582)
* feat: change `BLOCKHASH` opcode behavior to `keccak(chain_id || block_number)`

* fix: conflicts in library for blockhash pr (#591)

* feat: change `BLOCKHASH` opcode behavior to `keccak(chain_id || block_number)`

* fix conflicts in library

---------

Co-authored-by: HAOYUatHZ <haoyu@protonmail.com>
Co-authored-by: HAOYUatHZ <37070449+HAOYUatHZ@users.noreply.github.com>

---------

Co-authored-by: Nazarii Denha <dengaaa2002@gmail.com>
2023-12-11 15:38:59 +08:00
HAOYUatHZ
ee9b3d9531
feat: add CodeSize to account (#587) 2023-12-07 19:39:59 +08:00
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