Skip to content

share rate limiter is global, drops shares silently #226

Description

@rx18-eng

Body

SHARE_TIMESTAMPS and IS_RATE_LIMITED in src/translator/utils.rs:23-29 are lazy_static! globals. every downstream's check_share_rate_limit task hits the same counter.

  • one miner filling the 70/min window throttles every other miner on the proxy. allow_submit_share() returns false for all of them.
  • when bridge drops a rate-limited share at bridge.rs:304-309, it logs a warn and returns Ok(()). no rejection record, no stat bump. but update_accepted_shares already fired in downstream.rs:handle_submit, so accepted counts drift above what the pool got.
  • every per-downstream task reacts to the global flag by calling try_update_difficulty_settings on its own miner. one noisy miner makes every quiet miner bump diff too.

not a dup, searched for rate limit / 70 shares / silently drop / SHARE_TIMESTAMPS / allow_submit_share, only PR #109 (introduced this) and PR #218 (unrelated) come up (related to #152 but separate - #152 is inside validate_share, this is in the bridge drop path after validate_share already passed.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions