Commit graph

2051 commits

Author SHA1 Message Date
Péter Garamvölgyi
5faeeaaf62
feat: add metrics to block validation (#677)
* feat: add metrics to block validation

* more metrics

* bump version
2024-03-27 16:36:08 +00:00
vyzo
d1e4b59eec
fix: Check L1DataFee in txpool promoteExecutables and demoteUnexecutables (#627)
* Check L1DataFee in txpool promoteExecutables

* bump version

* implement L1 data fee in demoteUnexecutables as well

* Update core/tx_list.go

Co-authored-by: colin <102356659+colinlyguo@users.noreply.github.com>

* Update core/tx_pool.go

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

* feat: consider l1 data fee in txpool costcap (#681)

* feat(txpool): consider l1 data fee in costcap

* fix CI

* simplify logic

* remove one db read op

* bump version

---------

Co-authored-by: colin <102356659+colinlyguo@users.noreply.github.com>
Co-authored-by: Péter Garamvölgyi <peter@scroll.io>
Co-authored-by: georgehao <haohongfan@gmail.com>
2024-03-27 15:31:51 +00:00
Péter Garamvölgyi
0f0cd99f7a
feat: update upcoming fork names (#680)
* feat: update upcoming fork names

* bump version

* Apply suggestions from code review

Co-authored-by: Nazarii Denha <dengaaa2002@gmail.com>

* bump version

---------

Co-authored-by: Nazarii Denha <dengaaa2002@gmail.com>
2024-03-26 14:41:32 +00:00
Péter Garamvölgyi
411889ef92
fix: ensure L1 messages are stored in db consistently (#679)
* fix: ensure L1 messages are stored in db consistently

* check db iterator errors
2024-03-26 14:02:03 +00:00
colin
4553f5f269
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
2024-03-14 17:51:30 +08:00
Péter Garamvölgyi
ccec84ce63
feat: re-enable EIP-1559 in Banach hard fork (#634)
* feat: re-enable EIP-1559 in Banach hard fork

* enable BASEFEE opcode

* do not double gas limit on Banach fork block

* do not burn base fee

* update base fee calculation logic

* fix gas price oracle

* fix ethapi backend

* typo

* reorder worker code

* update genesis base fee

* add MaximumL2BaseFee

* add base fee metrics

* handle nil base fee

* revert state-transition change

* bump version

* remove TODO

* update test

* fix typo

* fix typo

* update traces

* fix test

* update london to banach

* handle error

* bump version

* bump version
2024-03-11 13:57:52 +00:00
colin
a807a41fd1
fix(txJSON): L1 message type MarshalJSON (#630)
* fix(txJSON): L1 message type MarshalJSON

* address comments

* bump version

* trigger ci

* bump version

* bump version
2024-03-05 20:12:10 +08:00
georgehao
06a21f327d
feat: add transactions len metrics of block processer (#650)
* feat: add transactions len metrics of block processer

* feat: bump version
2024-03-04 10:21:05 +08:00
georgehao
bfa7abcc50
feat: add metric to evm call (#646)
* feat: add metric to evm

* feat: bump version
2024-02-28 09:45:38 +08:00
Nazarii Denha
ee381b2451
feat: setup configuration for upcoming hard fork and re-enable sha256 precompile (#562)
* setup configuration for upcoming hard fork

* bump version

* bump version

* enable sha256

* rename to kepler

* update

* update lint

* rename Kepler to Banach

* goimports

* reorder precompile forks

* typo

---------

Co-authored-by: Péter Garamvölgyi <peter@scroll.io>
2024-02-09 13:46:33 +01:00
Péter Garamvölgyi
7e3a7ae744
ci: fix goimports lint in CI (#628)
* ci: fix goimports lint in CI

* use different go versions for goimports and go mod tidy

* goimports
2024-02-09 13:25:59 +01:00
colin
ae7cbae19c
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
2024-02-01 18:35:12 +01:00
colin
d86b42cdaa
fix(ethclient): support new cancun fields in header (#623) 2024-01-31 09:04:56 +08:00
HAOYUatHZ
88349c600d
feat: add mux tracer for native call tracer and native prestate tracers (#615)
* hack to use native tracers

* update

* fix

* add prestate

* fix marshal

* format

* draft

* move

* separate `MuxTracer`

* fix

* update miner/worker.go

* update api

* rename

* remove

* bump go version

* bump golangci

* goimports lint

* fix tests

* minor

* clean up

* fix tests

* sync error handling

* bump go version in Dockerfiles

* bump version

* lint: disable `goconst` & `goimports`

* bump version again

* add comments

---------

Co-authored-by: lightsing <light.tsing@gmail.com>
2024-01-18 14:58:27 +08:00
colin
fc06826a04
fix(receipt): L1 message type tx RLP decoding (#616)
* fix(receipt): L1 message type tx RLP decoding

* another
2024-01-15 15:07:41 +08:00
colin
219b84e1af
fix(txpool): revert duplicated l1 data fee check (#612)
* Revert "fix(tx-pool): consider L1 data fee in validateTx"

This reverts commit 0a5c04b85d0f8b509542306894c03bd3feff65bd.

* simplify veriftfee

* bump version

* address comments

* keep the original behavior

* fix again

* nit

* tweak comments
2024-01-08 20:25:46 +08:00
colin
5b7079b3a4
fix(tx-pool): consider L1 data fee in validateTx (#609)
* fix(tx-pool): consider L1 data fee in validateTx

* bump version
2023-12-26 10:12:26 +08:00
colin
b235afbccf
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>
2023-12-18 14:51:46 +01:00
HAOYUatHZ
38a3a9c919
fix(tracing): fix getTxResult returned error format (#561)
* fix(tracing): fix `getTxResult` returned error format

* Update version.go
2023-11-30 08:51:11 +08:00
Zhang Zhuo
9f143b47b2
feat (libzkp-v0.9.8): recordStorageDetail even when LogConfig.DisableStorage == true (#564)
* trace: recordStorageDetail even when LogConfig.DisableStorage == true

* Set `DisableStorage` to true.

* Update libzkp to zkevm-circuits `feat/remove-step-storage-from-trace` branch.

* Add `strict-ccc` feature to libzkp.

* Upgrade libzkp to use prover `v0.9.8`.

* Update params version.

* Update params version.

---------

Co-authored-by: Steven Gu <asongala@163.com>
2023-11-22 14:44:08 +08:00
DongXi Huang
d537451863
refactor(evm): Remove duplicate defined variables (#559)
Refactor: Remove duplicate defined variables
2023-11-12 14:17:37 +01:00
colin
441212200a
feat(rollup): sync finalized batches from L1 (#515)
* feat(rollup): sync finalized batches from L1

* tweak

* address comments

* address comments

* tweak

* address comments

* Update rollup/eventwatcher/eventwatcher.go

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

* address comments

* address comments

* address comments

* add s.rollupSyncService.Stop()

* add block chunk batch tests

* fix goimports-lint

* address comments

* address comments

* remove

* add TestUnpackLog test

* add decodeChunkRanges tests

* add commit batch version check

* fix goimport & golint

* tweak

* fixes

* add TestRollupSyncServiceStartAndStop

* add TestGetChunkRanges

* address comments

* add TestValidateBatch

* add TestCalculateFinalizedBatchMeta

* address comments

* address comments

* fix

* address comments

* address comments

* fix

* tweak log

* fix

* tweak logs

* increase wait time

* add --rollup.verify flag

* add flag check in s.rollupSyncService.Stop()

* bump version

* refactor

* tweak configs

* tweak

* refactor getLocalInfoForBatch

* use syscall.Kill(os.Getpid(), syscall.SIGTERM) to shutdown

* refactor decodeChunkBlockRanges

* nit

* address comments

* address comments

* add WithdrawRoot and StateRoot in FinalizedBatchMeta

* address comments

* address comments

* add ctx.Err() check in retry

* add configs in gen_config.go

* bump version

* fix goimport & golint

* try to fix goimport

* revert change

* fix goimport & golint

* tweak

* bump version

* add l2 block -> batch index mapping

* bump version

* add mainnet config

* bump version

* address comments

* rename some vars

* feat: add more detailed logs in crash case (#547)

add more detailed logs in crash case

* trigger ci

* re-add batch finalization progress log

* remove block number -> batch index mapping

---------

Co-authored-by: Péter Garamvölgyi <peter@scroll.io>
Co-authored-by: HAOYUatHZ <37070449+HAOYUatHZ@users.noreply.github.com>
2023-10-28 06:29:31 +08:00
HAOYUatHZ
fcb3e1768d
refactor(tracing): refactor wrappedProof (#536) 2023-10-18 00:31:29 +08:00
Péter Garamvölgyi
cfd9de0f92
feat: update network configuration (#533) 2023-10-08 16:03:41 +02:00
Péter Garamvölgyi
b3d0f164ea
feat: add new configuration (#526)
* add new configuration

* update

* update

* bump version

* remove todo
2023-10-08 13:29:09 +02:00
Péter Garamvölgyi
68697b0fee
fix: use non-overlapping DB prefix for L1 messages (#532)
* fix: use non-overlapping db prefix for L1 messages

* bump version
2023-10-04 19:28:26 +02:00
Péter Garamvölgyi
df41822bcf
fix: re-enable CCC light mode (#530)
fix: re-enable light mode
2023-10-04 14:01:55 +02:00
Steven
7cebee85a8
fix(libzkp): upgrade libzkp to v0.9.4 and add ccc SetLightMode (#522)
* Upgrade to prover `v0.9.4`, and add `SetLightMode` function.

* set ccc light_mode = false for validator

* fix

* bump version

---------

Co-authored-by: Zhang Zhuo <mycinbrin@gmail.com>
Co-authored-by: Péter Garamvölgyi <peter@scroll.io>
2023-10-03 15:42:54 +02:00
Péter Garamvölgyi
751dbda234
feat: add metrics in L1 message iterator (#527)
* feat: add metrics in L1 message iterator

* add L1 message size metric
2023-10-01 14:48:59 +02:00
Péter Garamvölgyi
fe8232a40f
fix(worker): short-circuit l1 message iteration (#525)
* fix(worker): short-circuit l1 message iteration

* Update core/rawdb/accessors_l1_message_test.go

Co-authored-by: colin <102356659+colinlyguo@users.noreply.github.com>

---------

Co-authored-by: colin <102356659+colinlyguo@users.noreply.github.com>
2023-09-29 21:16:37 +02:00
Péter Garamvölgyi
93a9497d75
refactor(worker): order L1 messages by queue index (#512)
* refactor(worker): order L1 messages by queue index

* bump version

* bump version
2023-09-18 10:34:51 +02:00
maskpp
417dd02827
fix(sdk): accept blocks where coinbase is null (e.g. pending block) (#509)
* fix error(when get pengding block) coinbase address is null

* fix comments
2023-09-13 17:00:17 +08:00
Péter Garamvölgyi
9c1433b62a
fix(trace): use correct roots in trace of block with one transaction (#508)
fix: use correct roots in trace of block with one transaction
2023-09-11 12:13:50 +02:00
HAOYUatHZ
dade96d416
fix(rawdb, api): fix rawdb.writeSkippedTransaction & api.GetSkippedTransaction (#503)
* fix(rawsdb): fix `writeSkippedTransaction`

* Update version.go

* minor

* clean up
2023-09-07 15:35:04 +08:00
HAOYUatHZ
0b6c3be40d
feat(api/rawdb): allow storing traces for skipped txs (#500) 2023-09-05 11:03:15 +08:00
Zhang Zhuo
2d9d48d463
fix(trace): record account proof for ErrContractAddressCollision (#488)
* fix(trace): record account proof for ErrContractAddressCollision

* bump version

* fix memory reading

* bump version

---------

Co-authored-by: Péter Garamvölgyi <peter@scroll.io>
Co-authored-by: HAOYUatHZ <37070449+HAOYUatHZ@users.noreply.github.com>
Co-authored-by: HAOYUatHZ <haoyu@protonmail.com>
2023-09-04 04:05:42 +00:00
Zhang Zhuo
c60fa3a643
fix(trace): fix memory trace size (#497)
* core/vm: for tracing, do not report post-op memory

* fmt

* bump version

---------

Co-authored-by: Martin Holst Swende <martin@swende.se>
Co-authored-by: Péter Garamvölgyi <peter@scroll.io>
2023-09-01 17:01:53 +08:00
Zhang Zhuo
d45613f4b5
fix(trace): more consistent invalid opcode trace (#487)
* fix: more consistent invalid opcode trace

* Update version.go

---------

Co-authored-by: HAOYUatHZ <37070449+HAOYUatHZ@users.noreply.github.com>
Co-authored-by: Péter Garamvölgyi <peter@scroll.io>
2023-08-31 15:30:22 +02:00
Zhang Zhuo
ef328dbb6e
fix(modexp): disallow len of 0x8000000000000000000000000000000000000000000… (#496)
* modexp: disallow len of 0x8000000000000000000000000000000000000000000000000000000000000000

* minor

---------

Co-authored-by: HAOYUatHZ <haoyu@protonmail.com>
2023-08-31 10:33:31 +08:00
HAOYUatHZ
ea3a3c9a5d
fix(miner): fix repeatedly processing dropped txs in a new block (#491)
* squash

* improve comments

* Remove tx (#493)

* force drop

* minor

* store skipped L2 tx for `circuitcapacitychecker.ErrUnknown`

* Update miner/worker.go

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

* add lock

* use mu

---------

Co-authored-by: Péter Garamvölgyi <peter@scroll.io>
2023-08-30 14:38:04 +08:00
HAOYUatHZ
d650299a36
feat(miner): consider l1msg in txCount (#486)
* feat(miner): consider l1msg in txCount

* refactor

* tweak

* fix comments

* fix unit test

* set chainConfig.Scroll.MaxTxPerBlock in l1 message test

* add a skipped tx in TestAcceptableTxlimit

* add l1 skipped msg in test

* fix unit test

* fix unit test

* Update miner/worker.go

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

* revert some test changes

* tweak

* bump version

---------

Co-authored-by: colinlyguo <colinlyguo@scroll.io>
Co-authored-by: colin <102356659+colinlyguo@users.noreply.github.com>
Co-authored-by: Péter Garamvölgyi <peter@scroll.io>
2023-08-27 00:08:04 +08:00
Péter Garamvölgyi
7de261b1be
feat: store skipped transactions in local db (#467)
* feat: store skipped txs in local db

* bump version

* bump version

* fix test

* include L2 txs in skipped index

* goimports

* rename more

* bump version

* fix missed renames

* fix the bug when calculating l2TxCount. (#479)

* fix bug when calculate l2 tx count

* Update version

* fix: exclude L1 message from block payload size validation (#476)

* fix: exclude L1 message from block payload size validation

* fix the bug when calculating l2TxCount. (#479)

* fix bug when calculate l2 tx count

* Update version

* bump version

---------

Co-authored-by: maskpp <maskpp266@gmail.com>

* fix: update row estimation with scroll-prover `v0.7.2` (#475)

* Fix row estimation.

* Update libzkp.

* more

* prepare

* finish

* upgrade

* bump version

* fix tests

* Update to scroll-prover `v0.7.2`.

* fix tests

* Update miner/worker.go

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

* Update miner/worker.go

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

* Reset ccc when skips first tx.

* do not unnecessarily skip L1 message

* fix ccc reset and improve code readability

* seal block on circuitcapacitychecker.ErrUnknown

---------

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

* refactor: simplify ccc revert to snapshot (#480)

* simplify ccc revert to snapshot

* Update version.go

---------

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

* feat: use --gcmode=archive and --cache.noprefetch=true by default (#482)

* feat: use --gcmode=archive and --cache.noprefetch=true by default

* refuse to start with invalid config

* lint

* lint

* feat(sdk): support compressed response (#469)

* enable use compression algorithm

* fix ci

* Just enable decode compressed content at ethclient

* fix comments

---------

Co-authored-by: Haichen Shen <shenhaichen@gmail.com>

* fix: disable pruning and prefetch if not flags are provided (#483)

Co-authored-by: colin <102356659+colinlyguo@users.noreply.github.com>

* fix: update libzkp to use scroll-prover `v0.7.5` (#484)

* Update libzkp to use scroll-prover `v0.7.5`.

* Update version.

* address comments

* bump version

* nit

---------

Co-authored-by: maskpp <maskpp266@gmail.com>
Co-authored-by: Steven <asongala@163.com>
Co-authored-by: HAOYUatHZ <haoyu@protonmail.com>
Co-authored-by: iczc <iczcalan@gmail.com>
Co-authored-by: HAOYUatHZ <37070449+HAOYUatHZ@users.noreply.github.com>
Co-authored-by: Haichen Shen <shenhaichen@gmail.com>
Co-authored-by: colin <102356659+colinlyguo@users.noreply.github.com>
2023-08-25 15:41:05 +02:00
Péter Garamvölgyi
727f88bc5f
fix: exclude L1 message from block payload size validation (#476)
* fix: exclude L1 message from block payload size validation

* fix the bug when calculating l2TxCount. (#479)

* fix bug when calculate l2 tx count

* Update version

* bump version

---------

Co-authored-by: maskpp <maskpp266@gmail.com>
2023-08-23 14:06:06 +02:00
Ho
be1600f078
refactor(trace): wrap the core routine in CreateTraceEnv (#460) 2023-08-20 18:39:20 +08:00
Haichen Shen
e8d9d60cf0
fix: use FeeVault address in the EVM BlockContext (#473)
* fix: use Feevault address in the EVM BlockContext

* bump version

* revert format change

* fix
2023-08-19 14:01:14 +02:00
Péter Garamvölgyi
3027111956
refactor: add more context to tracing failure (#466) 2023-08-17 07:25:03 +02:00
maskpp
6195e2e77d
fix(trace): fix contract call's ByteCode (#465)
* fix bug

* update version
2023-08-14 18:09:39 +08:00
Péter Garamvölgyi
25fe3ba69a
feat: add startL1QueueIndex field to traces (#463)
* feat: include startL1QueueIndex in traces

* fix

* update example
2023-08-12 11:07:36 +08:00
Péter Garamvölgyi
eda99eec35
fix: skip L1 message that leads to gas limit exceeded (#455)
* skip L1 message that leads to gas limit exceeded

* add test

* do not skip l1 messages from the same account
2023-08-08 01:59:11 +02:00
HAOYUatHZ
b428fa1339
fix(trace): fix commit state when tracing (#451)
* fix(trace): fix commit state when tracing

* bump version
2023-08-07 14:15:21 +08:00