Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Light node: getTransactionByHash return blockNumber null even after tx is included in block #10490

Closed
amaury1093 opened this issue Mar 19, 2019 · 1 comment
Labels
F2-bug 🐞 The client fails to follow expected behavior. M6-rpcapi 📣 RPC API. P2-asap 🌊 No need to stop dead in your tracks, however issue should be addressed as soon as possible.
Milestone

Comments

@amaury1093
Copy link
Contributor

amaury1093 commented Mar 19, 2019

Before filing a new issue, please provide the following information.

  • Parity Ethereum version: 2.4.0
  • Operating system: MacOS & Linux
  • Installation: homebrew
  • Fully synchronized: yes
  • Network: ropsten & kovan
  • Restarted: yes

Repro

  • On a light node
  • Send a transaction, remember its hash
  • Poll eth_getTransactionByHash every 1 second

Expected

  • After some time, the blockNumber field in the response should be non-null

Actual

  • Always null, even after >20 blocks, and the transaction shows up correctly on etherscan.

Other Notes

  • Tried on ropsten & kovan, same behavior
  • It's only happening with a light node. On a full-node, after a couple of polls, the blockNumber is non-null as expected.
@amaury1093 amaury1093 added the F2-bug 🐞 The client fails to follow expected behavior. label Mar 19, 2019
@Tbaut Tbaut added P2-asap 🌊 No need to stop dead in your tracks, however issue should be addressed as soon as possible. M6-rpcapi 📣 RPC API. labels Mar 19, 2019
@Tbaut Tbaut added this to the 2.5 milestone Mar 19, 2019
@niklasad1 niklasad1 self-assigned this Mar 19, 2019
@niklasad1
Copy link
Collaborator

Hey,

Because the block data is only retrieved with a fixed interval currently every 10th minute it could take 10 minutes to get that data filled after the transaction occurs in a block. We should probably change that do adapt when for example doing a RPC request.

However, I could verify that the block data is eventually filled:

