Commit graph

13401 commits

Author SHA1 Message Date
colin
60bbfc1c2c
fix(ci): make geth (#801)
* fix(ci): make geth

* fix typo

* revert CI changes

* fix
2024-06-05 19:41:52 +08: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
colin
7c74239e49
fix: mockccc geth Dockerfile (#797)
add back compile
2024-06-05 13:47:32 +08:00
Jonas Theis
b9d3c72e0d
feat: congestion-aware gas price oracle (#790)
* Implement functionality to reset gas price / suggested tip to minimal value when there's no congestion

* Add flags to configure congestion value and initialize gas price oracle accordingly

* Fix and add tests to make sure GPO works as expected depending on pre- or post-Curie (EIP 1559) upgrade

* Apply review suggestions

* chore: auto version bump [bot]

---------

Co-authored-by: omerfirmak <omerfirmak@users.noreply.github.com>
2024-06-04 17:05:58 +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
36d7325ea1
fix: make commit retry logic selective (#788) 2024-05-31 12:05:36 +03:00
colin
ca1db84d75
build: fix Dockerfile of mockccc geth (#787)
ci: fix Dockerfile of mockccc geth
2024-05-30 14:50:38 +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
ab349d6443
ci: fix make geth (#786)
* fix CI

* trigger CI

* add sudo

* use absolute path

* remove libzktrie

* revert CI change
2024-05-30 14:45:13 +08: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
semgrep.dev on behalf of @spilehchiha
34162effbc Add Semgrep CI 2024-05-28 20:46:11 +00:00
semgrep.dev on behalf of @spilehchiha
d81a5387b4 Add Semgrep CI 2024-05-28 19:08:07 +00:00
semgrep.dev on behalf of @spilehchiha
4f9d34b3a4 Add Semgrep CI 2024-05-28 18:57:42 +00:00
HAOYUatHZ
760f234a1a
trie: fix two issues in trie iterator (#24539) (#778)
* trie: fix two issues in trie iterator (#24539)

* trie: fix memory leak in trie iterator

In the trie iterator, live nodes are tracked in a stack while iterating.
Popped node states should be explictly set to nil in order to get
garbage-collected.

* trie: fix empty trie iterator

* fix lint

* chore: auto version bump [bot]

---------

Co-authored-by: rjl493456442 <garyrong0905@gmail.com>
Co-authored-by: HAOYUatHZ <HAOYUatHZ@users.noreply.github.com>
2024-05-28 22:07:38 +08: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
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
dd7f747754
feature: keep track of and export total time observed by a timer (#772) 2024-05-27 09:46:09 +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
colin
e5b4f3ee9d
docs(zktrie): remove an outdated comment (#765)
fix(zktrie): remove an outdated comment

Co-authored-by: Péter Garamvölgyi <peter@scroll.io>
2024-05-23 15:59:35 +02:00
Ömer Faruk Irmak
fe55edda0f
consensus/clique: fix race condition (#24957) (#766) 2024-05-23 10:26:11 +03: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
6038ac8753
fix(zktrie): copy trie properly for concurrent access (#747) 2024-05-13 15:57:14 +03: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
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
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
Ömer Faruk Irmak
da3be71ba8
metrics: NilTimer should still run the function to be timed (#739) 2024-05-03 16:14:37 +03:00
Péter Garamvölgyi
c3b7678ccc
fix: temporarily disable string encoding for new opcodes (#737)
feat: temporarily disable string encoding for new opcodes
2024-05-02 17:46:11 +08:00
Ömer Faruk Irmak
733dd01a9a
feat(zktrie): bump to v0.8.4 (#734)
* feat(zktrie): bump to v0.8.4

fixes a deadlock in block tracing

* chore: auto version bump [bot]

---------

Co-authored-by: omerfirmak <omerfirmak@users.noreply.github.com>
2024-04-29 19:14:37 +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
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
colin
a860446eba
fix(api-backend): disable finalized tag when rollup verify is disabled (#722) 2024-04-26 12:11:01 +08:00
Nazarii Denha
005db0370e
(feat)core/vm: Add Upgrade #4 fork configuration (#698)
* Add Upgrade #4 fork configuration

* bump version

* chore: auto version bump [bot]

* trigger ci

---------

Co-authored-by: Péter Garamvölgyi <peter@scroll.io>
Co-authored-by: Thegaram <Thegaram@users.noreply.github.com>
2024-04-24 18:01:47 +08:00
Nazarii Denha
ecca1069d3
(feat) core/vm: implement EIP-5656, mcopy opcode (#697)
* core/vm: implement EIP-5656, mcopy instruction (#26181)

Implements [EIP 5656](https://eips.ethereum.org/EIPS/eip-5656), MCOPY instruction, and enables it for Cancun.

---------

Co-authored-by: Martin Holst Swende <martin@swende.se>

* update version

* goimports

---------

Co-authored-by: Charles Cooper <cooper.charles.m@gmail.com>
Co-authored-by: Martin Holst Swende <martin@swende.se>
Co-authored-by: Péter Garamvölgyi <peter@scroll.io>
Co-authored-by: HAOYUatHZ <37070449+HAOYUatHZ@users.noreply.github.com>
2024-04-24 17:41:50 +08:00
sbaizet
6220695d8d
ci - remove arm64 from supported platform (#719)
remove arm64 from supported platform
2024-04-24 11:12:16 +02:00
Ömer Faruk Irmak
629f14ea88
perf(poseidon): eliminate heap allocations in poseidon (#712) 2024-04-24 11:12:27 +03:00
Ömer Faruk Irmak
79c356002c
feat(zktrie): upgrade to 0.8.2 (#715)
* feat(zktrie): upgrade to v0.8.2

* chore: auto version bump [bot]

* chore: auto version bump [bot]

---------

Co-authored-by: omerfirmak <omerfirmak@users.noreply.github.com>
Co-authored-by: HAOYUatHZ <37070449+HAOYUatHZ@users.noreply.github.com>
Co-authored-by: HAOYUatHZ <HAOYUatHZ@users.noreply.github.com>
2024-04-24 11:31:56 +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
Péter Garamvölgyi
246955a4df
feat: enable Bernoulli upgrade on Scroll mainnet (#710)
* feat: enable Bernoulli upgrade on Scroll mainnet

* Update config.go
2024-04-22 12:53:11 +08:00