Skip to content

[executor] cross-chain chain_id partitioning is dead code in v0.1 BSC-only scope #207

@obchain

Description

@obchain

PR: #45 (feat/20-multi-liq-batcher)
File: crates/charon-executor/src/batcher.rs, plan() and test different_chains_produce_separate_batches

plan() partitions opportunities by chain_id using a HashMap. CLAUDE.md states: 'Venus protocol on BNB Chain only. Multi-chain/multi-protocol expansion is a config change later, not a rewrite.' In v0.1, all scanner-produced opportunities will have chain_id = 56. The per-chain partitioning logic and the test exercising chain_id = 1 (Ethereum mainnet) are dead code for the current scope.

Impact: Dead code increases maintenance surface. The test different_chains_produce_separate_batches passes chain_id = 1 opportunities that will never appear in v0.1 scanner output, creating false coverage confidence for an untested and out-of-scope code path. Any bug in cross-chain ordering or grouping will be silently carried until multi-chain expansion.

Fix: Remove the HashMap partitioning and the cross-chain test. Replace with a direct assertion that all input opportunities share chain_id = 56 (returning an error or filtering for anything else), deferring the multi-chain expansion to the milestone that introduces it. This matches CLAUDE.md's 'config change later, not a rewrite' model.

Refs #45

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinglayer:rustRust crates (core / scanner / protocols / executor / cli)pr-reviewFindings from PR review processpriority:p1-coreCore MVP scopestatus:readyScoped and ready to pick up

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions