Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Implement gas relay mode and inclusion data for data attestation #2987

Closed
wants to merge 268 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
268 commits
Select commit Hold shift + click to select a range
71a1b8e
try 2
StanislavBreadless May 14, 2024
0fcfd43
try 3
StanislavBreadless May 15, 2024
4d8b0dc
some fixes
StanislavBreadless May 15, 2024
6451639
modify more configs
StanislavBreadless May 15, 2024
e8f4560
temporarily skip verification test
StanislavBreadless May 15, 2024
66d262d
ignore back unneeded configs
StanislavBreadless May 15, 2024
8326ffe
sync with main
StanislavBreadless May 15, 2024
2bbc9ca
sync with main
StanislavBreadless May 16, 2024
745f2c3
Merge pull request #1962 from matter-labs/sb-sync-main-with-sync-laye…
StanislavBreadless May 16, 2024
6135017
bump contracts
kelemeno May 20, 2024
b960cef
Merge pull request #1992 from matter-labs/kl/sync-layer-bump-contract…
StanislavBreadless May 21, 2024
2bcb150
sync with main
StanislavBreadless Jun 13, 2024
4c64c82
basic int test pass again
StanislavBreadless Jun 13, 2024
51ee537
upd sync layer stable brnach with main
StanislavBreadless Jun 13, 2024
24d103f
fmt
StanislavBreadless Jun 13, 2024
891bd59
use dev contracts
StanislavBreadless Jun 18, 2024
35092f2
use dev branch
StanislavBreadless Jun 18, 2024
ea5eec5
Merge branch 'main' of github.com:matter-labs/zksync-era into sync-la…
kelemeno Jun 18, 2024
806e102
first working version of rollup da for rust unit tests
StanislavBreadless Jun 18, 2024
4110cb0
a bit more unit tests
StanislavBreadless Jun 18, 2024
dfab13d
easier compatible l1 logs
StanislavBreadless Jun 18, 2024
88601ce
fmt
StanislavBreadless Jun 18, 2024
ce5bc28
feat(contracts!): Kl/sync layer stable1 (#2015)
kelemeno Jun 19, 2024
a82cd6c
full integration
StanislavBreadless Jun 19, 2024
65ce836
fmt
StanislavBreadless Jun 19, 2024
f06ea83
contracts
StanislavBreadless Jun 20, 2024
4a0ec8e
sync with sl stable
StanislavBreadless Jun 20, 2024
7983315
custom DA with SL for first layer
StanislavBreadless Jun 20, 2024
9276bc5
custom da layer with server
StanislavBreadless Jun 21, 2024
811efe6
remove debug info
StanislavBreadless Jun 21, 2024
b1e5e23
make rust unit tests pass
StanislavBreadless Jun 21, 2024
023a2f1
cargo fix1
StanislavBreadless Jun 21, 2024
91a976f
cargo fix2
StanislavBreadless Jun 21, 2024
ce79734
cargo fix
StanislavBreadless Jun 21, 2024
b008063
resolve lint
StanislavBreadless Jun 21, 2024
c645e22
It compiles
ly0va Jun 16, 2024
e514925
latest contracts
StanislavBreadless Jun 24, 2024
e0ad4ca
upd configs
StanislavBreadless Jun 24, 2024
a1f1a69
Update contracts (#2288)
StanislavBreadless Jun 24, 2024
10c4f7f
upd contracts
StanislavBreadless Jun 24, 2024
61f4a7f
upd contracts
StanislavBreadless Jun 24, 2024
87dad50
return from accidental change
StanislavBreadless Jun 24, 2024
a45cfd3
sync with base
StanislavBreadless Jun 24, 2024
8badad6
upd contracts
StanislavBreadless Jun 24, 2024
8b8d427
Merge pull request #2295 from matter-labs/sb-custom-da-with-sl
StanislavBreadless Jun 25, 2024
267f742
wip contracts
StanislavBreadless Jun 25, 2024
6deefc0
upd contracts
StanislavBreadless Jun 25, 2024
75dfe4a
basic integration
StanislavBreadless Jun 25, 2024
09c0391
make withdrawals on top of one chain pass
StanislavBreadless Jun 25, 2024
e252bdc
some basic api for proofs of batch inclusion
StanislavBreadless Jun 26, 2024
3b4c0aa
Add priorityTree layer
ly0va Jun 26, 2024
13d1321
Bump contracts
ly0va Jun 26, 2024
c28acb4
agg root in db
StanislavBreadless Jun 26, 2024
16ef371
Add the forgotten file
ly0va Jun 26, 2024
f4ab30f
Merge branch 'sync-layer-stable' into lyova-integrate-priority-merkle…
ly0va Jun 26, 2024
06c118e
withdrawals work for 1 layer and agg proof is corect
StanislavBreadless Jun 26, 2024
ba6a188
Bump contracts
ly0va Jun 26, 2024
ecc0d2a
zk fmt
ly0va Jun 26, 2024
066232f
feat: more system contracts support, WIP (#2273)
kelemeno Jun 26, 2024
29a49e8
comms work
StanislavBreadless Jun 27, 2024
b416ea8
Fix caching bug
ly0va Jun 27, 2024
a0eebb1
Tests and fixes
ly0va Jun 27, 2024
52c99cd
new contracts
StanislavBreadless Jun 27, 2024
67a40b3
sync with base
StanislavBreadless Jun 27, 2024
a6a8c0f
int tests with withdrawals work
StanislavBreadless Jun 27, 2024
2b928a0
feat: blobhash-compilation-fix-support (#2336)
kelemeno Jun 27, 2024
c61ac5d
partially resolve unit tests
StanislavBreadless Jun 27, 2024
26b86b2
upd env
StanislavBreadless Jun 27, 2024
e820f90
feat: bump contracts (#2342)
kelemeno Jun 27, 2024
25bcfdf
Fix PQ->PT switch
ly0va Jun 27, 2024
7e192d8
Bump contracts
ly0va Jun 27, 2024
9fa2799
Merge remote-tracking branch 'origin/sync-layer-stable' into lyova-in…
ly0va Jun 27, 2024
bdcf4a5
Fix sqlx data
ly0va Jun 28, 2024
516477c
Fix config
ly0va Jun 28, 2024
bfde615
Temporarily do deposits sequentially
ly0va Jun 28, 2024
96a3fe2
Merge branch 'sync-layer-stable' of github.com:matter-labs/zksync-era…
kelemeno Jun 28, 2024
a8b2040
bump contracts. small config fix
kelemeno Jun 28, 2024
8e48e29
contracts.toml
kelemeno Jun 28, 2024
0a29c9b
Bump contracts
ly0va Jun 29, 2024
01feafb
Fix lint
ly0va Jun 29, 2024
a79c2a4
Update config
ly0va Jun 29, 2024
fc1ff7f
Merge pull request #2335 from matter-labs/lyova-integrate-priority-me…
ly0va Jun 29, 2024
07f9918
Point contracts to sync-layer-stable
ly0va Jun 29, 2024
cc0ea83
feat(pubdata): send call encoded pubdata (#2360)
koloz193 Jul 2, 2024
e1e8ffb
Merge remote-tracking branch 'origin/main' into sync-layer-stable
ly0va Jul 7, 2024
e9a7e3d
zk fmt
ly0va Jul 8, 2024
6d411bd
Merge remote-tracking branch 'origin/sync-layer-stable' into lyova-me…
ly0va Jul 8, 2024
1e698d2
Fix Cargo.lock
ly0va Jul 8, 2024
af08291
Fix workflow file
ly0va Jul 8, 2024
35c45a8
Bump contracts
ly0va Jul 8, 2024
a437013
Fix deprecated warning
ly0va Jul 8, 2024
846e0a8
Config fixes
ly0va Jul 8, 2024
fb06a06
Merge branch 'sync-layer-stable' into sb-l3-l1-comms-integration
koloz193 Jul 8, 2024
662012f
add message root init to tests
koloz193 Jul 8, 2024
e75fe6e
bump sleep term
koloz193 Jul 10, 2024
3b3c444
fix execute batch txns not being generated
koloz193 Jul 11, 2024
13e8766
toml update
koloz193 Jul 11, 2024
adb20f4
update contracts
koloz193 Jul 11, 2024
c68df66
bump contracts
koloz193 Jul 11, 2024
3a6a3e9
bump sleep before finalize
koloz193 Jul 12, 2024
ec8c895
increase timeout
koloz193 Jul 12, 2024
436b176
revert changes to tests
koloz193 Jul 12, 2024
237f346
change waitFinalize for waitUntilBlockFinalized
koloz193 Jul 12, 2024
03a598b
bump balances
koloz193 Jul 12, 2024
06692d5
Revert "bump balances"
koloz193 Jul 12, 2024
77a76ec
skip tests
koloz193 Jul 12, 2024
a43890b
lint fix + remove describe only
StanislavBreadless Jul 22, 2024
e92cfaf
cargo deny fix
StanislavBreadless Jul 22, 2024
c501bfb
try increase the timeout
StanislavBreadless Jul 22, 2024
fd5fbf5
increase timeout for erc20
StanislavBreadless Jul 22, 2024
893ea83
make timeout even higher
StanislavBreadless Jul 22, 2024
b2f9f59
larger capacity for base docker pubdata
StanislavBreadless Jul 22, 2024
ad53507
remove fixme comments
StanislavBreadless Jul 22, 2024
3d45145
Merge pull request #2339 from matter-labs/sb-l3-l1-comms-integration
StanislavBreadless Jul 22, 2024
499fde7
Fix some todos
ly0va Jul 22, 2024
9c21571
Merge remote-tracking branch 'origin/sync-layer-stable' into lyova-me…
ly0va Jul 22, 2024
c9336a0
Fix stuff
ly0va Jul 23, 2024
45410cb
basic test fix
StanislavBreadless Jul 25, 2024
8bbc8dc
remove unneeded method
StanislavBreadless Jul 25, 2024
8284e4d
fix server launch
StanislavBreadless Jul 26, 2024
ac2c988
add some comments
StanislavBreadless Jul 26, 2024
2292764
fixme comment
StanislavBreadless Jul 26, 2024
1ae4ca6
Fix prover tests
ly0va Jul 26, 2024
ce1193c
Update lockfile
ly0va Jul 26, 2024
7d307e7
Fix prover tests again
ly0va Jul 26, 2024
07c97ef
Update Cargo.lock
ly0va Jul 26, 2024
58526e3
Update deny.toml
ly0va Jul 26, 2024
52c098e
Fix compilation
ly0va Jul 26, 2024
402f1f8
add tokio runtime
StanislavBreadless Jul 26, 2024
994f6e6
fix how stdout works
StanislavBreadless Jul 28, 2024
a96f7ec
Merge remote-tracking branch 'origin/main' into lyova-merged-sync-lay…
ly0va Jul 29, 2024
dad7496
Resolve post-merge errors
ly0va Jul 29, 2024
21873b3
Fix EN tests
ly0va Jul 29, 2024
ba55906
Bump contracts
ly0va Jul 30, 2024
5f985b2
Update env
ly0va Jul 30, 2024
de1c528
fix init
StanislavBreadless Jul 30, 2024
86b0aaf
fmt
StanislavBreadless Jul 30, 2024
c34ab64
fix more int tests
StanislavBreadless Jul 30, 2024
dd76add
fmt
StanislavBreadless Jul 30, 2024
12ca5e2
fmt
StanislavBreadless Jul 30, 2024
144d247
sync with upstream
StanislavBreadless Jul 30, 2024
49d8889
upd contracts
StanislavBreadless Jul 30, 2024
7633725
int tests passing
StanislavBreadless Jul 30, 2024
cf5174b
turn off unused test
StanislavBreadless Jul 30, 2024
d788056
Merge pull request #2504 from matter-labs/sb-fix-rust-unit-tests
ly0va Jul 30, 2024
80b2974
Fix lints
ly0va Jul 31, 2024
0544b80
Fix Cargo.lock
ly0va Jul 31, 2024
f4ae9dc
Bump contracts
ly0va Jul 31, 2024
6611cb6
Lints
ly0va Jul 31, 2024
1f8d583
Bump contracts
ly0va Jul 31, 2024
4ceed3a
Merge pull request #2395 from matter-labs/lyova-merged-sync-layer-stable
ly0va Jul 31, 2024
6ff1eed
compiles at least partially
StanislavBreadless Aug 6, 2024
f09395f
fix config
StanislavBreadless Aug 6, 2024
bbbfa3a
lint
StanislavBreadless Aug 6, 2024
ab08012
comment out upgrade test also
StanislavBreadless Aug 6, 2024
ab68243
Merge pull request #2597 from matter-labs/sb-merge-main-sync-layer-st…
StanislavBreadless Aug 6, 2024
9cb44cf
resolve env hack
StanislavBreadless Aug 7, 2024
53b0274
small refactor
StanislavBreadless Aug 7, 2024
7aa5fec
fix lint
StanislavBreadless Aug 8, 2024
0a91d44
lint fix
StanislavBreadless Aug 8, 2024
b210b71
Merge pull request #2619 from matter-labs/sb-resolve-env-hack
StanislavBreadless Aug 8, 2024
f21fe46
more substantial sync layer -> gateway rename
StanislavBreadless Aug 14, 2024
79dcf3a
using latest contracts
StanislavBreadless Aug 14, 2024
453e175
use the new contracts
StanislavBreadless Aug 14, 2024
2bd57d5
Merge pull request #2650 from matter-labs/sb-sync-kl-sync-layer-reorg
StanislavBreadless Aug 14, 2024
5c4d1b0
sync with main
StanislavBreadless Aug 15, 2024
720ddc5
rust unit tests pass
StanislavBreadless Aug 15, 2024
e1c690d
complete migration
StanislavBreadless Aug 15, 2024
f80c439
zk
StanislavBreadless Aug 15, 2024
bcc3bac
merge main
StanislavBreadless Aug 15, 2024
a9fce37
sync with main for the second time
StanislavBreadless Aug 15, 2024
b992232
fix lint
StanislavBreadless Aug 15, 2024
0f1985f
Merge pull request #2664 from matter-labs/sb-merge-main-into-sync-lay…
StanislavBreadless Aug 15, 2024
a4ff817
int tests work
StanislavBreadless Aug 17, 2024
2f00ac8
fmt
StanislavBreadless Aug 17, 2024
7a0b777
fix config
StanislavBreadless Aug 17, 2024
fd1b3a0
upd contracts scripts
StanislavBreadless Aug 18, 2024
85a20f6
updated contracts commit
StanislavBreadless Aug 19, 2024
a95ce19
int tests pass
StanislavBreadless Aug 19, 2024
1f12cdb
reduce owner usage in init
StanislavBreadless Aug 19, 2024
cf570aa
fmt
StanislavBreadless Aug 19, 2024
73bea05
use latest sync layer stable
StanislavBreadless Aug 19, 2024
e958393
remove unneeded change
StanislavBreadless Aug 19, 2024
959d54f
surpress error
StanislavBreadless Aug 19, 2024
63760c8
use latest contracts
StanislavBreadless Aug 19, 2024
d6e3f1e
another way to fetch l2 token addr
StanislavBreadless Aug 19, 2024
6f978e1
new contracts
StanislavBreadless Aug 19, 2024
6d62682
latest commit
StanislavBreadless Aug 19, 2024
eee0b54
sync with base
StanislavBreadless Aug 19, 2024
410810d
Merge pull request #2677 from matter-labs/sb-sync-kl-reorg
StanislavBreadless Aug 19, 2024
60912f0
latest contracts
StanislavBreadless Aug 20, 2024
e888af9
use sync layer stable
StanislavBreadless Aug 20, 2024
a4edeca
fix gas limit in sdk
StanislavBreadless Aug 20, 2024
a912128
Merge pull request #2681 from matter-labs/sb-make-owner-init-footprin…
StanislavBreadless Aug 20, 2024
3418a13
fix: script fixes (#2701)
kelemeno Aug 21, 2024
5144f70
merge changes from master
tomg10 Aug 21, 2024
c2512e6
experiment
tomg10 Aug 22, 2024
1a9c23c
scripts
tomg10 Aug 22, 2024
b2237ca
fix setting env
StanislavBreadless Aug 22, 2024
89f6b7a
Merge pull request #2712 from matter-labs/sb-new-env-for-sl-stable
StanislavBreadless Aug 23, 2024
1623b54
Merge remote-tracking branch 'origin/sync-layer-stable' into sync-lay…
ly0va Aug 23, 2024
9ced68f
zk fmt
ly0va Aug 23, 2024
ab2470b
Fix imports
ly0va Aug 23, 2024
e6833bb
Try fix CI
ly0va Aug 23, 2024
39a0c0c
Try fix CI
ly0va Aug 24, 2024
79c3fe3
bugfix
tomg10 Aug 26, 2024
62cccc5
bugfix
tomg10 Aug 26, 2024
6826ca4
remove debug
tomg10 Aug 26, 2024
d024128
bugfix
tomg10 Aug 26, 2024
a24856f
linter fix
tomg10 Aug 26, 2024
fc8f9ac
Merge pull request #2710 from matter-labs/sync-layer-stable-tjg
ly0va Aug 26, 2024
650a63a
feat(contracts: integrate protocol defense changes
koloz193 Aug 26, 2024
dd6a4a0
Merge branch 'main' into zk-protocol-defense
koloz193 Aug 26, 2024
1375774
chore: Port kl sync layer reorg to the stable branch (#2747)
StanislavBreadless Aug 27, 2024
d3877f6
update protocol version and multivm bootloaders
koloz193 Aug 27, 2024
4b36af8
Merge branch 'main' into zk-protocol-defense
koloz193 Aug 27, 2024
ca1a396
bump contracts
koloz193 Aug 27, 2024
2f6d9bc
bump contracts
koloz193 Aug 27, 2024
cedfb16
Merge branch 'main' into zk-protocol-defense
koloz193 Aug 27, 2024
91bed09
add submodules ignored folder
StanislavBreadless Aug 28, 2024
4b8a653
Merge branch 'main' into zk-protocol-defense
StanislavBreadless Aug 28, 2024
24ee376
use new contracts
StanislavBreadless Aug 28, 2024
5cd6125
sync with zach branch
StanislavBreadless Aug 28, 2024
bdd468b
unit tests pass
StanislavBreadless Aug 28, 2024
f230a76
upd config
StanislavBreadless Aug 28, 2024
3f6c6e2
lint fix
StanislavBreadless Aug 28, 2024
07fdecc
Merge pull request #2762 from matter-labs/sb-merge-contracts-dev-into…
StanislavBreadless Aug 28, 2024
91f3cdc
chore: message-root-support (#2706)
kelemeno Aug 30, 2024
b908eae
feat(eth-watch): redesign to support Gateway (#2775)
tomg10 Sep 5, 2024
8cfa3f4
feat(contracts): Remove priority op info from gw (#2813)
StanislavBreadless Sep 6, 2024
55276e7
basic sync with main
StanislavBreadless Sep 12, 2024
b824aa9
return commented out tests
StanislavBreadless Sep 12, 2024
a3b64d9
fix lint
StanislavBreadless Sep 12, 2024
a11d3b0
upd contracts
StanislavBreadless Sep 12, 2024
f2d7210
resolve one more conflict
StanislavBreadless Sep 12, 2024
d22f0c3
hopefully fix rust unit test
StanislavBreadless Sep 12, 2024
06445c6
hopefully fix docker init
StanislavBreadless Sep 12, 2024
b199dec
maybe fix unit tests
StanislavBreadless Sep 13, 2024
af7193c
wait a bit longer
StanislavBreadless Sep 13, 2024
e7bc202
sync with main
StanislavBreadless Sep 13, 2024
6bbbce8
fix lock
StanislavBreadless Sep 13, 2024
f142ddc
feat: add da clients (#2743)
dimazhornyk Sep 12, 2024
8358319
turn off loadtest
StanislavBreadless Sep 13, 2024
b519550
fix lock
StanislavBreadless Sep 13, 2024
922dcba
Merge pull request #2858 from matter-labs/sb-sync-main-sl-stable
StanislavBreadless Sep 13, 2024
0c20a03
fix inclusion data
dimazhornyk Sep 13, 2024
22a3eef
feat: Kl split-asset-router-support (#2790)
kelemeno Sep 17, 2024
dec82db
chore: bump contracts (#2902)
kelemeno Sep 17, 2024
329730d
pull sync-layer-stable
dimazhornyk Sep 18, 2024
f0f0c1f
feat: implement gas relay mode
QEDK Sep 24, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
542 changes: 287 additions & 255 deletions .github/workflows/ci-core-reusable.yml

Large diffs are not rendered by default.

524 changes: 262 additions & 262 deletions .github/workflows/ci-zk-toolbox-reusable.yml

Large diffs are not rendered by default.

26 changes: 14 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
branches:
- staging
- trying
- sync-layer-stable # adding this branch here to run CI on it regardless of the conflicts
- '!release-please--branches--**'

concurrency:
Expand Down Expand Up @@ -117,17 +118,17 @@ jobs:
name: CI for Common Components (prover or core)
uses: ./.github/workflows/ci-common-reusable.yml

build-core-images:
name: Build core images
needs: changed_files
if: ${{ (needs.changed_files.outputs.core == 'true' || needs.changed_files.outputs.all == 'true') && !contains(github.ref_name, 'release-please--branches') }}
uses: ./.github/workflows/build-core-template.yml
with:
image_tag_suffix: ${{ needs.setup.outputs.image_tag_suffix }}
action: "build"
secrets:
DOCKERHUB_USER: ${{ secrets.DOCKERHUB_USER }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
# build-core-images:
# name: Build core images
# needs: changed_files
# if: ${{ (needs.changed_files.outputs.core == 'true' || needs.changed_files.outputs.all == 'true') && !contains(github.ref_name, 'release-please--branches') }}
# uses: ./.github/workflows/build-core-template.yml
# with:
# image_tag_suffix: ${{ needs.setup.outputs.image_tag_suffix }}
# action: "build"
# secrets:
# DOCKERHUB_USER: ${{ secrets.DOCKERHUB_USER }}
# DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}

build-tee-prover-images:
name: Build TEE Prover images
Expand Down Expand Up @@ -187,7 +188,8 @@ jobs:
name: Github Status Check
runs-on: ubuntu-latest
if: always() && !cancelled()
needs: [ci-for-core-lint, ci-for-common, ci-for-core, ci-for-prover, ci-for-docs, build-core-images, build-contract-verifier, build-prover-images]
#TODO return build-core-images
needs: [ci-for-core-lint, ci-for-common, ci-for-core, ci-for-prover, ci-for-docs, build-contract-verifier, build-prover-images]
steps:
- name: Status
run: |
Expand Down
74 changes: 37 additions & 37 deletions .github/workflows/protobuf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,43 +36,43 @@ jobs:
- uses: mozilla-actions/sccache-action@89e9040de88b577a072e3760aaf59f585da083af # v0.0.5

# before
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4
with:
ref: ${{ env.BASE }}
path: before
fetch-depth: 0 # fetches all branches and tags, which is needed to compute the LCA.
- name: checkout LCA
run:
git checkout $(git merge-base $BASE $HEAD)
working-directory: ./before
- name: compile before
run: cargo check --all-targets
working-directory: ./before/
- name: build before.binpb
run: >
perl -ne 'print "$1\n" if /PROTOBUF_DESCRIPTOR="(.*)"/'
`find ./before/target/debug/build/*/output`
| xargs cat > ./before.binpb
# - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4
# with:
# ref: ${{ env.BASE }}
# path: before
# fetch-depth: 0 # fetches all branches and tags, which is needed to compute the LCA.
# - name: checkout LCA
# run:
# git checkout $(git merge-base $BASE $HEAD)
# working-directory: ./before
# - name: compile before
# run: cargo check --all-targets
# working-directory: ./before/
# - name: build before.binpb
# run: >
# perl -ne 'print "$1\n" if /PROTOBUF_DESCRIPTOR="(.*)"/'
# `find ./before/target/debug/build/*/output`
# | xargs cat > ./before.binpb

# after
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4
with:
ref: ${{ env.HEAD }}
path: after
- name: compile after
run: cargo check --all-targets
working-directory: ./after
- name: build after.binpb
run: >
perl -ne 'print "$1\n" if /PROTOBUF_DESCRIPTOR="(.*)"/'
`find ./after/target/debug/build/*/output`
| xargs cat > ./after.binpb
# - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4
# with:
# ref: ${{ env.HEAD }}
# path: after
# - name: compile after
# run: cargo check --all-targets
# working-directory: ./after
# - name: build after.binpb
# run: >
# perl -ne 'print "$1\n" if /PROTOBUF_DESCRIPTOR="(.*)"/'
# `find ./after/target/debug/build/*/output`
# | xargs cat > ./after.binpb

# compare
- uses: bufbuild/buf-setup-action@54abbed4fe8d8d45173eca4798b0c39a53a7b658 # v1.39.0
with:
github_token: ${{ github.token }}
- name: buf breaking
run: >
buf breaking './after.binpb' --against './before.binpb' --exclude-path 'zksync/config/experimental.proto'
--config '{"version":"v1","breaking":{"use":["WIRE_JSON","WIRE"]}}' --error-format 'github-actions'
# # compare
# - uses: bufbuild/buf-setup-action@54abbed4fe8d8d45173eca4798b0c39a53a7b658 # v1.39.0
# with:
# github_token: ${{ github.token }}
# - name: buf breaking
# run: >
# buf breaking './after.binpb' --against './before.binpb' --exclude-path 'zksync/config/experimental.proto'
# --config '{"version":"v1","breaking":{"use":["WIRE_JSON","WIRE"]}}' --error-format 'github-actions'
98 changes: 49 additions & 49 deletions .github/workflows/vm-perf-comparison.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,61 +18,61 @@ jobs:
fetch-depth: 0
ref: ${{ github.base_ref }}

- name: fetch PR branch
run: |
git remote add pr_repo ${{ github.event.pull_request.head.repo.clone_url }}
git fetch pr_repo ${{ github.event.pull_request.head.ref }}
# - name: fetch PR branch
# run: |
# git remote add pr_repo ${{ github.event.pull_request.head.repo.clone_url }}
# git fetch pr_repo ${{ github.event.pull_request.head.ref }}

- name: fetch merge-base SHA
id: merge_base
run: echo "sha=$(git merge-base HEAD FETCH_HEAD)" >> $GITHUB_OUTPUT
# - name: fetch merge-base SHA
# id: merge_base
# run: echo "sha=$(git merge-base HEAD FETCH_HEAD)" >> $GITHUB_OUTPUT

- name: checkout divergence point
run: git checkout ${{ steps.merge_base.outputs.sha }} --recurse-submodules
# - name: checkout divergence point
# run: git checkout ${{ steps.merge_base.outputs.sha }} --recurse-submodules

- name: setup-env
run: |
touch .env
echo ZKSYNC_HOME=$(pwd) >> $GITHUB_ENV
echo $(pwd)/bin >> $GITHUB_PATH
# - name: setup-env
# run: |
# touch .env
# echo ZKSYNC_HOME=$(pwd) >> $GITHUB_ENV
# echo $(pwd)/bin >> $GITHUB_PATH

- name: init
run: |
run_retried docker compose pull zk
docker compose up -d zk
# - name: init
# run: |
# run_retried docker compose pull zk
# docker compose up -d zk

- name: run benchmarks on base branch
shell: bash
run: |
ci_run zk
ci_run zk compiler system-contracts
ci_run cargo bench --package vm-benchmark --bench iai | tee base-iai
ci_run cargo run --package vm-benchmark --release --bin instruction_counts | tee base-opcodes || touch base-opcodes
ci_run yarn workspace system-contracts clean
# - name: run benchmarks on base branch
# shell: bash
# run: |
# ci_run zk
# ci_run zk compiler system-contracts
# ci_run cargo bench --package vm-benchmark --bench iai | tee base-iai
# ci_run cargo run --package vm-benchmark --release --bin instruction_counts | tee base-opcodes || touch base-opcodes
# ci_run yarn workspace system-contracts clean

- name: checkout PR
run: git checkout --force FETCH_HEAD --recurse-submodules
# - name: checkout PR
# run: git checkout --force FETCH_HEAD --recurse-submodules

- name: run benchmarks on PR
shell: bash
run: |
ci_run zk
ci_run zk compiler system-contracts
ci_run cargo bench --package vm-benchmark --bench iai | tee pr-iai
ci_run cargo run --package vm-benchmark --release --bin instruction_counts | tee pr-opcodes || touch pr-opcodes
# - name: run benchmarks on PR
# shell: bash
# run: |
# ci_run zk
# ci_run zk compiler system-contracts
# ci_run cargo bench --package vm-benchmark --bench iai | tee pr-iai
# ci_run cargo run --package vm-benchmark --release --bin instruction_counts | tee pr-opcodes || touch pr-opcodes

EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
echo "speedup<<$EOF" >> $GITHUB_OUTPUT
ci_run cargo run --package vm-benchmark --release --bin compare_iai_results base-iai pr-iai base-opcodes pr-opcodes >> $GITHUB_OUTPUT
echo "$EOF" >> $GITHUB_OUTPUT
id: comparison
# EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
# echo "speedup<<$EOF" >> $GITHUB_OUTPUT
# ci_run cargo run --package vm-benchmark --release --bin compare_iai_results base-iai pr-iai base-opcodes pr-opcodes >> $GITHUB_OUTPUT
# echo "$EOF" >> $GITHUB_OUTPUT
# id: comparison

- name: Comment on PR
uses: thollander/actions-comment-pull-request@fabd468d3a1a0b97feee5f6b9e499eab0dd903f6 # v2.5.0
with:
message: |
${{ steps.comparison.outputs.speedup == '' && '## No performance difference detected (anymore)' || '## Detected VM performance changes' }}
${{ steps.comparison.outputs.speedup }}
comment_tag: vm-performance-changes
mode: recreate
create_if_not_exists: ${{ steps.comparison.outputs.speedup != '' }}
# - name: Comment on PR
# uses: thollander/actions-comment-pull-request@fabd468d3a1a0b97feee5f6b9e499eab0dd903f6 # v2.5.0
# with:
# message: |
# ${{ steps.comparison.outputs.speedup == '' && '## No performance difference detected (anymore)' || '## Detected VM performance changes' }}
# ${{ steps.comparison.outputs.speedup }}
# comment_tag: vm-performance-changes
# mode: recreate
# create_if_not_exists: ${{ steps.comparison.outputs.speedup != '' }}
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ Cargo.lock
/etc/env/.current
/etc/env/configs/*
!/etc/env/configs/dev.toml
!/etc/env/configs/dev2.toml
!/etc/env/configs/l1-hyperchain.template.toml
!/etc/env/configs/l1-hyperchain-docker.template.toml
!/etc/env/configs/dev_validium.toml
!/etc/env/configs/dev_validium_docker.toml
!/etc/env/configs/ext-node.toml
Expand Down Expand Up @@ -69,6 +72,7 @@ Cargo.lock
!/etc/env/*.yaml
!/etc/env/ext-node-validium-docker.toml
/etc/tokens/localhost.json
/etc/tokens/localhostL2.json
/etc/zksolc-bin/*
/etc/zkvyper-bin/*
/etc/solc-bin/*
Expand Down
Loading