Skip to content

Keeper bot: juror drawing fails due to per-tx gas limit exceeded #2501

Description

@Parsa-Darbouy

Summary

The keeper bot fails when drawing jurors because the transaction gas limit exceeds the chain’s maximum per-tx gas limit. As a result, juror drawing does not run and disputes can remain stuck in the drawing phase.

Error example

{
  "type": "ProviderError",
  "message": "exceeds maximum per-tx gas limit: 50000000 > 25000000",
  "name": "ProviderError",
  "code": -32000,
  "_isProviderError": true
}

Stack (trimmed):

ProviderError: exceeds maximum per-tx gas limit: 50000000 > 25000000
    at HttpProvider.request (...)
    at HardhatEthersSigner.sendTransaction (...)
    at Proxy.draw (...)
    at drawJurors (contracts/scripts/keeperBot.ts)
    at main (contracts/scripts/keeperBot.ts)

Root cause

In contracts/scripts/keeperBot.ts, draw() (and related high-gas calls such as execute) use a hardcoded gas limit:

const HIGH_GAS_LIMIT = { gasLimit: 50_000_000 }; // 50M gas

The target chain rejects transactions whose gasLimit is above 25,000,000 (MaxTxGasLimit). The provider therefore rejects the tx before it is submitted, so no jurors are drawn.

Possible fix

Lower HIGH_GAS_LIMIT so it stays within the chain’s max per-tx gas limit, for example:

const HIGH_GAS_LIMIT = { gasLimit: 25_000_000 }; // Must stay <= chain MaxTxGasLimit

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Fields

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions