Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"eth.getBlock('Pending')" request returns 0 instead of transactions that will be included in the next block #1847

Open
oleksandrSydorenkoJ opened this issue Mar 11, 2024 · 0 comments
Assignees
Labels
bug Something isn't working epic:eth-compatibility

Comments

@oleksandrSydorenkoJ
Copy link

oleksandrSydorenkoJ commented Mar 11, 2024

Describe the bug
Due to the block mining time in Skaled and for optimizing performance costs, Skaled has reduced the usage of the 'pending' tag in the 'eth_getBlockByNumber' JSON-RPC call, resulting in some behavior differences from Ethereum.
This issue is also relevant for other JSON-RPC calls, such as eth_getBlockByNumber, eth_getBlockTransactionCountByNumber, eth_getTransactionByBlockNumberAndIndex, etc where the "pending" tag used.

Versions
Skaled: 3.18.0

Environment:
Active Schain medium type 16 nodes
Endpoint to Schain
Adress with Sfuel on balance

To Reproduce

  1. Send transaction sfuel transfer to schain
  2. Send eth.getBlock('pending') call to the chain until the transaction mined and save the block number NNN
  3. Check block with call eth.getBlock(NNN)

Expected behavior
The pending block should contain pending transactions from the next block.

Actual state:
The pending block always contains 0 transactions

Logs

> eth.getBlock('pending')
{
  author: "0xd2ba3e0000000000000000000000000000000000",
  boundary: "0x0000000000000000000000000000000000000000000000000000000000000000",
  difficulty: 0,
  extraData: "0x",
  gasLimit: 268435455,
  gasUsed: 0,
  hash: "0x8637a60b42c801fbdc283fe8a992fb8b6a41a09dd6fe8ade3bf66425a84a1b8d",
  logsBloom: "",
  miner: "0xd2ba3e0000000000000000000000000000000000",
  mixHash: "0x0000000000000000000000000000000000000000000000000000000000000000",
  nonce: "0x0000000000000000",
  number: 1111346,
  parentHash: "0x7e320f344b4d17932d3ef518a1ee50aecec4127d35195fb63ab33406b982fca3",
  receiptsRoot: "0x0000000000000000000000000000000000000000000000000000000000000000",
  seedHash: "0xeada66563356d409600b12a514e79a41ce5763fcf7928810226e3dce57fb9668",
  sha3Uncles: "0x0000000000000000000000000000000000000000000000000000000000000000",
  size: 0,
  stateRoot: "0xabccb81fdac5f5048001e41e60ec001da6fd219047eddfd8e8fed6995246bfd9",
  timestamp: 1710164722,
  totalDifficulty: 1.15792089237316195423570985008687907853269984665640564039457584007913129639935e+77,
  transactions: [],
  transactionsRoot: "0x0000000000000000000000000000000000000000000000000000000000000000",
  uncles: []
}

> eth.getBlock('latest')
{
  author: "0xd2ba3e0000000000000000000000000000000000",
  boundary: "0x0000000000000000000000000000000000000000000000000000000000000000",
  difficulty: 0,
  extraData: "0x736b616c65",
  gasLimit: 268435455,
  gasUsed: 21000,
  hash: "0x1d1688008f1fc1c13fdb664afc9f1c0c417478c0d1bcdb526c8025cf34281ae4",
  logsBloom: "",
  miner: "0xd2ba3e0000000000000000000000000000000000",
  mixHash: "0x0000000000000000000000000000000000000000000000000000000000000000",
  nonce: "0x0000000000000000",
  number: 1111346,
  parentHash: "0x7e320f344b4d17932d3ef518a1ee50aecec4127d35195fb63ab33406b982fca3",
  receiptsRoot: "0x056b23fbba480696b65fe5a59b8f2148a1299103c4f57df839233af2cf4ca2d2",
  seedHash: "0xeada66563356d409600b12a514e79a41ce5763fcf7928810226e3dce57fb9668",
  sha3Uncles: "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
  size: 582,
  stateRoot: "0xabccb81fdac5f5048001e41e60ec001da6fd219047eddfd8e8fed6995246bfd9",
  timestamp: 1710164721,
  totalDifficulty: 0,
  transactions: ["0xf6a858e551f915378b93a98196c214bbc2aa840a9c4ed8783694d4e0c969c8d5"],
  transactionsRoot: "0xa4547dc7bad7706cbd14a521df5a92df961305315ff6b25a85eda524992bbb50",
  uncles: []
}


@oleksandrSydorenkoJ oleksandrSydorenkoJ changed the title "eth_getBlockByNumber ('Pending')" request returns 0 instead of transactions that will be included in the next block "eth.getBlock('Pending')" request returns 0 instead of transactions that will be included in the next block Mar 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working epic:eth-compatibility
Projects
Status: No status
Development

No branches or pull requests

2 participants