Commit graph

89 commits

Author SHA1 Message Date
Péter Garamvölgyi
0b6cdbdbe2
Revert "feat: introduce encode stage (#814)"
This reverts commit 84cf1b58ae.
2024-06-12 11:26:41 +02:00
Ömer Faruk Irmak
84cf1b58ae
feat: introduce encode stage (#814) 2024-06-12 11:11:48 +03:00
Zhang Zhuo
16cbc9a754
Chore: upgrade libzkp v0.10.6 (#816)
* chore(libzkp): upgrade to v0.10.6, reject txs with new opcodes

* chore: auto version bump [bot]

---------

Co-authored-by: Thegaram <Thegaram@users.noreply.github.com>
2024-06-11 12:49:41 +02:00
Ömer Faruk Irmak
8bd2a16eb6
refactor(ccc): allow go side to construct a rust trace from json (#807) 2024-06-07 15:43:07 +03: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
colin
e162fbb7c0
feat: turn libscroll_zstd dynamic lib into static (#794)
* feat: remove .so file dependency of libscroll_zstd

* bump version

* remove wget installment

* simplify dockerfile and add envs

* revert alpine changes

* fix

* fix CI

* update dependency

* chore: auto version bump [bot]

---------

Co-authored-by: colinlyguo <colinlyguo@users.noreply.github.com>
2024-06-05 17:22:37 +08:00
Péter Garamvölgyi
9ec83a509a
fix: use correct encoding for L1 data fee of EIP2718 transactions (#793)
* fix: use correct encoding for L1 data fee of EIP2718 transactions

* add tests

* lint

* Update rollup/fees/rollup_fee.go

Co-authored-by: Ömer Faruk Irmak <omerfirmak@gmail.com>

---------

Co-authored-by: Ömer Faruk Irmak <omerfirmak@gmail.com>
2024-06-03 16:24:03 +02:00
Péter Garamvölgyi
8c7491ae1e
feat: update gas-oracle contract bytecode (#792)
* feat: update gas-oracle contract bytecode

* remove leading 0x
2024-06-03 10:30:59 +02:00
Ömer Faruk Irmak
a43879b738
feat: allow non-ccc pipelines (#781) 2024-05-30 14:59:37 +03:00
colin
aae829c406
feat(ccc): revert libzkp version back to v0.10.5 (#785)
* Revert "upgrade libzkp to v0.11.0rc2 (#773)"

This reverts commit 522882c4cdc8c90484ce40d4f62ab6d1ab73bbf5.

* chore: auto version bump [bot]

* chore: auto version bump [bot]

* add zktrie back in make geth

* trigger CI

* Revert "trigger CI"

This reverts commit 9f329eed0ad5368fb258043420426330ab9914cc.

---------

Co-authored-by: HAOYUatHZ <HAOYUatHZ@users.noreply.github.com>
Co-authored-by: colinlyguo <colinlyguo@users.noreply.github.com>
2024-05-30 15:02:40 +08:00
Ömer Faruk Irmak
094a67a179
fix: use a named deadline timer in CCC stage (#782) 2024-05-30 09:46:05 +03:00
colin
b091e4f9c9
feat(rollup-sync-service): support codecv2 (#726)
* feat(codecv1): support zstd compression

* revert .gitignore changes

* change dependency

* add zstd compression

* bump golang version to 1.21.x

* use codecv2

* remove an invalid command

* tweak

* tweak

* remove libzstd, use .so files in da-codec release instead

* fix CI

* fix CI

* try fix CI

* fix CI

* tweak

* fix

* fix CI

* tweak

* tweak

* address comments

* tweak

* remove cp to /usr/local/lib

* fix CI

* remove cp to /usr/local/lib in CI

* try fix

* fix

* fix

* fix

* remove env GO111MODULE=on

* add .so files to Dockerfiles

* revert make geth changes

* fix Dockerfile changes

* tweak

* revert changes

* tweak

* trigger ci

* update Dockerfiles

* fix

* add codecv2 in decode block ranges from encoded chunks

* address comment

* nit

* update dependencies

* use /scroll/lib/ in testing

* trigger ci

* add unit tests

* chore: auto version bump [bot]

* remove zkp-builder in Dockerfile.mockccc

* fix Dockerfile

* Update Makefile

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

* use -Wl,-rpath,/scroll/lib/

* change some static values to env var

* update dependency

* change pwd to scroll_lib_path

* fix

* add sudo in mkdir

* add sudo

* update da-codec dependency

* chore: auto version bump [bot]

* chore: auto version bump [bot]

* chore: auto version bump [bot]

* update zstd dependency

* update libscroll_zstd.so and remove libzktrie.so related to zstd

* chore: auto version bump [bot]

* uncomment ./rollup tests

* fix CI

* fix CI

* upgrade libzkp to v0.11.0rc2 (#773)

* upgrade libzkp

* remove zktrie.so

* done

* fix build

---------

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

---------

Co-authored-by: colinlyguo <colinlyguo@users.noreply.github.com>
Co-authored-by: Péter Garamvölgyi <peter@scroll.io>
Co-authored-by: Zhang Zhuo <mycinbrin@gmail.com>
2024-05-30 11:03:31 +08: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
9f961ddc71
feat: reduce the number of samples in lifetimeTimer (#777) 2024-05-28 13:57:18 +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
c7990a3eb1
feat(worker): pipeline block building (#735) 2024-05-21 16:11:06 +03:00
Zhang Zhuo
abca104d18
chore(libzkp): upgrade to v0.10.5, speed up by avoiding some unnecessary code hashing (#746)
* chore(libzkp): upgrade to v0.10.5, speedup by avoid some code hashing

* chore: auto version bump [bot]

---------

Co-authored-by: Thegaram <Thegaram@users.noreply.github.com>
2024-05-11 16:52:34 +03:00
Ömer Faruk Irmak
5d0d197ce4
feat(ccc): reuse a buffer for json encoding (#744) 2024-05-10 14:47:37 +03:00
Zhang Zhuo
070ec68aa5
chore(libzkp): upgrade to v0.10.4 (#743)
* chore(libzkp): upgrade to v0.10.4

* chore: auto version bump [bot]

---------

Co-authored-by: Thegaram <Thegaram@users.noreply.github.com>
2024-05-08 10:31:40 +08:00
colin
6d80f2898b
feat(libzkp): ccc v0.10.2 (enable sha256, remove StructLog.stack) (#691)
* upgrade zkevm version

* change Cargo.lock

* try fix

* update Cargo.lock

* fix

* upgrade rust-toolchain version

* update rust-toolchain

* fix build

* upgrade zkp

* fix ccc

* chore: auto version bump [bot]

* chore(libzkp): upgrade to v0.10.1

* clean poseidon-circuit deps

* chore: auto version bump [bot]

* chore: auto version bump [bot]

* fix patch version

* disable stack

* upgrade libzkp

* fix(rollup-verifier): update codecv1

* fix genesis batch codec check

* bump version

* use temporary version tag

---------

Co-authored-by: Zhuo Zhang <mycinbrin@gmail.com>
Co-authored-by: colinlyguo <colinlyguo@users.noreply.github.com>
Co-authored-by: lispc <lispc@users.noreply.github.com>
Co-authored-by: HAOYUatHZ <haoyu@protonmail.com>
Co-authored-by: Péter Garamvölgyi <peter@scroll.io>
2024-04-29 13:30:02 +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
z2trillion
90221d6fc7
chore(dep): upgrade go kzg 4844 (#718)
* crypto/kz4844: pass blobs by ref (#29050)

This change makes use of the following underlying changes to the kzg-libraries in order to avoid passing large things on the stack:

- c-kzg: https://github.com/ethereum/c-kzg-4844/pull/393 and
- go-kzg: https://github.com/crate-crypto/go-kzg-4844/pull/63

* update version patch

* run go mod tidy

* use blob reference

---------

Co-authored-by: Martin HS <martin@swende.se>
Co-authored-by: Mason Liang <mason@scroll.io>
2024-04-24 09:38:18 +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
colin
5115f1342d
fix(rollup-verifier): hardcode genesis codec version as codecv0 and sync codecv1 implementation (#699)
* fix(rollup-verifier): update codecv1

* fix genesis batch codec check

* bump version
2024-04-16 14:22:05 +08:00
Zhang Zhuo
d0ff83941c
chore(libzkp): upgrade to v0.9.13, support next hard fork transition (#693)
* chore(libzkp): upgrade to v0.9.13, support next hard fork

* bump version

* chore: auto version bump [bot]

* undo bump version

---------

Co-authored-by: Péter Garamvölgyi <peter@scroll.io>
Co-authored-by: HAOYUatHZ <HAOYUatHZ@users.noreply.github.com>
2024-04-08 11:09:15 +08:00
colin
55b03ff405
feat(rollup-verifier): support codecv1 (#678) 2024-04-04 18:52:23 +08:00
HAOYUatHZ
054bbd29f0
fix(tracing): disable storage for block_traces (#684)
* fix: disable storage for block_traces

* bump version
2024-03-28 08:00:02 +00:00
colin
61e8de9c3f
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

* bump version

---------

Co-authored-by: Péter Garamvölgyi <peter@scroll.io>
2024-03-27 08:53:02 +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
Zhang Zhuo
e9246f1cc2
chore(libzkp): upgrade to v0.9.10, optimize ccc for follower&chunking (#676)
* chore(libzkp): upgrade to v0.9.10, optimize ccc for follower&chunking

* bump version

---------

Co-authored-by: Péter Garamvölgyi <peter@scroll.io>
2024-03-22 09:56:37 +01: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
483949b87e
fix(rollup sync service): remove syscall.Kill (#636)
* fix(rollup sync service): remove syscall.Kill

* bump version
2024-02-21 16:57:09 +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
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
HAOYUatHZ
833f9041bb
feat: improve balance check (#607)
* feat: improve balance check

* clean up
2023-12-26 00:09:41 +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
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
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
Steven
adde9ce118
fix (libzkp): free Rust CString by from_raw (potential memory leak) (#539)
* Free Rust CString by `from_raw`.

* Update params version.
2023-10-25 15:04:13 +08:00
Steven
9a0a87f4ca
fix(libzkp): upgrade to use prover v0.9.7 (#535)
* Upgrade to use prover `v0.9.7`.

* Update version.
2023-10-13 08:45:26 +02:00
Steven
d4301334b8
fix(libzkp): upgrade libzkp to v0.9.5 (#531)
* Upgrade libzkp to `v0.9.5`.

* bump version

---------

Co-authored-by: Péter Garamvölgyi <peter@scroll.io>
2023-10-04 16:49:19 +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
abcf48f20c
fix(ccc): revert light mode (#524)
* Revert "feat: use light_mode = false for block ccc (#519)"

This reverts commit a51434da5a.

* bump version
2023-09-27 16:03:37 +02:00
Zhang Zhuo
a51434da5a
feat: use light_mode = false for block ccc (#519) 2023-09-27 07:30:44 +01:00
Steven
fa0be69a3f
fix(libzkp): upgrade libzkp to v0.9.2 (fix ccc panic CodeNotFound) (#520)
Upgrade libzkp to `v0.9.2` (fix ccc bug).
2023-09-19 10:41:51 +08:00
Steven
5b787be12c
fix(libzkp): upgrade to use prover v0.9.1 (#517)
Upgrade libzkp to use prover `v0.9.1`.
2023-09-17 08:30:23 +08:00
Steven
2b22bf9138
fix(libzkp): upgrade to use prover v0.9.0 (#513) 2023-09-14 19:28:24 +08:00
Péter Garamvölgyi
1d824f42bd
fix(ccc): fix CCC build errors (#506) 2023-09-08 22:18:21 +08:00