wip: native l2 bridge adapter#765
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 5a538c6. Configure here.
| log_wallet_status( | ||
| l1_provider.as_ref(), | ||
| wallet_address, | ||
| config.source.chain_id, |
There was a problem hiding this comment.
Wrong chain_id used for OP Stack wallet metrics
Medium Severity
log_wallet_status for OP Stack satellites passes config.source.chain_id (World Chain, e.g. 480) as the chain_id metric label, but the provider is the L1 provider. Every other satellite type correctly passes the chain ID matching the provider where transactions are sent (sat_config.destination_chain_id). This causes the L1 wallet balance metric to be recorded under the World Chain chain ID, making monitoring dashboards incorrect and potentially hiding low-balance alerts for the L1 relay wallet.
Reviewed by Cursor Bugbot for commit 5a538c6. Configure here.
| chain_id = sat_config.destination_chain_id, | ||
| "registered satellite" | ||
| ); | ||
| } |
There was a problem hiding this comment.
Missing periodic wallet metrics task for OP Stack
Low Severity
The OP Stack satellite setup calls log_wallet_status but never calls spawn_wallet_metrics_task, unlike every other satellite type (permissioned and Ethereum MPT). This means the L1 relay wallet balance won't be periodically updated in metrics after the initial log, potentially hiding a depleted wallet from monitoring.
Reviewed by Cursor Bugbot for commit 5a538c6. Configure here.


Note
High Risk
Changes cross-chain state delivery and trust boundaries (dispute game + MPT on L1, rollup messenger auth on L2); misconfiguration of L1 sender/messenger or relay addresses could block or mis-route bridged state.
Overview
Adds a native OP Stack path to bridge World ID state to L2s (e.g. Base): World Chain is still proven on L1 via dispute game + MPT, then
EthereumMPTGatewayAdapter.forwardToL2re-verifies and sends the commitment delta throughL1CrossDomainMessengerto a newOpStackGatewayAdapteron L2, which only trusts the messenger + configured L1 MPT adapter asxDomainMessageSenderand achainHead(bytes32)attribute.Contracts: new
OpStackGatewayAdapter,InvalidCrossDomainSender, deploy script wiring (opStackGatewayconfig/salt,_l1GatewayAddrtracking, L1-before-L2 deploy guards), staging config for ethereum+base. Relay:op_stack_gatewaysconfig,OpStackSatellite, and L1send_forward_to_l2_txalongside existing satellite types. Tests: e2e + auth failure cases withMockCrossDomainMessenger.Reviewed by Cursor Bugbot for commit 5a538c6. Configure here.