Commit graph

502 commits

Author SHA1 Message Date
Ömer Faruk Irmak
bdb1ffb97a
feat: add miner idle metric (#1023) 2024-09-05 17:50:04 +03:00
Ömer Faruk Irmak
e0203bf9b7
feat: double check ancestor RowConsumption before committing (#1022) 2024-09-05 16:54:12 +03:00
Ömer Faruk Irmak
0573f6e440
fix: disable headCCCCheck for follower nodes (#1021) 2024-09-05 13:38:45 +03:00
Ömer Faruk Irmak
e9259b783f
feat: implement and integrate counter-based CCC (#982)
Co-authored-by: colin <102356659+colinlyguo@users.noreply.github.com>
Co-authored-by: Zhang Zhuo <mycinbrin@gmail.com>
Co-authored-by: Xi Lin <zimpha@gmail.com>
2024-09-04 13:33:51 +03:00
colin
c252ee1ee0
feat(tx-pool): fast reject known skipped txs (#1004)
* feat(tx-pool): fast reject known skipped txs (#1001)

* feat(tx-pool): fast reject known skipped txs

* fix make lint

* add miner flag to tx pool

* bump version
2024-08-26 22:48:44 +08:00
Ömer Faruk Irmak
4464f48a5d
refactor: remove unused unconfirmed.go (#972) 2024-08-12 13:08:42 +03:00
Ömer Faruk Irmak
2411ae063e
refactor: rename CCC package for less repetition (#967) 2024-08-09 08:21:14 +03:00
Ömer Faruk Irmak
9abdd5b9aa
feat: defer txpool reorg until worker fetches txns for the next block (#905) 2024-07-26 10:25:58 +03:00
HAOYUatHZ
9ee6976fe5
fix(miner,rpc): fix updateSnapshot (#916)
* fix `updateSnapshot`

* fix

* chore: auto version bump [bot]

---------

Co-authored-by: HAOYUatHZ <HAOYUatHZ@users.noreply.github.com>
2024-07-23 22:22:51 +08:00
Ömer Faruk Irmak
c3371e2b07
fix: return early as expected when engine.Prepare fails (#886) 2024-07-11 11:51:02 +03:00
Péter Garamvölgyi
c00352023b
fix: update l1 db entry for curie transition block (#835) 2024-06-20 15:00:07 +03:00
Ömer Faruk Irmak
94c6fc097a
refactor: cleanup scroll_worker.go (#823) 2024-06-14 15:02:21 +03:00
Ömer Faruk Irmak
dc57ae2468
fix: account for the artificially added delay in commit stage (#806)
* fix: account for the artificially added delay in commit stage

* linter

* chore: auto version bump [bot]

---------

Co-authored-by: omerfirmak <omerfirmak@users.noreply.github.com>
2024-06-07 09:39:05 +02:00
Ömer Faruk Irmak
d0860229c2
fix: avoid accidentally sharing a tracer between goroutines (#768)
Avoid accidentally sharing a tracer between goroutines

Co-authored-by: Péter Garamvölgyi <peter@scroll.io>
2024-06-05 17:55:05 +03:00
Ömer Faruk Irmak
36d7325ea1
fix: make commit retry logic selective (#788) 2024-05-31 12:05:36 +03:00
Ömer Faruk Irmak
a43879b738
feat: allow non-ccc pipelines (#781) 2024-05-30 14:59:37 +03:00
Ömer Faruk Irmak
e6cc960f2f
fix: properly release pipeline stages (#783) 2024-05-29 23:46:03 +03:00
Péter Garamvölgyi
bfe803001b
feat: update L1 data fee in Curie hard fork (#755)
* update fee calculation

* add missing GPO slots to trace

* add placeholder for contract update logic

* nit

* update fee calculation

* update formula

* update GPO slots

* update L1GPO bytecode

* apply Curie in new worker

* move bytecode to config

* create an empty block for curie hard fork

* initialize L1GasPriceOracle storage slots

* add comments

* add test

* add IsCurie to traces and tests

* group GPO storage slots into a struct

* update unit test

* chore: auto version bump [bot]

* trigger ci

* update bytecode

* remove leading 0x

* update comments

* include rollup fee tests in CI

---------

Co-authored-by: Ömer Faruk Irmak <omerfirmak@gmail.com>
Co-authored-by: Thegaram <Thegaram@users.noreply.github.com>
2024-05-28 14:12:39 +02:00
Ömer Faruk Irmak
89ff451c77
fix: make sure building of pending blocks don't have any lasting sideaffects (#779) 2024-05-28 12:54:36 +03:00
Ömer Faruk Irmak
b9919a572a
fix: make consensus engine wait for a bit before giving up on worker (#774)
and if it happens despite the wait, let worker retry
2024-05-27 19:44:40 +03:00
Ömer Faruk Irmak
9b4a779104
feat: sanity check locally built blocks via local consensus engine (#767)
and make the entire commit flow synchronous
2024-05-24 10:12:37 +03:00
Ömer Faruk Irmak
51bb998ded
fix: prioritized tx not being cleared after skipping it (#764)
* fix: prioritized tx not being cleared after skipping it

* fix nonce in comment

* chore: auto version bump [bot]

* chore: auto version bump [bot]

---------

Co-authored-by: omerfirmak <omerfirmak@users.noreply.github.com>
Co-authored-by: Péter Garamvölgyi <peter@scroll.io>
Co-authored-by: Thegaram <Thegaram@users.noreply.github.com>
2024-05-24 14:49:57 +08:00
Ömer Faruk Irmak
dd96ceced8
feat: implement relaxed period in clique (#763)
* feat: implement relaxed period in clique

and enable it on Sepolia

* simplify if check

* chore: auto version bump [bot]

* Update clique.go

---------

Co-authored-by: omerfirmak <omerfirmak@users.noreply.github.com>
2024-05-22 11:34:43 +02:00
Ömer Faruk Irmak
c7990a3eb1
feat(worker): pipeline block building (#735) 2024-05-21 16:11:06 +03:00
Péter Garamvölgyi
caec0c34fa
fix(worker): set default account fetch limit (#756) 2024-05-17 19:17:43 +02:00
Ömer Faruk Irmak
12871c7745
feat(worker): try to limit the number of txns miner has to deal with (#745)
to reduce the effect of having a huge backlog on performance
2024-05-13 09:20:55 +03:00
Péter Garamvölgyi
037781a187
feat(worker): disable enforceTips when fetching pending transactions (#740)
* Update worker.go

* chore: auto version bump [bot]

---------

Co-authored-by: Thegaram <Thegaram@users.noreply.github.com>
2024-05-06 10:04:16 +08:00
HAOYUatHZ
c5836a42d3
docs(miner): rename circuitCapacityReached to circuitCapacityOrBlockTimeReached (#724)
* docs(miner): rename `circuitCapacityReached` to `ccOrBtReached`

* minor

* rename `ccOrBtReached` to `circuitCapacityOrBlockTimeReached`
2024-04-28 16:27:52 +08:00
Nazarii Denha
3592139384
(feat)all: add EIP-1153 - transient storage (#721)
* all: implement EIP-1153 transient storage (#26003)

Implements TSTORE and TLOAD as specified by the following EIP:

https://eips.ethereum.org/EIPS/eip-1153
https://ethereum-magicians.org/t/eip-1153-transient-storage-opcodes/553

Co-authored-by: Sara Reynolds <snreynolds2506@gmail.com>
Co-authored-by: Martin Holst Swende <martin@swende.se>
Co-authored-by: Gary Rong <garyrong0905@gmail.com>

* core/vm: move TSTORE,TLOAD to correct opcode nums (#27613)

* core/vm: move TSTORE,TLOAD to correct opcode nums

* core/vm: cleanup

* fix tests, rename

* goimports

* enable 1153 at Curie

* bump version

* comment fix

* improve test

* version

* testchainconfig

* fix another test that affects newly added

* fix previous test to clenaup after

---------

Co-authored-by: Mark Tyneway <mark.tyneway@gmail.com>
Co-authored-by: Sara Reynolds <snreynolds2506@gmail.com>
Co-authored-by: Martin Holst Swende <martin@swende.se>
Co-authored-by: Gary Rong <garyrong0905@gmail.com>
Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>
2024-04-28 15:59:26 +08:00
Péter Garamvölgyi
62926d4649
feat(worker): seal block early if we're over target block time (#706)
* feat(worker): seal block early if we're over target block time

* use current.header.Time

* typo

* break instead of return
2024-04-18 10:44:59 +08:00
colin
d81a3308b1
feat(worker): add a commit tx failed metric (#704)
* feat(worker): add a commit tx failed metric

* bump version

* add number of L1 messages metric
2024-04-17 18:32:00 +08:00
georgehao
678a9fcb69
feat: add more state_transition, worker, and tracing metrics (#700)
* feat: add transactions len metrics of block processer

* feat: (worker): add metrics

* feat: add commitTransaction loops

* feat: add metrics to rollup tracing

* feat: add metrics to getTxResult

* feat: bump version

* add state revert metric timer

* feat: add commitNewWrok metrics

* feat: fix comments

* feat: remove the consume part metrics

* feat: update

* Apply suggestions from code review

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

* feat: update

* feat: address comments

* chore: auto version bump [bot]

* feat: bump version

* add tests

* Revert "add tests"

This reverts commit 175d544a68fc964dcc062b46c1a010ed821a0996.

---------

Co-authored-by: Ömer Faruk Irmak <omerfirmak@gmail.com>
Co-authored-by: colin <102356659+colinlyguo@users.noreply.github.com>
Co-authored-by: georgehao <georgehao@users.noreply.github.com>
Co-authored-by: colinlyguo <colinlyguo@scroll.io>
2024-04-16 16:05:21 +08: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
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
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
HAOYUatHZ
640b39161c
feat: remove instead of pop insufficient-funds tx (#608)
* feat: remove instead of pop insufficient-funds tx

* bump version

* update

* update
2023-12-26 00:47:39 +08:00
HAOYUatHZ
833f9041bb
feat: improve balance check (#607)
* feat: improve balance check

* clean up
2023-12-26 00:09:41 +08:00
Péter Garamvölgyi
3f9b23d33e
fix(worker): prioritize overflow tx as first tx in next block (#563)
* fix(worker): prioritize overflow tx as first tx in next block

* add tests

* bump version
2023-11-14 20:06:16 +01:00
vyzo
65a3a7fc23
Add metrics around block commit, block traces, and CCC (#552)
* Add metrics around block commit, block traces, and CCC

* add timer.Time wrapper

* more traces

* bump version

* bump version

---------

Co-authored-by: Péter Garamvölgyi <peter@scroll.io>
2023-11-09 14:24:00 +01:00
DongXi Huang
a8a9dc83cb
perf(miner): reduce rawdb calls for getting StartL1QueueIndex when inniting environment (#550)
Reduce rawdb calls
2023-11-08 14:40:20 +01: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
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
Péter Garamvölgyi
530830a01c
fix(worker): check gas limit before running ccc (#511)
Co-authored-by: maskpp <maskpp266@gmail.com>
2023-09-13 16:19:14 +02:00
Steven
7d79f27e6f
fix (libzkp): check tx num when CCC ErrUnknown error occurred (#505)
* Check tx num for CCC ErrUnknown error.

* Update worker.go

* Small fix.

* Update

* Fix log.

* Update version.

* Update miner/worker.go

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

* Update according to review.

* Fix to return 0 for uint64.

* Add `tcount` to mock CCC, and function `SetTxNum`.

* refactor

* fix

* add comments

---------

Co-authored-by: Zhang Zhuo <mycinbrin@gmail.com>
Co-authored-by: Péter Garamvölgyi <peter@scroll.io>
Co-authored-by: HAOYUatHZ <haoyu@protonmail.com>
2023-09-08 13:17:02 +02:00
HAOYUatHZ
0b6c3be40d
feat(api/rawdb): allow storing traces for skipped txs (#500) 2023-09-05 11:03:15 +08:00
Xinran
24d856758b
feat(metrics): add skipped txs metrics for miner (#494) 2023-08-31 11:04:25 +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
f883dcdc21
docs(ccc): add more logs for skipping msg (#490)
* docs(ccc): add more logs for skipping msg

* bump version

* format codes

* improve
2023-08-29 08:05:27 +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