Commit graph

14704 commits

Author SHA1 Message Date
HAOYUatHZ
a84baf6bc3
fix(tracing): fix error handling in fillBlockTrace (#890) (#898)
* fix(tracing): fix error handling in `fillBlockTrace`

* chore: auto version bump [bot]

* chore: auto version bump [bot]

---------

Co-authored-by: HAOYUatHZ <HAOYUatHZ@users.noreply.github.com>
2024-07-12 11:37:21 +08:00
HAOYUatHZ
1c9cc6d621
feat: add scroll_api (#893)
* update eth/api.go

* update internal/web3ext/web3ext.go

* fix

* update eth/backend.go

* update ethclient/ethclient.go
2024-07-10 13:25:51 +08:00
HAOYUatHZ
65af7ee9e5
feat: update L2 base fee formula (#892)
feat: update L2 base fee formula (#891)

* feat: update L2 base fee formula

* update test tx hashes

Co-authored-by: Péter Garamvölgyi <peter@scroll.io>
2024-07-10 09:36:29 +08:00
HAOYUatHZ
f777318776
sync l1datafee change for curie (#888)
* update rollup/rcfg/config.go

* update consensus/misc/curie.go

* update rollup/fees/rollup_fee_test.go

* update rollup/fees/rollup_fee.go

* update rollup/tracing/tracing.go

* update tests/state_test_util.go

* update light/txpool.go

* fix some

* update eth/tracers/internal/tracetest/prestate_test.go

* update eth/tracers/api.go

* update core/chain_makers.go

* update core/state_processor.go

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

* update txpool

* update ethclient/ethclient_test.go

* update ethclient/gethclient/gethclient_test.go

* update core/blockchain_test.go

* update miner/worker.go

* update txpool 2
2024-07-09 20:45:54 +08:00
HAOYUatHZ
5e255cf5b1
fix(traces): several tracing fixes (#830)
* fix(trace): add `extraData`

* fix(trace): fix `StructLogger`'s `CaptureState`
2024-07-08 17:13:44 +08:00
HAOYUatHZ
72577219c0
fix fee logic in TransitionDb (#887)
update fee_vault logic in TransitionDb
2024-07-08 17:08:22 +08:00
HAOYUatHZ
b5dee527c4
fix l2trace TransactionData (#882)
update `TransactionData` type
2024-07-04 16:03:19 +08:00
HAOYUatHZ
2f116b3bc5
update MakeSigner (#881) 2024-07-04 14:19:16 +08:00
HAOYUatHZ
0892822b8c
sync blob tx encoding/decoding fixes (#879)
* feat(transactions): support blob tx only in encoding/decoding (#626)

* draft change

* fix CI

* remove CancunBlock params and change cancunSigner to londonSignerWithEIP4844

* support blob transactions in receipt

* trigger ci

* bump version

* feat(ethclient & gethclient): support blob transaction (#661)

* feat: support blob transaction

* sync tx encoding/decoding

* more fixes

* add uint236 support in rlp encoding decoding

* revert a format change

* trigger ci

---------

Co-authored-by: colin <102356659+colinlyguo@users.noreply.github.com>
2024-07-04 11:33:23 +08:00
HAOYUatHZ
9c7381669e
fix(traces): deletion proof apply wrong storage value from structLogger (#870)
cherry pick 4e3bf2f
2024-07-01 11:05:50 +08:00
HAOYUatHZ
86c37a9075
fix some tests (#857)
* fix cmd/geth/consolecmd_test.go

* fix testBackend

* fix `TestGolangBindings` & `TestAdjustTime`

* update js_tracer tests

* refactor
2024-06-27 22:30:08 +08:00
HAOYUatHZ
b6a17e33f1
fix some trie tests (#833)
* update `newTrieReader`

* fix `TestGolangBindings` & `TestAdjustTime`

* fix trie tests

* evert "fix `TestGolangBindings` & `TestAdjustTime`"

This reverts commit 4d0c60103fbda5061df36ac031622eb05a10e0d6.
2024-06-27 21:09:20 +08:00
HAOYUatHZ
a83c05c9c4
sync rollup_sync_service fixes (#860)
* feat(rollup): add fallback if TransactionByHash fails in getting commitBatch calldata (#601)

* feat(rollup): add fallback if TransactionByHash fails in getting commitBatch calldata

* Update rollup/rollup_sync_service/rollup_sync_service.go

Co-authored-by: Péter Garamvölgyi <peter@scroll.io>

* change log.Warn to log.Debug

---------

Co-authored-by: Péter Garamvölgyi <peter@scroll.io>

* fix(rollup sync service): remove syscall.Kill (#636)

* fix(rollup sync service): remove syscall.Kill

* bump version

* fix(api-backend): disable finalized tag when rollup verify is disabled (#722)

---------

Co-authored-by: colin <102356659+colinlyguo@users.noreply.github.com>
Co-authored-by: Péter Garamvölgyi <peter@scroll.io>
2024-06-26 17:38:00 +08:00
HAOYUatHZ
b521e62626
update scroll-mainnet CurieBlock (#859)
feat: delay Scroll mainnet Curie block by 6 days (#850)

* feat: delay Scroll mainnet Curie block by 6 days

* update

* update

Co-authored-by: Péter Garamvölgyi <peter@scroll.io>
2024-06-26 17:07:59 +08:00
HAOYUatHZ
360bc1ed5e
update summarizeBadBlock (#858) 2024-06-26 16:40:15 +08:00
HAOYUatHZ
a19bdff959
feat(ccc): reuse a buffer for json encoding (#855)
Co-authored-by: Ömer Faruk Irmak <omerfirmak@gmail.com>
2024-06-25 20:18:47 +08:00
HAOYUatHZ
459324c41d
perf(poseidon): eliminate heap allocations in poseidon (#853)
Co-authored-by: Ömer Faruk Irmak <omerfirmak@gmail.com>
2024-06-25 11:33:50 +08:00
HAOYUatHZ
9204dc4210
fix(txJSON): L1 message type MarshalJSON (#849)
* update core/types/transaction_marshalling.go

* update internal/ethapi/api.go
2024-06-24 15:18:43 +08:00
HAOYUatHZ
02a6b64718
update CurieBlock for scrol- mainnet & scroll-sepolia (#848)
update CurieBlock for scrol-mainnet & scroll-sepolia
2024-06-23 21:55:40 +08:00
HAOYUatHZ
ec6915d9b6
ci: add github action to replace import_path and release (#847) 2024-06-22 15:57:22 +08:00
HAOYUatHZ
0144095e64
fix load genesis (#834)
* fix `SetupGenesisBlockWithOverride`

* fix `configOrDefault`
2024-06-19 20:50:39 +08:00
HAOYUatHZ
e54781ea02
fix: update Dockerfile.mockccc (#829)
fix update Dockerfile.mockccc
2024-06-15 09:44:11 +08:00
HAOYUatHZ
d2fa88db28
feat: update tracing config (#827) 2024-06-14 21:44:21 +08:00
HAOYUatHZ
bed81b02f1
fix: sync l1msg fix from develop branch (#826)
* fix: ensure L1 messages are stored in db consistently (#679)

* fix: ensure L1 messages are stored in db consistently

* check db iterator errors

* fix(sync-service): only add queue index when message index is not zero (#682)

* fix(sync-service): increase queue index only when L1 message index is not zero

---------

Co-authored-by: Péter Garamvölgyi <peter@scroll.io>

fix

---------

Co-authored-by: Péter Garamvölgyi <peter@scroll.io>
Co-authored-by: colin <102356659+colinlyguo@users.noreply.github.com>
2024-06-13 20:15:21 +08:00
HAOYUatHZ
1ca3b74ec1
feat: upgrade to zktrie 0.8.4 and fix some issues (#820)
* feat(zktrie): bump to `v0.8.4`

* fix(zktrie): copy trie properly for concurrent access (#747)

* fix `ZkTrie` `Commit`

* some fixes

---------

Co-authored-by: Ömer Faruk Irmak <omerfirmak@gmail.com>
2024-06-13 19:38:53 +08:00
HAOYUatHZ
1f58af2d5b
disable "auto switch to snap sync" (#813)
don't switch to snapsync
2024-06-13 19:36:36 +08:00
HAOYUatHZ
ef2ac7ee8c
fix: fix trie default hash (#803)
* update hashes.go

* fix trie

* silence
2024-06-13 19:35:17 +08:00
HAOYUatHZ
b3920abc9a
feat: skip RANDOM & PREVRANDAO opcodes (#811)
fix opRandom
2024-06-08 17:01:33 +08:00
HAOYUatHZ
20a7093f4c
fix ZkTrie's GetStorage (#800) 2024-06-05 15:26:30 +08:00
HAOYUatHZ
b0b4608450
feat: config several forks opcodes & precompiles (#780)
* add Curie & Descartes InstructionSet; update LondonInstructionSet

* update core/vm/runtime/runtime.go

* update core/vm/opcodes.go

* update tests/init.go

* update core/vm/contracts.go

* update eth/tracers/js/tracer_test.go

* update core/state_processor_test.go

* london: update core/types/transaction_signing.go

* update tests/init.go

* update core/txpool/validation.go

* update tests/state_test_util.go

* remove selfdestruct
2024-06-01 16:22:31 +08:00
HAOYUatHZ
f3c8cc1cb7
test: add eip1559_scroll_test.go (#784) 2024-05-30 11:52:49 +08:00
HAOYUatHZ
e5171495e1
feat: check basefee in Curie (#770)
* add consensus/misc/eip1559/eip1559_scroll.go

* update core/chain_makers.go

* add `fees.GetL1BaseFee`

* update eth/gasprice/feehistory.go

* fix internal/ethapi/api.go & eth/filters/api.go

* update graphql/graphql.go

* update miner/worker.go

* update txpool

* fix api_backend

* fix Curie

* update core/state_transition.go

* update internal/ethapi/transaction_args.go

* fix cmd/evm/internal/t8ntool/transition.go

* update core/state_processor_test.go

* update core/txpool/blobpool/blobpool_test.go

* fix internal/ethapi/api_test.go

* update eth/gasprice/gasprice_test.go

* update internal/ethapi/transaction_args_test.go

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

* update accounts/abi/bind/base.go
2024-05-28 08:37:13 +08:00
HAOYUatHZ
34bf14978e
fix EmptyRootHash & ZkTrie's UpdateStorage; fix genesis (#759)
* ???

* fix `UpdateStorage`

* draft fix

* minor
2024-05-23 23:03:59 +08:00
HAOYUatHZ
62c81eee01
feat: add scroll network (#751)
* update core/genesis_alloc.go

* update eth/ethconfig/config.go

* update cmd/utils/flags.go

* fix cmd/utils/flags.go

* update params/bootnodes.go

* update cmd/geth/main.go

* update cmd/utils/flags.go

* update core/genesis.go

* update params/config.go

* try fix fork ordering 1

* try fix fork ordering 2

* update `TestGenesisHashes`

* update `TestCustomGenesis`

* allow shanghai in clique & ethhash
2024-05-17 20:20:43 +08:00
HAOYUatHZ
47f5a9668d
build: update dockerfiles (#750)
* update Makefile

* update Dockerfile

* add Dockerfile.mockccc

* add Dockerfile.mockccc.alpine
2024-05-14 10:12:46 +08:00
HAOYUatHZ
2d335724b0
feat: compile ccc (#741)
* update Makefile

* update

* fix github action
2024-05-07 16:04:32 +08:00
HAOYUatHZ
40f30fd7be
build(ci): add github docker workflow (#733) 2024-04-29 14:47:19 +08:00
HAOYUatHZ
ca1ba1da87
feat: add ccc into miner (#674)
* add core/rawdb/accessors_row_consumption.go

* update core/rawdb/schema.go

* update eth/ethconfig/config.go

* update eth/ethconfig/gen_config.go

* update miner/miner.go

* update eth/backend.go

* update core/types.go

* update cmd/geth/main.go

* update cmd/utils/flags.go

* update core/types/block.go

* update core/block_validator.go

* WIP: update miner/worker.go

* WIP: update miner/worker.go

* WIP: update miner/worker.go

* WIP: update miner/worker.go

* WIP: update miner/worker.go

* WIP: update miner/worker.go add withTimer

* WIP: update miner/worker.go

* WIP: update miner/worker.go add some func

* WIP: update miner/worker.go `makeEnv`

* fix

* fix

* minor

* init traces return

* init accRows

* update `applyTransaction`

* fix `TestPriorityClient`

* miner: update metrics

* minor

* add `l2CommitTxTraceStateRevertTimer`

* update `calcAndSetAccRowsForEnv`

* start to work on `commitTransactions`

* seal block early if we're over time

* If we have collected enough transactions then we're done

* check L1 message queue index

* A single L1 message leads to out-of-gas

* more on nil err

* more error

* skip RemoveTx for now

* minor

* l1TxStrangeErr

* fix interface

* start to work on `commitWork`

* minor

* draft `fillTransactions`

* fix some types

* refactor

* fix

* add `circuitCapacityReached`

* minor

* fix `txToLazyTx`

* fix `(m *mockBackend) ChainDb()`

* fix `removeTx`

* update comments
2024-04-28 18:16:10 +08:00
HAOYUatHZ
bdcede5221
fix TestStructLogMarshalingOmitEmpty (#727) 2024-04-28 12:53:44 +08:00
HAOYUatHZ
675d81b417
fix(test): fix TestStoreCapture (#711) 2024-04-18 23:31:36 +08:00
HAOYUatHZ
b078aca5f6
refactor tracing codes (#675)
* update rollup/tracing/tracing.go

* rename

* fix
2024-03-20 08:44:20 +08:00
HAOYUatHZ
badcd0c432
fix StructLog (#672) 2024-03-16 16:23:49 +08:00
HAOYUatHZ
4ebc036d75
feat: add scroll trace (#620)
* add rollup/tracing/tracing.go

* update eth/tracers/logger/access_list_tracer.go

* update core/types/l2trace.go

* update core/vm/evm.go

* update core/evm.go

* update core/vm/interpreter.go

* update eth/tracers/logger/logger_json.go

* update core/vm/logger_trace.go

* mv core/vm/logger_trace.go

mv core/vm/logger_trace.go

* update eth/tracers/api_blocktrace.go

* update eth/tracers/js/tracer.go

* update `EVMLogger` interface

* fix `JSONLogger`'s `CaptureStateAfter`

* fix `OpcodeExecs`

* minor fixes

* fix eth/tracers/api_blocktrace.go

* comment out eth/tracers/logger/logger_trace.go

* fix

* update eth/tracers/api.go

* some renamings

* update cmd/utils/flags.go

* update rollup/tracing/tracing.go WIP

* fix interface

* minor

* fix `FormatLogs`

* Fix tracers (#663)

* export `CallTracer`

* export `CallTracer`

* export `PrestateTracer`

* export `MuxTracer`

* refactor

* merge `StructLogRes` (#662)

* merge `StructLogRes`

* clean up

* fix

* fix

* update core/block_validator.go

* update ethclient/ethclient.go

* merge `ExecutionResult` (#667)

* merge `ExecutionResult`

* fix l1datafee

* fix eth/tracers/api_test.go (#669)

* clean up

* WIP: update eth/tracers/logger/logger.go

* update `CaptureStart`

* update `CaptureExit`

* init `CaptureEnter`

* update `CaptureEnter` 1

* fix `CaptureEnter` 1

* fix depth

* fix `CaptureEnter` 2

* update `CaptureEnter` 2
2024-03-16 10:26:10 +08:00
HAOYUatHZ
2829e66aea
fix ProofTracer interface (#666)
* fix `TestProofWithDeletion`

* fix `ProofTracer` interface
2024-03-12 19:13:56 +08:00
HAOYUatHZ
521183581a
feat: add zktrie (#621)
* init

* add trie/database_types.go

* update params/config.go

* update les/server.go

* update core/types/state_account_marshalling.go

* add core/types/state_account_marshalling_test.go

* update eth/backend.go

* update trie/zk_trie.go

* update trie/zk_trie_database.go

* update trie/zk_trie_database_test.go

* update trie/zk_trie_impl_test.go

* update trie/zk_trie_proof_test.go

* update trie/zk_trie_test.go

* minor

* init database_supplement.go

* minor

* add some supplements

* fix

* fix

* add `zkproof` package

* add trie/zktrie_deletionproof.go

* init core/state/state_prove.go

* fix

* fix `(t *ZkTrie) Commit`

* fix

* update trie/proof.go

* fix trie/zk_trie_database.go

* update core/blockchain.go

* update core/genesis.go

* fix init trie_db (#639)

* add config

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

* update core/chain_makers.go

* update cmd/evm/runner.go

fix cmd/evm/runner.go

* update core/chain_makers.go

* refactor `triedbConfig`

* update core/genesis.go

* refactor `genesis.ToBlock()`

* fix core/genesis_test.go

* update core/state/database.go

* update trie/database.go

* update core/state/state_object.go

* clean up

* fix tests

* fix `TestDump` & `TestIterativeDump` (#651)

* fix `TestDump`

* fix `compareStateObjects`

* fix `TestIterativeDump`

* fix `TestTinyTrie` & `TestCommitSequence` (#652)

* zktrie: fix tests (#656)

* fix `TestOdrContractCallLes2`

* fix `internal/ethapi` tests

* fix `TestFilters`

* fix `core/state/snapshot/generate_test.go

* update core/genesis_test.go (#658)
2024-03-06 11:50:28 +08:00
HAOYUatHZ
d3c7149942
fix rawdb isNotFoundErr (#657) 2024-03-05 20:07:44 +08:00
HAOYUatHZ
a196d0320e
fix internal/ethapi/api_test.go (#655)
* fix `TestTransaction_RoundTripRpcJSON`

* fix `TestTransactionBlobTx`

* fix `TestRPCMarshalBlock`
2024-03-04 23:17:00 +08:00
HAOYUatHZ
669e096e47
fix StateAccount.EncodeRLP (#648) 2024-03-02 15:33:10 +08:00
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