sending transaction: 0xe41655e7791d94991440ae909c94102fc3a5aa81c00f5802fd4897d9f07f1c83
Ok(Some(Transaction { hash: 0xe41655e7791d94991440ae909c94102fc3a5aa81c00f5802fd4897d9f07f1c83, nonce: 2, block_hash: None, block_number: None, transaction_index: None, from: 0x510042dcbba1e1da98282562909d7fa49bf7cae4, to: Some(0x0000000000000000000000000000000000000000), value: 1337, gas_price: 1000000000, gas: 2666666, input: Bytes([1, 2, 3]) }))
Ok(Some(Transaction { hash: 0xe41655e7791d94991440ae909c94102fc3a5aa81c00f5802fd4897d9f07f1c83, nonce: 2, block_hash: None, block_number: None, transaction_index: None, from: 0x510042dcbba1e1da98282562909d7fa49bf7cae4, to: Some(0x0000000000000000000000000000000000000000), value: 1337, gas_price: 1000000000, gas: 2666666, input: Bytes([1, 2, 3]) }))
Ok(Some(Transaction { hash: 0xe41655e7791d94991440ae909c94102fc3a5aa81c00f5802fd4897d9f07f1c83, nonce: 2, block_hash: None, block_number: None, transaction_index: None, from: 0x510042dcbba1e1da98282562909d7fa49bf7cae4, to: Some(0x0000000000000000000000000000000000000000), value: 1337, gas_price: 1000000000, gas: 2666666, input: Bytes([1, 2, 3]) }))
Ok(Some(Transaction { hash: 0xe41655e7791d94991440ae909c94102fc3a5aa81c00f5802fd4897d9f07f1c83, nonce: 2, block_hash: None, block_number: None, transaction_index: None, from: 0x510042dcbba1e1da98282562909d7fa49bf7cae4, to: Some(0x0000000000000000000000000000000000000000), value: 1337, gas_price: 1000000000, gas: 2666666, input: Bytes([1, 2, 3]) }))
Ok(Some(Transaction { hash: 0xe41655e7791d94991440ae909c94102fc3a5aa81c00f5802fd4897d9f07f1c83, nonce: 2, block_hash: None, block_number: None, transaction_index: None, from: 0x510042dcbba1e1da98282562909d7fa49bf7cae4, to: Some(0x0000000000000000000000000000000000000000), value: 1337, gas_price: 1000000000, gas: 2666666, input: Bytes([1, 2, 3]) }))
Ok(Some(Transaction { hash: 0xe41655e7791d94991440ae909c94102fc3a5aa81c00f5802fd4897d9f07f1c83, nonce: 2, block_hash: None, block_number: None, transaction_index: None, from: 0x510042dcbba1e1da98282562909d7fa49bf7cae4, to: Some(0x0000000000000000000000000000000000000000), value: 1337, gas_price: 1000000000, gas: 2666666, input: Bytes([1, 2, 3]) }))
Ok(Some(Transaction { hash: 0xe41655e7791d94991440ae909c94102fc3a5aa81c00f5802fd4897d9f07f1c83, nonce: 2, block_hash: None, block_number: None, transaction_index: None, from: 0x510042dcbba1e1da98282562909d7fa49bf7cae4, to: Some(0x0000000000000000000000000000000000000000), value: 1337, gas_price: 1000000000, gas: 2666666, input: Bytes([1, 2, 3]) }))
Ok(Some(Transaction { hash: 0xe41655e7791d94991440ae909c94102fc3a5aa81c00f5802fd4897d9f07f1c83, nonce: 2, block_hash: None, block_number: None, transaction_index: None, from: 0x510042dcbba1e1da98282562909d7fa49bf7cae4, to: Some(0x0000000000000000000000000000000000000000), value: 1337, gas_price: 1000000000, gas: 2666666, input: Bytes([1, 2, 3]) }))
Ok(Some(Transaction { hash: 0xe41655e7791d94991440ae909c94102fc3a5aa81c00f5802fd4897d9f07f1c83, nonce: 2, block_hash: None, block_number: None, transaction_index: None, from: 0x510042dcbba1e1da98282562909d7fa49bf7cae4, to: Some(0x0000000000000000000000000000000000000000), value: 1337, gas_price: 1000000000, gas: 2666666, input: Bytes([1, 2, 3]) }))
Ok(Some(Transaction { hash: 0xe41655e7791d94991440ae909c94102fc3a5aa81c00f5802fd4897d9f07f1c83, nonce: 2, block_hash: None, block_number: None, transaction_index: None, from: 0x510042dcbba1e1da98282562909d7fa49bf7cae4, to: Some(0x0000000000000000000000000000000000000000), value: 1337, gas_price: 1000000000, gas: 2666666, input: Bytes([1, 2, 3]) }))
Ok(Some(Transaction { hash: 0xe41655e7791d94991440ae909c94102fc3a5aa81c00f5802fd4897d9f07f1c83, nonce: 2, block_hash: None, block_number: None, transaction_index: None, from: 0x510042dcbba1e1da98282562909d7fa49bf7cae4, to: Some(0x0000000000000000000000000000000000000000), value: 1337, gas_price: 1000000000, gas: 2666666, input: Bytes([1, 2, 3]) }))
Ok(Some(Transaction { hash: 0xe41655e7791d94991440ae909c94102fc3a5aa81c00f5802fd4897d9f07f1c83, nonce: 2, block_hash: None, block_number: None, transaction_index: None, from: 0x510042dcbba1e1da98282562909d7fa49bf7cae4, to: Some(0x0000000000000000000000000000000000000000), value: 1337, gas_price: 1000000000, gas: 2666666, input: Bytes([1, 2, 3]) }))
Ok(Some(Transaction { hash: 0xe41655e7791d94991440ae909c94102fc3a5aa81c00f5802fd4897d9f07f1c83, nonce: 2, block_hash: None, block_number: None, transaction_index: None, from: 0x510042dcbba1e1da98282562909d7fa49bf7cae4, to: Some(0x0000000000000000000000000000000000000000), value: 1337, gas_price: 1000000000, gas: 2666666, input: Bytes([1, 2, 3]) }))
Ok(Some(Transaction { hash: 0xe41655e7791d94991440ae909c94102fc3a5aa81c00f5802fd4897d9f07f1c83, nonce: 2, block_hash: None, block_number: None, transaction_index: None, from: 0x510042dcbba1e1da98282562909d7fa49bf7cae4, to: Some(0x0000000000000000000000000000000000000000), value: 1337, gas_price: 1000000000, gas: 2666666, input: Bytes([1, 2, 3]) }))
Ok(Some(Transaction { hash: 0xe41655e7791d94991440ae909c94102fc3a5aa81c00f5802fd4897d9f07f1c83, nonce: 2, block_hash: None, block_number: None, transaction_index: None, from: 0x510042dcbba1e1da98282562909d7fa49bf7cae4, to: Some(0x0000000000000000000000000000000000000000), value: 1337, gas_price: 1000000000, gas: 2666666, input: Bytes([1, 2, 3]) }))
Ok(Some(Transaction { hash: 0xe41655e7791d94991440ae909c94102fc3a5aa81c00f5802fd4897d9f07f1c83, nonce: 2, block_hash: None, block_number: None, transaction_index: None, from: 0x510042dcbba1e1da98282562909d7fa49bf7cae4, to: Some(0x0000000000000000000000000000000000000000), value: 1337, gas_price: 1000000000, gas: 2666666, input: Bytes([1, 2, 3]) }))
Ok(Some(Transaction { hash: 0xe41655e7791d94991440ae909c94102fc3a5aa81c00f5802fd4897d9f07f1c83, nonce: 2, block_hash: None, block_number: None, transaction_index: None, from: 0x510042dcbba1e1da98282562909d7fa49bf7cae4, to: Some(0x0000000000000000000000000000000000000000), value: 1337, gas_price: 1000000000, gas: 2666666, input: Bytes([1, 2, 3]) }))
Ok(Some(Transaction { hash: 0xe41655e7791d94991440ae909c94102fc3a5aa81c00f5802fd4897d9f07f1c83, nonce: 2, block_hash: None, block_number: None, transaction_index: None, from: 0x510042dcbba1e1da98282562909d7fa49bf7cae4, to: Some(0x0000000000000000000000000000000000000000), value: 1337, gas_price: 1000000000, gas: 2666666, input: Bytes([1, 2, 3]) }))
Ok(Some(Transaction { hash: 0xe41655e7791d94991440ae909c94102fc3a5aa81c00f5802fd4897d9f07f1c83, nonce: 2, block_hash: None, block_number: None, transaction_index: None, from: 0x510042dcbba1e1da98282562909d7fa49bf7cae4, to: Some(0x0000000000000000000000000000000000000000), value: 1337, gas_price: 1000000000, gas: 2666666, input: Bytes([1, 2, 3]) }))
Ok(Some(Transaction { hash: 0xe41655e7791d94991440ae909c94102fc3a5aa81c00f5802fd4897d9f07f1c83, nonce: 2, block_hash: None, block_number: None, transaction_index: None, from: 0x510042dcbba1e1da98282562909d7fa49bf7cae4, to: Some(0x0000000000000000000000000000000000000000), value: 1337, gas_price: 1000000000, gas: 2666666, input: Bytes([1, 2, 3]) }))
Ok(Some(Transaction { hash: 0xe41655e7791d94991440ae909c94102fc3a5aa81c00f5802fd4897d9f07f1c83, nonce: 2, block_hash: None, block_number: None, transaction_index: None, from: 0x510042dcbba1e1da98282562909d7fa49bf7cae4, to: Some(0x0000000000000000000000000000000000000000), value: 1337, gas_price: 1000000000, gas: 2666666, input: Bytes([1, 2, 3]) }))
Ok(Some(Transaction { hash: 0xe41655e7791d94991440ae909c94102fc3a5aa81c00f5802fd4897d9f07f1c83, nonce: 2, block_hash: None, block_number: None, transaction_index: None, from: 0x510042dcbba1e1da98282562909d7fa49bf7cae4, to: Some(0x0000000000000000000000000000000000000000), value: 1337, gas_price: 1000000000, gas: 2666666, input: Bytes([1, 2, 3]) }))
Ok(Some(Transaction { hash: 0xe41655e7791d94991440ae909c94102fc3a5aa81c00f5802fd4897d9f07f1c83, nonce: 2, block_hash: None, block_number: None, transaction_index: None, from: 0x510042dcbba1e1da98282562909d7fa49bf7cae4, to: Some(0x0000000000000000000000000000000000000000), value: 1337, gas_price: 1000000000, gas: 2666666, input: Bytes([1, 2, 3]) }))
Ok(Some(Transaction { hash: 0xe41655e7791d94991440ae909c94102fc3a5aa81c00f5802fd4897d9f07f1c83, nonce: 2, block_hash: None, block_number: None, transaction_index: None, from: 0x510042dcbba1e1da98282562909d7fa49bf7cae4, to: Some(0x0000000000000000000000000000000000000000), value: 1337, gas_price: 1000000000, gas: 2666666, input: Bytes([1, 2, 3]) }))
Ok(Some(Transaction { hash: 0xe41655e7791d94991440ae909c94102fc3a5aa81c00f5802fd4897d9f07f1c83, nonce: 2, block_hash: None, block_number: None, transaction_index: None, from: 0x510042dcbba1e1da98282562909d7fa49bf7cae4, to: Some(0x0000000000000000000000000000000000000000), value: 1337, gas_price: 1000000000, gas: 2666666, input: Bytes([1, 2, 3]) }))
Ok(Some(Transaction { hash: 0xe41655e7791d94991440ae909c94102fc3a5aa81c00f5802fd4897d9f07f1c83, nonce: 2, block_hash: None, block_number: None, transaction_index: None, from: 0x510042dcbba1e1da98282562909d7fa49bf7cae4, to: Some(0x0000000000000000000000000000000000000000), value: 1337, gas_price: 1000000000, gas: 2666666, input: Bytes([1, 2, 3]) }))
Ok(Some(Transaction { hash: 0xe41655e7791d94991440ae909c94102fc3a5aa81c00f5802fd4897d9f07f1c83, nonce: 2, block_hash: None, block_number: None, transaction_index: None, from: 0x510042dcbba1e1da98282562909d7fa49bf7cae4, to: Some(0x0000000000000000000000000000000000000000), value: 1337, gas_price: 1000000000, gas: 2666666, input: Bytes([1, 2, 3]) }))
Ok(Some(Transaction { hash: 0xe41655e7791d94991440ae909c94102fc3a5aa81c00f5802fd4897d9f07f1c83, nonce: 2, block_hash: None, block_number: None, transaction_index: None, from: 0x510042dcbba1e1da98282562909d7fa49bf7cae4, to: Some(0x0000000000000000000000000000000000000000), value: 1337, gas_price: 1000000000, gas: 2666666, input: Bytes([1, 2, 3]) }))
Ok(Some(Transaction { hash: 0xe41655e7791d94991440ae909c94102fc3a5aa81c00f5802fd4897d9f07f1c83, nonce: 2, block_hash: Some(0x25288181b560af3753ae07af97b19363715cd53b9d281f6518ff0466c90c83f0), block_number: Some(10588919), transaction_index: Some(7), from: 0x510042dcbba1e1da98282562909d7fa49bf7cae4, to: Some(0x0000000000000000000000000000000000000000), value: 1337, gas_price: 1000000000, gas: 2666666, input: Bytes([1, 2, 3]) }))
Ok(Some(Transaction { hash: 0xe41655e7791d94991440ae909c94102fc3a5aa81c00f5802fd4897d9f07f1c83, nonce: 2, block_hash: Some(0x25288181b560af3753ae07af97b19363715cd53b9d281f6518ff0466c90c83f0), block_number: Some(10588919), transaction_index: Some(7), from: 0x510042dcbba1e1da98282562909d7fa49bf7cae4, to: Some(0x0000000000000000000000000000000000000000), value: 1337, gas_price: 1000000000, gas: 2666666, input: Bytes([1, 2, 3]) }))

@niklasad1 niklasad1 removed their assignment Mar 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
F2-bug 🐞 The client fails to follow expected behavior. M6-rpcapi 📣 RPC API. P2-asap 🌊 No need to stop dead in your tracks, however issue should be addressed as soon as possible.
Projects
None yet
Development

No branches or pull requests

3 participants