Skip to content
This repository was archived by the owner on Apr 23, 2026. It is now read-only.
This repository was archived by the owner on Apr 23, 2026. It is now read-only.

txpool_content method crashes with 'method handler crashed' error #811

@cshintov

Description

@cshintov

Bug Description

The txpool_content RPC method crashes with error code -32000 "method handler crashed" when called on a BSC mainnet archive node running Erigon v1.4.3.

Environment

  • Version: erigon/1.4.3/linux-amd64/go1.24.11 (commit: 1.4.3-dev-4a9d2ee4)
  • Network: BSC Mainnet
  • Node Type: Archive (--prune.mode archive)
  • API Configuration: --http.api eth,debug,net,trace,web3,erigon,txpool

Steps to Reproduce

  1. Start bsc-erigon v1.4.3 with archive mode and txpool API enabled
  2. Call the txpool_content method:
curl -X POST -H "Content-Type: application/json" \
  --data '{"jsonrpc":"2.0","method":"txpool_content","params":[],"id":1}' \
  http://localhost:8545

Expected Behavior

The method should return transaction pool content with pending, baseFee, and queued transactions, similar to:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "pending": {...},
    "baseFee": {...},
    "queued": {...}
  }
}

Actual Behavior

The method crashes and returns:

{"jsonrpc":"2.0","id":1,"error":{"code":-32000,"message":"method handler crashed"}}

Additional Context

  • Other txpool methods work fine:
    • txpool_status returns: {"pending":"0x3e7","baseFee":"0x0","queued":"0x80"}
  • The txpool API is properly initialized and enabled
  • The crash appears to be in the Content() method implementation in rpc/jsonrpc/txpool_api.go
  • Possible crash points:
    • api.db.BeginTemporalRo(ctx) - database handle initialization issue
    • newRPCPendingTransaction() - transaction formatting bug

Impact

This affects production BSC RPC providers who need to expose txpool_content for their users. The method is documented as available but crashes in practice.

Code Reference

Implementation: https://github.com/node-real/bsc-erigon/blob/v1.4.3/rpc/jsonrpc/txpool_api.go#L48-L115

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions