Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1042 commits
Select commit Hold shift + click to select a range
1079469
Merge branch 'draft-v30' of ssh://github.com/matter-labs/era-contract…
kelemeno Oct 17, 2025
d86014c
imports
kelemeno Oct 17, 2025
43496f7
getting to build
kelemeno Oct 17, 2025
7cdf58b
lint
kelemeno Oct 17, 2025
899b659
Merge pull request #1733 from matter-labs/kl/17-10-25/merge-draft
kelemeno Oct 17, 2025
39c0970
add back paused deposits to make it mergeable
kelemeno Oct 17, 2025
f631ebd
avoid AvoidStackTooDeep struct
0xValera Oct 17, 2025
fd84f92
fix build
0xValera Oct 17, 2025
6596331
move L1 only function to L1ChainAH from ChainAHBase
kelemeno Oct 20, 2025
dd0e8e7
add new bridgeConfirmTransferResult
kelemeno Oct 22, 2025
03e2eda
more fixes
kelemeno Oct 22, 2025
6f2add9
linting
kelemeno Oct 22, 2025
1a36a03
lint
kelemeno Oct 22, 2025
f9a3f8d
remove dead code
kelemeno Oct 22, 2025
4b54cc2
proper capitalisation
kelemeno Oct 22, 2025
7eb6448
Merge branch 'kl/medium-interop' of ssh://github.com/matter-labs/era-…
kelemeno Oct 22, 2025
78814bf
chore(scripts): Remove redundant imports and old upgrades
Deniallugo Oct 17, 2025
e92cbce
chore(scripts): Remove redundant imports and old upgrades
Deniallugo Oct 17, 2025
a1b2090
whole refactoring
Deniallugo Oct 17, 2025
5413ee1
Fix Inspector
Deniallugo Oct 17, 2025
4ae807f
lint
Deniallugo Oct 17, 2025
f4faec0
fix
Deniallugo Oct 17, 2025
4998c59
Add deploy ctm script
Deniallugo Oct 17, 2025
525e8d4
fix verifier
Deniallugo Oct 17, 2025
5d0230f
remove old contracts
Deniallugo Oct 17, 2025
73b5800
Fix register
Deniallugo Oct 17, 2025
f19fa4e
Fix create2 contracts
Deniallugo Oct 20, 2025
9871c24
Move deployed adddresses to another script
Deniallugo Oct 20, 2025
23aa9b5
fix tests
kelemeno Oct 20, 2025
b96847e
Fix tests
Deniallugo Oct 20, 2025
9541399
Fix the upgrade test
Deniallugo Oct 21, 2025
c796de1
remove unused error
kelemeno Oct 22, 2025
e6c3686
Fix scripts
Deniallugo Oct 22, 2025
68f79ed
Merge remote-tracking branch 'origin/draft-v30' into kl/medium-interop
zkzoomer Oct 22, 2025
0741356
merge fixes
zkzoomer Oct 22, 2025
3fcd17d
Merge branch 'kl/medium-interop' into sb/fix-kl-medium-interop-server
zkzoomer Oct 22, 2025
bfa36cd
Proper rebase
Deniallugo Oct 22, 2025
a2a51b7
fix tests
Deniallugo Oct 22, 2025
df65833
Merge branch 'kl/medium-interop' into deniallugo-refactor-deploy-cont…
Deniallugo Oct 22, 2025
32dcea8
Fix tests
Deniallugo Oct 22, 2025
86bd950
fx test
Deniallugo Oct 22, 2025
945dce8
Update contracts
Deniallugo Oct 22, 2025
fabf162
Use config
Deniallugo Oct 23, 2025
6bb00e6
Fix params
Deniallugo Oct 23, 2025
f7420f9
Split config
Deniallugo Oct 23, 2025
7591987
Cleanup configs
Deniallugo Oct 23, 2025
3e51927
Add config for create chain pararms
Deniallugo Oct 23, 2025
ce83197
Use latest protocol version correctly
Deniallugo Oct 23, 2025
2d05c30
fix review comments
Deniallugo Oct 24, 2025
c4a2682
Make Deploy utils non abstract
Deniallugo Oct 24, 2025
3bef405
Merge pull request #1724 from matter-labs/kl/13-10-25/iterated-migrat…
kelemeno Oct 24, 2025
4cc035d
Fix functions visibility
Deniallugo Oct 24, 2025
dbab652
Merge branch 'sb/fix-kl-medium-interop-server' into deniallugo-refact…
Deniallugo Oct 24, 2025
1c71ed6
Revert "add initialChainMigrationNumber"
kelemeno Oct 28, 2025
a722e1b
Update l1-contracts/contracts/bridge/L1Nullifier.sol
kelemeno Oct 28, 2025
30ff978
Update l1-contracts/test/foundry/l1/integration/L1GatewayTests.t.sol
kelemeno Oct 28, 2025
0b5297c
rm unused
zkzoomer Oct 28, 2025
4b5dfed
comments
zkzoomer Oct 28, 2025
06a0c73
add _setMigrationInProgressOnL1
zkzoomer Oct 28, 2025
116ddef
Merge branch 'sb/fix-kl-medium-interop-server' into kl/14-10-25/remov…
zkzoomer Oct 28, 2025
4f1f39e
lint
zkzoomer Oct 28, 2025
5cad79f
feat: pause/unpause deposits (#1750)
zkzoomer Oct 28, 2025
5743ff5
unpause deposits on confirm migration
zkzoomer Oct 28, 2025
79cf25b
Revert "Merge pull request #1724 from matter-labs/kl/13-10-25/iterate…
zkzoomer Oct 28, 2025
4e5fe70
fixes
zkzoomer Oct 29, 2025
31ba80c
test fixes
zkzoomer Oct 29, 2025
82be524
fixes
zkzoomer Oct 29, 2025
5539894
restore unpauseDeposits
zkzoomer Oct 29, 2025
59332fe
simplify tests
zkzoomer Oct 29, 2025
11459c2
reduce contract size
zkzoomer Oct 29, 2025
6f92d11
comment fixes
zkzoomer Oct 30, 2025
3455dbd
extend interface
zkzoomer Oct 31, 2025
9697e62
test improvements
zkzoomer Oct 31, 2025
636b8a0
add finishMigrateChainToGateway script
zkzoomer Oct 31, 2025
3b12138
Revert "comment fixes"
zkzoomer Oct 31, 2025
8db59a2
rm override
zkzoomer Nov 3, 2025
64d8b60
modify comment
zkzoomer Nov 3, 2025
029388d
emit event on failure case
zkzoomer Nov 3, 2025
f33634a
rename test
zkzoomer Nov 3, 2025
84aad98
add pause/unpause deposits tests
zkzoomer Nov 4, 2025
40e6c85
small fixes
zkzoomer Nov 4, 2025
943ad73
send logs only on priority ops
zkzoomer Nov 5, 2025
7f839c6
Fix transperant proxy admin
Deniallugo Nov 5, 2025
1018b72
Fix tests
Deniallugo Nov 5, 2025
60061f0
Remove redundant deploy ctm utils import
Deniallugo Nov 5, 2025
8b15167
Remove redundant deploy ctm utils import
Deniallugo Nov 5, 2025
939474d
Probably fully fixed zk stuff
Deniallugo Nov 5, 2025
51af655
chore(v30): make currentSettlementLayerChainId public (#1801)
zkzoomer Nov 6, 2025
5e47ab2
Merge branch 'sb/fix-kl-medium-interop-server' into kl/14-10-25/remov…
zkzoomer Nov 6, 2025
2d21563
fix problems
Deniallugo Nov 10, 2025
e71c898
Fix l1 nullifier
Deniallugo Nov 10, 2025
5d2258d
migrate token balances script fixes
zkzoomer Nov 10, 2025
6be5588
Cleanup gateway vote preparation
Deniallugo Nov 10, 2025
1647ef0
deploy fixes
zkzoomer Nov 10, 2025
7f48e26
check deposit happened clears
zkzoomer Nov 10, 2025
1845dbd
Fix Legacy bridge
Deniallugo Nov 10, 2025
d4793e3
Remove more redundant fields
Deniallugo Nov 11, 2025
206745e
Merge remote-tracking branch 'origin/draft-v30' into kl/medium-interop
zkzoomer Nov 11, 2025
f15ac8e
lint
zkzoomer Nov 11, 2025
1470c71
Merge branch 'kl/medium-interop' into sb/fix-kl-medium-interop-server
zkzoomer Nov 11, 2025
4a2c69b
Merge remote-tracking branch 'origin/sb/fix-kl-medium-interop-server'…
zkzoomer Nov 12, 2025
cf93a6c
resolve stack-too-deep
zkzoomer Nov 12, 2025
43c8050
fix selectors
zkzoomer Nov 12, 2025
eea9ad1
refactor executor
zkzoomer Nov 12, 2025
06bad45
fix selectors (again)
zkzoomer Nov 12, 2025
24ff73c
Merge pull request #1809 from matter-labs/sma/refactor-executor
0xValera Nov 12, 2025
e72f8c2
refactor _commitBatchesSharedBridgeEra
zkzoomer Nov 12, 2025
744b99e
add documentation
0xValera Nov 12, 2025
831b639
fix comment
zkzoomer Nov 12, 2025
a923de1
Merge branch 'sb/fix-kl-medium-interop-server' into kl/14-10-25/remov…
zkzoomer Nov 12, 2025
e344fed
Merge sb/fix-kl-medium-interop-server
Deniallugo Nov 13, 2025
4dd05c1
Merge branch 'sb/fix-kl-medium-interop-server' into deniallugo-refact…
Deniallugo Nov 13, 2025
f65345e
Implement zksync os ctm deployment
Deniallugo Nov 12, 2025
3d01ab7
Fix stack too deep
Deniallugo Nov 12, 2025
cbbe52b
Fix merge
Deniallugo Nov 13, 2025
3c01c1c
small fixes
kelemeno Nov 13, 2025
fe5d832
linting
kelemeno Nov 13, 2025
c9288c4
Merge pull request #1815 from matter-labs/kl/13-11-25/small-issues
kelemeno Nov 13, 2025
9531680
Merge pull request #1704 from matter-labs/sb/fix-kl-medium-interop-se…
kelemeno Nov 13, 2025
0564c97
script fix
zkzoomer Nov 13, 2025
a82c44a
Merge branch 'kl/medium-interop' into kl/14-10-25/remove-timeframe-as…
zkzoomer Nov 13, 2025
d215811
more script fixes
zkzoomer Nov 13, 2025
b26f206
Merge branch 'kl/medium-interop' into kl/14-10-25/remove-timeframe-as…
zkzoomer Nov 13, 2025
39a4d03
fix selectors
zkzoomer Nov 13, 2025
ac45668
Merge remote-tracking branch 'origin/kl/medium-interop' into deniallu…
zkzoomer Nov 13, 2025
7e9777f
Fix tests
Deniallugo Nov 13, 2025
491aecc
fix selectors
zkzoomer Nov 14, 2025
b0cfde7
fix test
zkzoomer Nov 14, 2025
6aba3ee
spacing
zkzoomer Nov 14, 2025
fed209d
Merge pull request #1736 from matter-labs/deniallugo-refactor-deploy-…
kelemeno Nov 14, 2025
2b02114
Merge remote-tracking branch 'origin/kl/medium-interop' into kl/14-10…
zkzoomer Nov 14, 2025
218a18e
lint
zkzoomer Nov 14, 2025
863e95f
add testnet time
kelemeno Nov 14, 2025
b1ec936
lint
kelemeno Nov 14, 2025
6191808
linting
kelemeno Nov 14, 2025
4a93a58
Split deploy scripts
Deniallugo Nov 14, 2025
fd7fede
Update GWAssetTracker.sol
0xValera Nov 14, 2025
fd877fe
test overhaul
zkzoomer Nov 15, 2025
d516322
add depositsPaused selector
kelemeno Nov 15, 2025
bbcab97
lint
kelemeno Nov 15, 2025
721d654
selectors
kelemeno Nov 15, 2025
69c1204
Update l1-contracts/contracts/common/Messaging.sol
kelemeno Nov 17, 2025
e407ffc
Update l1-contracts/contracts/state-transition/chain-deps/facets/Mail…
kelemeno Nov 17, 2025
20e735a
chain asset handler comment
kelemeno Nov 17, 2025
7f572f0
tested with server locally seems to work
kelemeno Nov 17, 2025
9f1b1ee
selectors
kelemeno Nov 17, 2025
04f2bd2
Merge pull request #1818 from matter-labs/kl/testnet-time
kelemeno Nov 17, 2025
bbb52ea
Merge pull request #1726 from matter-labs/kl/14-10-25/remove-timefram…
kelemeno Nov 17, 2025
24a1326
define isVerifier constructor parameter
zkzoomer Nov 18, 2025
96145c1
Merge branch 'kl/medium-interop' into denaillugo-move-deploy-scripts
Deniallugo Nov 18, 2025
4606194
favor mainnet in tests
zkzoomer Nov 18, 2025
84f9dd6
rm unneeded
zkzoomer Nov 18, 2025
5ad6ee1
lint
zkzoomer Nov 18, 2025
bc36a06
Merge pull request #1829 from matter-labs/sma/add-isverifier-construc…
kelemeno Nov 19, 2025
67f53e9
Merge branch 'kl/medium-interop' into denaillugo-move-deploy-scripts
Deniallugo Nov 19, 2025
d0dd5e0
fix lint
kelemeno Nov 20, 2025
f170d14
fix again
kelemeno Nov 20, 2025
cd1c922
remove extra console
kelemeno Nov 20, 2025
5370643
Merge pull request #1819 from matter-labs/denaillugo-move-deploy-scripts
kelemeno Nov 20, 2025
7686468
Merge branch 'draft-v30' of ssh://github.com/matter-labs/era-contract…
kelemeno Nov 20, 2025
50c464c
feat(diamond_init): Get rid of fee and verifier params from chain cre…
Deniallugo Nov 25, 2025
e71f71d
Interop center tests and bridge refactoring (#1786)
kelemeno Nov 25, 2025
5d2d0ea
make isMigrationInProgress available on L2ChainAssetHandler
zkzoomer Nov 27, 2025
9574091
fix selectors
zkzoomer Nov 27, 2025
423f25b
Delete DynamicIncrementalMerkle.sol
0xValera Nov 27, 2025
9f7587e
remove redundant test files
0xValera Nov 27, 2025
693cfa4
Update l1-contracts/contracts/bridgehub/ChainAssetHandlerBase.sol
zkzoomer Nov 27, 2025
210b87d
Merge pull request #1846 from matter-labs/sma/l2-is-migration-in-prog…
0xValera Nov 27, 2025
5437043
fix: fix forge permissions + L2GenesisUpgrade test (#1848)
0xValera Nov 28, 2025
1e9769b
Merge pull request #1847 from matter-labs/vg/remove-broken-dimt
0xValera Nov 28, 2025
ad67a42
Revert "fix: make isMigrationInProgress available on L2ChainAssetHand…
0xValera Nov 28, 2025
bdd0340
fix depositsPaused
zkzoomer Nov 28, 2025
983fea6
Merge pull request #1850 from matter-labs/revert-1846-sma/l2-is-migra…
0xValera Nov 28, 2025
49d9fb9
fix: use gateway's block.timestamp (#1849)
zkzoomer Dec 1, 2025
15713a3
feat: refactoring interop library (#1842)
Raid5594 Dec 3, 2025
9cf5c4f
feat(upgrade): Split default upgrade to ECOSYSTEM + CTM + Gateway (#…
Deniallugo Dec 4, 2025
06cecb4
reorg contracts
0xValera Dec 4, 2025
4e452f4
Merge branch 'kl/medium-interop' of https://github.com/matter-labs/er…
0xValera Dec 4, 2025
92148e5
some fixes
0xValera Dec 4, 2025
e652a82
update path in errors-lint.ts
0xValera Dec 4, 2025
e843938
remove out.txt (debug file)
0xValera Dec 4, 2025
807fda3
move IL1MessageRoot to correct place
0xValera Dec 4, 2025
4cb2288
core <---> bridgehub
0xValera Dec 4, 2025
ee031dd
Kl/script forgotten changes (#1903)
kelemeno Dec 4, 2025
04de024
Remove redundant usage of permanent values
Deniallugo Dec 5, 2025
b3a3ddb
Fix tests
Deniallugo Dec 5, 2025
d40e207
fix path to file in errors-lint
0xValera Dec 5, 2025
03cfd46
Merge branch 'kl/medium-interop' of https://github.com/matter-labs/er…
0xValera Dec 5, 2025
99d1513
Merge pull request #1904 from matter-labs/vg/reorg-contracts
0xValera Dec 5, 2025
dd00940
one more test (#1907)
kelemeno Dec 5, 2025
2e1e5fa
Remove redundant values from configs (#1915)
Deniallugo Dec 8, 2025
4b359ee
Merge remote-tracking branch 'origin/draft-v30' into kl/medium-interop
zkzoomer Dec 9, 2025
4303e33
Improve linting (#1921)
nikitastupin-matterlabs Dec 9, 2025
1b13c45
fix: refactor executor II (#1922)
zkzoomer Dec 10, 2025
a8b7a0e
add explict check for destination chain registerred
kelemeno Dec 10, 2025
dcd95cd
Use permament config as an independent config (#1917)
Deniallugo Dec 10, 2025
9b75bec
chore: update DEFAULT_ZKSYNC_OS_VERIFIER_VERSION to 6 (#1924)
antonbaliasnikov Dec 11, 2025
9fc0ae4
Add upgrade cut data block (#1919)
Deniallugo Dec 11, 2025
9ddc915
chore: prepare contracts for v1.3.1 upgrade
antonbaliasnikov Dec 11, 2025
21838df
Get upgrade diamond init onchain (#1928)
Deniallugo Dec 15, 2025
8ae28b3
Prividium transaction filterer improvements (#1927)
ly0va Dec 15, 2025
6b50496
fix: split test contracts into multiple to fix zkfoundry compilation …
0xValera Dec 16, 2025
03c4549
Update configs
Deniallugo Dec 16, 2025
dd3ea59
Merge pull request #1811 from matter-labs/vg/v30-oz-m04
0xValera Dec 16, 2025
e140699
Revert "v30 interop OZ audit, M-04"
0xValera Dec 16, 2025
37897b7
Merge pull request #1932 from matter-labs/revert-1811-vg/v30-oz-m04
0xValera Dec 16, 2025
1fd60f9
Kl/v30 audit base (#1923)
kelemeno Dec 17, 2025
15cc520
feat: modify system contracts to interact with system hooks (#1808)
Raid5594 Dec 17, 2025
5e22cef
move prover params to the genesis (#1934)
Deniallugo Dec 18, 2025
a91c4ac
ci: publish release artifacts only on tag pushes (#1933)
antonbaliasnikov Dec 18, 2025
da2613a
ci: publish release artifacts only on tag pushes (#1933)
antonbaliasnikov Dec 18, 2025
24799ed
Revert "feat: modify system contracts to interact with system hooks (…
kelemeno Dec 18, 2025
1fffbb9
feat(tools): Make zksync os generator working with local genesis
Deniallugo Dec 18, 2025
c45d4b7
fix: fix migrate token balances gw to l1 (#1908)
zkzoomer Dec 18, 2025
dce1561
use json instead of toml
Deniallugo Dec 18, 2025
a94f4d5
Use json instead of toml for chain creation params
Deniallugo Dec 18, 2025
22c56cb
Refactor place for versions
Deniallugo Dec 18, 2025
a644f2e
Refactor main rs
Deniallugo Dec 18, 2025
d6baa72
Merge branch 'kl/medium-interop' into deniallugo-zksync-os-genesis
Deniallugo Dec 18, 2025
2623093
feat: support 0 gas price txs
AntonD3 Dec 1, 2025
1703987
Make zksync os genesis alive
AntonD3 Dec 4, 2025
9040c1b
Support custom output
Deniallugo Dec 19, 2025
057209c
Fix test
Deniallugo Dec 19, 2025
2a59195
fix lints
Deniallugo Dec 19, 2025
132ae4b
Fix constants
Deniallugo Dec 19, 2025
0137245
Found problematic upgrade part
Deniallugo Dec 19, 2025
8c01fbc
hacky l2 interop
StanislavBreadless Dec 22, 2025
96a7106
Fix force deployments
Deniallugo Dec 22, 2025
2b1e41d
Return back SYSTEM_CONTRACT_PROXY_ADMIN_ADDRESS
Deniallugo Dec 22, 2025
04a185b
Ignore upgrade only for genesis
Deniallugo Dec 22, 2025
fcbbec6
Update addresses
Deniallugo Dec 22, 2025
dd42776
An attempt to fix l2 asset tracker test
Deniallugo Dec 22, 2025
ebfa490
Fix wrong commitment
Deniallugo Dec 22, 2025
6adc8dd
Fix l1 rollup field for zksync os blobs
Deniallugo Dec 22, 2025
04df19d
upd files
StanislavBreadless Dec 23, 2025
30fd113
remove additional checks
StanislavBreadless Jan 5, 2026
2f0f57a
Fix l1 rollup field for zksync os blobs
Deniallugo Dec 22, 2025
1c4d1eb
Fix the place for blobs_zksync_os_l1_da_validator_addr
Deniallugo Jan 5, 2026
8eb48fe
Fix test for L2AssetTracker.t.sol
Deniallugo Jan 5, 2026
eb7f45a
Calculate empty message root
Deniallugo Jan 5, 2026
5c464ff
Add comments and fix review issues
Deniallugo Jan 5, 2026
f9fd0b7
Transfer ownership
Deniallugo Jan 5, 2026
f7b280c
Make compare string private
Deniallugo Jan 5, 2026
03d89a6
Fix verifier owner
Deniallugo Jan 5, 2026
79066df
fix lints
Deniallugo Jan 5, 2026
504d2b0
fix typo
Deniallugo Jan 5, 2026
4bbcecc
Refactor
Deniallugo Jan 5, 2026
00dd8fb
Merge branch 'deniallugo-zksync-os-genesis' into zksync-os-with-kl-me…
Deniallugo Jan 5, 2026
e1ce9d4
Merge branch 'draft-v31' into zksync-os-with-kl-medium-interop
Deniallugo Jan 6, 2026
1ce5900
small issues
kelemeno Jan 13, 2026
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
26 changes: 13 additions & 13 deletions AllContractsHashes.json
Original file line number Diff line number Diff line change
Expand Up @@ -1151,12 +1151,12 @@
},
{
"contractName": "l1-contracts/GatewayCTMDeployer",
"zkBytecodeHash": "0x010004054b832dd87261d2543c2265d6fa3afaf0a099a3a40288101b85bb81f4",
"zkBytecodeHash": "0x010004215d2b568db812b2201238e65626dc7ad3278307424234725a3ad4200e",
"zkBytecodePath": "/l1-contracts/zkout/GatewayCTMDeployer.sol/GatewayCTMDeployer.json",
"evmBytecodeHash": "0x8e87bc30feb7d26fc7c33071be97bfd41ccdbaa6ef24d74d3367468d9abc7d16",
"evmBytecodeHash": "0xeb96f7a24ec8b28478686df1bf46b96655e02874de69353a50ba286d5e51938e",
"evmBytecodePath": "/l1-contracts/out/GatewayCTMDeployer.sol/GatewayCTMDeployer.json",
"evmDeployedBytecodeHash": "0x9fc62b52d29b4943f98e2329ef04e479a170e4b7ec6e94f9d33b485d96ff3b36",
"evmDeployedBytecodeBlakeHash": "0x86a70661cc07e1cf29ff3093ad7e462acd955b19f3bed92eed3092326cbbd6c1",
"evmDeployedBytecodeHash": "0xd6ae2bdf2461a83ba7c72ec6fcc0d1f049ac75aa226ff7c7889f1bc4d779801a",
"evmDeployedBytecodeBlakeHash": "0x80277f2a718929bf18676649a5214f9c9d4f3cefb7e0e914af76844856d2c192",
"evmDeployedBytecodeLength": 1645
},
{
Expand Down Expand Up @@ -1641,13 +1641,13 @@
},
{
"contractName": "l1-contracts/PrividiumTransactionFilterer",
"zkBytecodeHash": "0x01000157226169964afc93eb8a64436f187d7e32275ea1a0c5e1a730894c01cb",
"zkBytecodeHash": "0x010001691977d77ea39ce91ddfe6ef10e79e944947a337a50a1be3ecad48dda9",
"zkBytecodePath": "/l1-contracts/zkout/PrividiumTransactionFilterer.sol/PrividiumTransactionFilterer.json",
"evmBytecodeHash": "0x2a5a9c34dee0ecf60cc490e6b31d7ada54e4de873036a1b688d2255adb953ed8",
"evmBytecodeHash": "0x46352f04ca971679645b5cf77b197ba82493f07ad26478afcb83e25236c9dae1",
"evmBytecodePath": "/l1-contracts/out/PrividiumTransactionFilterer.sol/PrividiumTransactionFilterer.json",
"evmDeployedBytecodeHash": "0x34ffeabcef8eabb869964a4adfde4c1cfb6bfc3db62e3b24cdc8936205e98eef",
"evmDeployedBytecodeBlakeHash": "0x652e68b11fc54892b43e155fa674288a7e2bb2bd20ee46d2a6be1287741f9e04",
"evmDeployedBytecodeLength": 4171
"evmDeployedBytecodeHash": "0xf0659bc039b12d10e7b2f194c36614e3dc1b4376459852ff954c698a10b5a3e7",
"evmDeployedBytecodeBlakeHash": "0x160ca34080b5083673341e27c058711d96ea00423857a92bd65a71fff957f178",
"evmDeployedBytecodeLength": 4423
},
{
"contractName": "l1-contracts/ProxyAdmin",
Expand Down Expand Up @@ -2031,12 +2031,12 @@
},
{
"contractName": "l1-contracts/ZKsyncOSVerifierPlonk",
"zkBytecodeHash": "0x01000dbb07eb714df323bde39a9a9932568c719eb5142eed246fcf6dd5d5ef3b",
"zkBytecodeHash": "0x01000dbb9ec136fa5e38c045c50d83b8d40f9c413d8fde1cb2c61b3e41510f44",
"zkBytecodePath": "/l1-contracts/zkout/ZKsyncOSVerifierPlonk.sol/ZKsyncOSVerifierPlonk.json",
"evmBytecodeHash": "0x159b081e1a1b2b2ca029f30f79e36295e4114933fe525e6b0d742c22c61fda8e",
"evmBytecodeHash": "0x0a6337f3679fbe14f4d35da5b9bce7a16bb951d7e43b5dfb1a3e42aef4dff8e8",
"evmBytecodePath": "/l1-contracts/out/ZKsyncOSVerifierPlonk.sol/ZKsyncOSVerifierPlonk.json",
"evmDeployedBytecodeHash": "0xdced43cf26e9003d822e9ac706f2da349db08fca651d36a649bea972b3c42622",
"evmDeployedBytecodeBlakeHash": "0xbf7b6957a97d220f896b953b077fd8ef0fe043603e89cb3da292ad730630243c",
"evmDeployedBytecodeHash": "0xa8e35be1abbfc180d5bad322558428ba9054dca034297742aede45fddd0b2956",
"evmDeployedBytecodeBlakeHash": "0xd4fcc40bc646594d5d3482a35dbe85ded4ab8e5a979aa88984727fe8ce9f5942",
"evmDeployedBytecodeLength": 17226
},
{
Expand Down
10 changes: 9 additions & 1 deletion configs/genesis/zksync-os/latest.json

Large diffs are not rendered by default.

77 changes: 40 additions & 37 deletions l1-contracts/contracts/bridge/asset-tracker/L2AssetTracker.sol
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,10 @@ contract L2AssetTracker is AssetTrackerBase, IL2AssetTracker {

function _registerTokenOnL2(bytes32 _assetId) internal {
/// If the chain is settling on Gateway, then withdrawals are not automatically allowed for new tokens.
if (L2_SYSTEM_CONTEXT_SYSTEM_CONTRACT.currentSettlementLayerChainId() == _l1ChainId()) {
assetMigrationNumber[block.chainid][_assetId] = L2_CHAIN_ASSET_HANDLER.migrationNumber(block.chainid);
}
// FIXME
// if (L2_SYSTEM_CONTEXT_SYSTEM_CONTRACT.currentSettlementLayerChainId() == _l1ChainId()) {
// assetMigrationNumber[block.chainid][_assetId] = L2_CHAIN_ASSET_HANDLER.migrationNumber(block.chainid);
// }
}

/// @notice Registers a legacy token on this L2 chain for backwards compatibility.
Expand Down Expand Up @@ -150,11 +151,12 @@ contract L2AssetTracker is AssetTrackerBase, IL2AssetTracker {
/// Note we always allow bridging when settling on L1.
/// On Gateway we require that the tokenBalance be migrated to Gateway from L1,
/// otherwise withdrawals might fail in the GWAssetTracker when the chain settles.
require(
savedAssetMigrationNumber == migrationNumber ||
L2_SYSTEM_CONTEXT_SYSTEM_CONTRACT.currentSettlementLayerChainId() == _l1ChainId(),
TokenBalanceNotMigratedToGateway(_assetId, savedAssetMigrationNumber, migrationNumber)
);
// FIXME
// require(
// savedAssetMigrationNumber == migrationNumber ||
// L2_SYSTEM_CONTEXT_SYSTEM_CONTRACT.currentSettlementLayerChainId() == _l1ChainId(),
// TokenBalanceNotMigratedToGateway(_assetId, savedAssetMigrationNumber, migrationNumber)
// );
}

/// @notice Handles the initiation of base token bridging operations on L2.
Expand Down Expand Up @@ -263,35 +265,36 @@ contract L2AssetTracker is AssetTrackerBase, IL2AssetTracker {
/// @dev This function is permissionless, it does not affect the state of the contract substantially, and can be called multiple times.
/// @dev The value to migrate is read from the L2, but the tracking is done on L1/GW.
function initiateL1ToGatewayMigrationOnL2(bytes32 _assetId) external {
require(
L2_SYSTEM_CONTEXT_SYSTEM_CONTRACT.currentSettlementLayerChainId() != L1_CHAIN_ID,
OnlyGatewaySettlementLayer()
);
address tokenAddress = _tryGetTokenAddress(_assetId);

uint256 originChainId = L2_NATIVE_TOKEN_VAULT.originChainId(_assetId);
address originalToken = L2_NATIVE_TOKEN_VAULT.originToken(_assetId);

uint256 chainMigrationNumber = _getChainMigrationNumber(block.chainid);
uint256 assetMigrationNumber = assetMigrationNumber[block.chainid][_assetId];
if (chainMigrationNumber == assetMigrationNumber) {
/// In this case the token was either already migrated, or the migration number was set using _forceSetAssetMigrationNumber.
return;
}
uint256 amount = _getOrSaveTotalSupply(_assetId, chainMigrationNumber, originChainId, tokenAddress);

TokenBalanceMigrationData memory tokenBalanceMigrationData = TokenBalanceMigrationData({
version: TOKEN_BALANCE_MIGRATION_DATA_VERSION,
chainId: block.chainid,
assetId: _assetId,
tokenOriginChainId: originChainId,
amount: amount,
chainMigrationNumber: chainMigrationNumber,
assetMigrationNumber: assetMigrationNumber,
originToken: originalToken,
isL1ToGateway: true
});
_sendMigrationDataToL1(tokenBalanceMigrationData);
revert("Disabled for zksync os");
// require(
// L2_SYSTEM_CONTEXT_SYSTEM_CONTRACT.currentSettlementLayerChainId() != L1_CHAIN_ID,
// OnlyGatewaySettlementLayer()
// );
// address tokenAddress = _tryGetTokenAddress(_assetId);

// uint256 originChainId = L2_NATIVE_TOKEN_VAULT.originChainId(_assetId);
// address originalToken = L2_NATIVE_TOKEN_VAULT.originToken(_assetId);

// uint256 chainMigrationNumber = _getChainMigrationNumber(block.chainid);
// uint256 assetMigrationNumber = assetMigrationNumber[block.chainid][_assetId];
// if (chainMigrationNumber == assetMigrationNumber) {
// /// In this case the token was either already migrated, or the migration number was set using _forceSetAssetMigrationNumber.
// return;
// }
// uint256 amount = _getOrSaveTotalSupply(_assetId, chainMigrationNumber, originChainId, tokenAddress);

// TokenBalanceMigrationData memory tokenBalanceMigrationData = TokenBalanceMigrationData({
// version: TOKEN_BALANCE_MIGRATION_DATA_VERSION,
// chainId: block.chainid,
// assetId: _assetId,
// tokenOriginChainId: originChainId,
// amount: amount,
// chainMigrationNumber: chainMigrationNumber,
// assetMigrationNumber: assetMigrationNumber,
// originToken: originalToken,
// isL1ToGateway: true
// });
// _sendMigrationDataToL1(tokenBalanceMigrationData);
}

/// @notice Confirms a migration operation has been completed and updates the asset migration number.
Expand Down
49 changes: 49 additions & 0 deletions l1-contracts/contracts/core/bridgehub/L2InteropRootStorage.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.24;

event InteropRootAdded(uint256 indexed chainId, uint256 indexed blockNumber, bytes32[] sides);
error SidesLengthNotOne();
error InteropRootAlreadyExists();
error MessageRootIsZero();

/**
* @author Matter Labs
* @custom:security-contact security@matterlabs.dev
* @notice InteropRootStorage contract responsible for storing the message roots of other chains on the L2.
*/
contract L2InteropRootStorage {
/// @notice Mapping of chain ID to block or batch number to message root.
mapping(uint256 chainId => mapping(uint256 blockOrBatchNumber => bytes32 interopRoot)) public interopRoots;

/// @dev Adds a message root to the L2InteropRootStorage contract.
/// @dev For both proof-based and commit-based interop, the `sides` parameter contains only the root.
/// @dev Once pre-commit interop is introduced, `sides` will include both the root and its associated sides.
/// @dev This interface is preserved now so that enabling pre-commit interop later requires no changes in interface.
/// @dev In proof-based and pre-commit interop, `blockOrBatchNumber` represents the block number, in commit-based interop,
/// it represents the batch number. This distinction reflects the implementation requirements of each interop finality form.
/// @param chainId The chain ID of the chain that the message root is for.
/// @param blockOrBatchNumber The block or batch number of the message root. Either of block number or batch number will be used,
/// depends on finality form of interop, mentioned above.
/// @param sides The message root sides. Note, that `sides` here are coming from `DynamicIncrementalMerkle` nomenclature.
/// @dev FIXME: for the demo purposes, remove onlyCallFromBootloader modifier
function addInteropRoot(uint256 chainId, uint256 blockOrBatchNumber, bytes32[] calldata sides) external {
// In the current code sides should only contain the Interop Root itself, as mentioned above.
Comment on lines +29 to +31

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Restrict interop root writes to trusted caller

Because addInteropRoot is declared external with no access control, any address can set the interop root for an arbitrary (chainId, blockOrBatchNumber) once. L2MessageVerification later treats L2_INTEROP_ROOT_STORAGE.interopRoots(...) as the source of truth for message inclusion, so an attacker who pre-fills a root can craft proofs that verify forged bundles/messages on L2. This is exploitable whenever a malicious party can submit addInteropRoot before the legitimate publisher for that pair.

Useful? React with 👍 / 👎.

if (sides.length != 1) {
revert SidesLengthNotOne();
}
if (sides[0] == bytes32(0)) {
revert MessageRootIsZero();
}

// Make sure that interopRoots for specified chainId and blockOrBatchNumber wasn't set already.
if (interopRoots[chainId][blockOrBatchNumber] != bytes32(0)) {
revert InteropRootAlreadyExists();
}

// Set interopRoots for specified chainId and blockOrBatchNumber, emit event.
interopRoots[chainId][blockOrBatchNumber] = sides[0];

emit InteropRootAdded(chainId, blockOrBatchNumber, sides);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ import {MessageVerification} from "../../common/MessageVerification.sol";

import {IGetters} from "../../state-transition/chain-interfaces/IGetters.sol";

event AppendedChainRoot(uint256 indexed chainId, uint256 indexed batchNumber, bytes32 indexed chainRoot);

/// @author Matter Labs
/// @custom:security-contact security@matterlabs.dev
/// @dev The MessageRoot contract is responsible for storing the cross message roots of the chains and the aggregated root of all chains.
Expand Down Expand Up @@ -191,6 +193,8 @@ abstract contract MessageRootBase is IMessageRoot, Initializable, MessageVerific

chainBatchRoots[_chainId][_batchNumber] = _chainBatchRoot;
++currentChainBatchNumber[_chainId];
emit AppendedChainRoot(_chainId, _batchNumber, _chainBatchRoot);

if (block.chainid == L1_CHAIN_ID()) {
/// On L1 we only store the chainBatchRoot, but don't update the chainTree or sharedTree.
return;
Expand Down
6 changes: 4 additions & 2 deletions l1-contracts/contracts/interop/InteropCenter.sol
Original file line number Diff line number Diff line change
Expand Up @@ -269,8 +269,9 @@ contract InteropCenter is
msg.value == _totalBurnedCallsValue + _totalIndirectCallsValue,
MsgValueMismatch(_totalBurnedCallsValue + _totalIndirectCallsValue, msg.value)
);
// FIXME: does not burn, just sends to a a bad address.
// slither-disable-next-line arbitrary-send-eth
L2_BASE_TOKEN_SYSTEM_CONTRACT.burnMsgValue{value: _totalBurnedCallsValue}();
address(0xdeadbeef).call{value: _totalBurnedCallsValue}("");
Comment on lines +272 to +274

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Burn msg.value instead of transferring to 0xdeadbeef

In _ensureCorrectTotalValue, the burn path for same-base-token interop bundles now transfers _totalBurnedCallsValue to 0xdeadbeef instead of calling L2_BASE_TOKEN_SYSTEM_CONTRACT.burnMsgValue. That does not update the base-token system contract’s accounting, so bundles that are supposed to burn value will leave the L2 supply/state out of sync with L1 accounting. This only affects bundles where destinationChainBaseTokenAssetId == thisChainBaseTokenAssetId and _totalBurnedCallsValue > 0, but in that case reconciliation/withdrawals can break because no actual burn is recorded.

Useful? React with 👍 / 👎.

} else {
require(msg.value == _totalIndirectCallsValue, MsgValueMismatch(_totalIndirectCallsValue, msg.value));
if (_totalBurnedCallsValue > 0) {
Expand All @@ -296,7 +297,8 @@ contract InteropCenter is
BundleAttributes memory _bundleAttributes,
bytes[][] memory _originalCallAttributes
) internal returns (bytes32 bundleHash) {
require(L2_SYSTEM_CONTEXT_SYSTEM_CONTRACT.currentSettlementLayerChainId() != L1_CHAIN_ID, NotInGatewayMode());
// FIXME: Turned off for zksync os for now
// require(L2_SYSTEM_CONTEXT_SYSTEM_CONTRACT.currentSettlementLayerChainId() != L1_CHAIN_ID, NotInGatewayMode());

// Form an InteropBundle.
InteropBundle memory bundle = InteropBundle({
Expand Down
7 changes: 4 additions & 3 deletions l1-contracts/contracts/interop/InteropHandler.sol
Original file line number Diff line number Diff line change
Expand Up @@ -328,15 +328,16 @@ contract InteropHandler is IInteropHandler, ReentrancyGuard {
_proof: _proof.proof
});

require(isIncluded, MessageNotIncluded());
// require(isIncluded, MessageNotIncluded());

bundleStatus[_bundleHash] = BundleStatus.Verified;

// FIXME
/// We send the fact of verification to L1 so that the GWAssetTracker can process the chainBalance changes.
require(L2_SYSTEM_CONTEXT_SYSTEM_CONTRACT.currentSettlementLayerChainId() != L1_CHAIN_ID, NotInGatewayMode());
// require(L2_SYSTEM_CONTEXT_SYSTEM_CONTRACT.currentSettlementLayerChainId() != L1_CHAIN_ID, NotInGatewayMode());

// slither-disable-next-line reentrancy-no-eth,unused-return
L2_TO_L1_MESSENGER_SYSTEM_CONTRACT.sendToL1(bytes.concat(this.verifyBundle.selector, _bundleHash));
// L2_TO_L1_MESSENGER_SYSTEM_CONTRACT.sendToL1(bytes.concat(this.verifyBundle.selector, _bundleHash));

// Emit event stating that the bundle was verified.
emit BundleVerified(_bundleHash);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -802,25 +802,25 @@ contract ExecutorFacet is ZKChainBase, IExecutor {
// Interop is only allowed on GW currently, so we go through the Asset Tracker when on Gateway.
// When on L1, we append directly to the Message Root, though interop is not allowed there, it is only used for
// message verification.
if (block.chainid != L1_CHAIN_ID) {
uint256 messagesLength = messages.length;
for (uint256 i = 0; i < messagesLength; i = i.uncheckedInc()) {
ProcessLogsInput memory processLogsInput = ProcessLogsInput({
logs: logs[i],
messages: messages[i],
chainId: s.chainId,
batchNumber: batchesData[i].batchNumber,
chainBatchRoot: batchesData[i].l2LogsTreeRoot,
messageRoot: messageRoots[i]
});
GW_ASSET_TRACKER.processLogsAndMessages(processLogsInput);
}
} else {
uint256 batchesDataLength = batchesData.length;
for (uint256 i = 0; i < batchesDataLength; i = i.uncheckedInc()) {
_appendMessageRoot(batchesData[i].batchNumber, batchesData[i].l2LogsTreeRoot);
}
// if (block.chainid != L1_CHAIN_ID) {
// uint256 messagesLength = messages.length;
// for (uint256 i = 0; i < messagesLength; i = i.uncheckedInc()) {
// ProcessLogsInput memory processLogsInput = ProcessLogsInput({
// logs: logs[i],
// messages: messages[i],
// chainId: s.chainId,
// batchNumber: batchesData[i].batchNumber,
// chainBatchRoot: batchesData[i].l2LogsTreeRoot,
// messageRoot: messageRoots[i]
// });
// GW_ASSET_TRACKER.processLogsAndMessages(processLogsInput);
// }
// } else {
uint256 batchesDataLength = batchesData.length;
for (uint256 i = 0; i < batchesDataLength; i = i.uncheckedInc()) {
_appendMessageRoot(batchesData[i].batchNumber, batchesData[i].l2LogsTreeRoot);
}
// }

for (uint256 i = 0; i < nBatches; i = i.uncheckedInc()) {
_executeOneBatch(batchesData[i], priorityOpsData[i], dependencyRoots[i], i);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {IVerifier} from "../chain-interfaces/IVerifier.sol";
/// @notice Modified version of the Permutations over Lagrange-bases for Oecumenical Noninteractive arguments of
/// Knowledge (PLONK) verifier.
/// Modifications have been made to optimize the proof system for ZK chain circuits.
/// @dev Contract was generated from a verification key with a hash of 0x996b02b1d0420e997b4dc0d629a3a1bba93ed3185ac463f17b02ff83be139581
/// @dev Contract was generated from a verification key with a hash of 0x124ebcd537a1e1c152774dd18f67660e35625bba0b669bf3b4836d636b105337
/// @dev It uses a custom memory layout inside the inline assembly block. Each reserved memory cell is declared in the
/// constants below.
/// @dev For a better understanding of the verifier algorithm please refer to the following papers:
Expand Down Expand Up @@ -284,8 +284,8 @@ contract ZKsyncOSVerifierPlonk is IVerifier {
function _loadVerificationKey() internal pure virtual {
assembly {
// gate setup commitments
mstore(VK_GATE_SETUP_0_X_SLOT, 0x02e3b0b9f13c8d6c357fadb40987391045e4e74d6eb230bcf8e5bbeb1d25d314)
mstore(VK_GATE_SETUP_0_Y_SLOT, 0x02581594260d2083c95d4206fb6bc46e63409f179019a0ca85f559f16ec8c8b4)
mstore(VK_GATE_SETUP_0_X_SLOT, 0x1106b27c3561b9ffeacfd97e7c2a73e5b3830a71d9cf1e7a13e2c22619df67c6)
mstore(VK_GATE_SETUP_0_Y_SLOT, 0x1766dab5ce252fef675ee6ae5a594f2625517b04233609d7d6fa5b0d0e87bf9f)
mstore(VK_GATE_SETUP_1_X_SLOT, 0x0feda978f4639d0a725df74c4738bf178adca34e6a4f7cc38d6a9ae9ee49f695)
mstore(VK_GATE_SETUP_1_Y_SLOT, 0x2f7068beedb881aea392246c33ccc026ea9c8f6ea558a055b6df00ebfdf210a3)
mstore(VK_GATE_SETUP_2_X_SLOT, 0x06eccb685da5c8cc09a13698b2a22e383025abc75393d68c1da5a7dbacffbd9b)
Expand All @@ -296,8 +296,8 @@ contract ZKsyncOSVerifierPlonk is IVerifier {
mstore(VK_GATE_SETUP_4_Y_SLOT, 0x1ac2f036e3de6e4a9bacd5eacc778fa3fbdf5fd4b06e551038c704adecbeb639)
mstore(VK_GATE_SETUP_5_X_SLOT, 0x048e2130f16d54d7e07df66330b4d892753b5141ecacb4007573d9ea4a8ff028)
mstore(VK_GATE_SETUP_5_Y_SLOT, 0x13a3819d4cb80114e51de741a5fb48ce4ba20e82c5d39d16f70ca0461f49a131)
mstore(VK_GATE_SETUP_6_X_SLOT, 0x270854888de4cbcb787110e1b036811546d4b674b599e664d6f1b27c98d07982)
mstore(VK_GATE_SETUP_6_Y_SLOT, 0x04d33456342a1fa5f7eab876d0c1bb47c7fa366a125f858c7e03a4d6b39eff71)
mstore(VK_GATE_SETUP_6_X_SLOT, 0x133985cd37d7e76cbe8a87b9eddbc637916035656b2cfe776a2c4a6c23ae938b)
mstore(VK_GATE_SETUP_6_Y_SLOT, 0x060b7c13eb18593c67a6cd94f24b8403dd97157a3f4096d1ce3c1e9b2fb53c12)
mstore(VK_GATE_SETUP_7_X_SLOT, 0x1affeacdceb1b6f018bbb6762bb5aebcd54c3e24801ce01d06146d1bf0938b2c)
mstore(VK_GATE_SETUP_7_Y_SLOT, 0x19a277dd9eaac40538f3177e3390ec21d097f88afb04158dd59e963a327fe9da)

Expand Down
Loading