Skip to content

Zksync os with kl medium interop#1949

Open
kelemeno wants to merge 1042 commits intodraft-v31from
zksync-os-with-kl-medium-interop
Open

Zksync os with kl medium interop#1949
kelemeno wants to merge 1042 commits intodraft-v31from
zksync-os-with-kl-medium-interop

Conversation

@kelemeno
Copy link
Contributor

@kelemeno kelemeno commented Jan 6, 2026

What ❔

Why ❔

Checklist

  • PR title corresponds to the body of PR (we generate changelog entries from PRs).
  • Tests for the changes have been added / updated.
  • Documentation comments have been added / updated.

kelemeno and others added 30 commits October 17, 2025 10:52
…contracts into kl/14-10-25/remove-timeframe-assumption
Signed-off-by: Danil <deniallugo@gmail.com>

# Conflicts:
#	AllContractsHashes.json
#	l1-contracts/deploy-scripts/DeployCTM.s.sol
#	l1-contracts/deploy-scripts/RegisterZKChain.s.sol
#	l1-contracts/deploy-scripts/upgrade/DefaultEcosystemUpgrade.s.sol
#	l1-contracts/deploy-scripts/upgrade/EcosystemUpgrade_v26_1.s.sol
#	l1-contracts/deploy-scripts/upgrade/EcosystemUpgrade_v28.s.sol
Signed-off-by: Danil <deniallugo@gmail.com>

# Conflicts:
#	l1-contracts/deploy-scripts/DeployL2Contracts.sol
#	l1-contracts/deploy-scripts/gateway/GatewayCTMFromL1.s.sol
#	l1-contracts/deploy-scripts/gateway/GatewayGovernanceUtils.s.sol
Signed-off-by: Danil <deniallugo@gmail.com>
Signed-off-by: Danil <deniallugo@gmail.com>
Signed-off-by: Danil <deniallugo@gmail.com>
Signed-off-by: Danil <deniallugo@gmail.com>
Signed-off-by: Danil <deniallugo@gmail.com>
Signed-off-by: Danil <deniallugo@gmail.com>
Signed-off-by: Danil <deniallugo@gmail.com>
Signed-off-by: Danil <deniallugo@gmail.com>
Signed-off-by: Danil <deniallugo@gmail.com>
Signed-off-by: Danil <deniallugo@gmail.com>
Signed-off-by: Danil <deniallugo@gmail.com>
Deniallugo and others added 25 commits December 19, 2025 18:58
Signed-off-by: Danil <deniallugo@gmail.com>
Signed-off-by: Danil <deniallugo@gmail.com>
Signed-off-by: Danil <deniallugo@gmail.com>
Signed-off-by: Danil <deniallugo@gmail.com>
Signed-off-by: Danil <deniallugo@gmail.com>
Signed-off-by: Danil <deniallugo@gmail.com>
Signed-off-by: Danil <deniallugo@gmail.com>
Signed-off-by: Danil <deniallugo@gmail.com>
Signed-off-by: Danil <deniallugo@gmail.com>
Signed-off-by: Danil <deniallugo@gmail.com>
Signed-off-by: Danil <deniallugo@gmail.com>
Signed-off-by: Danil <deniallugo@gmail.com>
Signed-off-by: Danil <deniallugo@gmail.com>
Signed-off-by: Danil <deniallugo@gmail.com>
Signed-off-by: Danil <deniallugo@gmail.com>
Signed-off-by: Danil <deniallugo@gmail.com>
Signed-off-by: Danil <deniallugo@gmail.com>
Signed-off-by: Danil <deniallugo@gmail.com>
Signed-off-by: Danil <deniallugo@gmail.com>
Signed-off-by: Danil <deniallugo@gmail.com>
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e1ce9d4c35

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +29 to +31
/// @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.

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 👍 / 👎.

Comment on lines +272 to +274
// 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}("");

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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants