Skip to content

light node: Transaction returning null until second try. #24101

@JoeGruffins

Description

@JoeGruffins

We are testing with a private network. Two snap sync nodes and two light nodes using the proof of authority "clique" to mine blocks. Light nodes sometimes do not find transactions until the second time you ask for them.

[harness-ctl]$ ./gamma attach --exec 'eth.getTransaction("0xb2846bb0c1b97c22ff2f886ed0e5ca383e054b5830abdacb7066c1daa14ec7a9")'
null
[harness-ctl]$ ./gamma attach --exec 'eth.getTransaction("0xb2846bb0c1b97c22ff2f886ed0e5ca383e054b5830abdacb7066c1daa14ec7a9")'
{
  accessList: [],
  blockHash: "0x045666f2a4c7c5e077065b182f97538c93ba935c95ab13476b25c87fbaf3238b",
  blockNumber: 221,
  chainId: "0x2a",
  from: "0xdd93b447f7ebca361805ebe056259853f3912e04",
  gas: 21000,
  gasPrice: 2000000000,
  hash: "0xb2846bb0c1b97c22ff2f886ed0e5ca383e054b5830abdacb7066c1daa14ec7a9",
  input: "0x",
  maxFeePerGas: 2000000000,
  maxPriorityFeePerGas: 2000000000,
  nonce: 45,
  r: "0x640cc950e3a71cc1cb5a487a62edd9b778d178ea24da2fb22de4f6dad23076ea",
  s: "0x4507a46a4f4a1f2d40d2de89039f81fd09ac254b313d67b50c927995614c6ac5",
  to: "0x8d83b207674bfd53b418a6e47da148f5bfecc652",
  transactionIndex: 0,
  type: "0x2",
  v: "0x0",
  value: 1000000000
}

This only seems to happen very rarely. I do not know how to reproduce. We're using "clique" with a one second period if that would matter.

edit: Originally it seemed to be connected to fetching the block separately but that does not seem so. Title also edited to reflect the revelation that asking for it twice finds it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions