Skip to content

[submit] Internal retry-on-timeout owns staleness decision the pipeline must own #197

@obchain

Description

@obchain

Refs #44

File: crates/charon-executor/src/submit.rs

Problem

submit() retries once on timeout. 6s timeout + 1 retry = 12s wait window = 4 BSC blocks. After the first timeout, the opportunity's health factor, gas ceiling, and competitor liquidation status are all stale. The submitter cannot know whether retrying is safe — only the pipeline, which holds the opportunity snapshot, deadline, and current chain head, can make that decision.

The retry also masks transient connectivity issues that the pipeline should observe via metrics.

Fix

Remove internal retry. Return SubmitError::Timeout on first 6s timeout. Caller decides whether to re-simulate, re-broadcast with bumped fee, or drop. Document that submit() is single-shot.

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