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

Gitcoin Bounty - eth_getLogs returns wrong blockHash #1

Open
WalterBlueu opened this issue Jan 12, 2023 · 1 comment
Open

Gitcoin Bounty - eth_getLogs returns wrong blockHash #1

WalterBlueu opened this issue Jan 12, 2023 · 1 comment
Assignees
Labels
Gitcoin Gitcoin Bounty

Comments

@WalterBlueu
Copy link

Judging Criteria

You will be provided with resources (if available) as an aid to help you get started. The sole act of submitting content for the bounty does not automatically qualify you for the bounty. Our team will review all submissions and will choose the submission whose content best fits the needs and requirements of the bounty.

Only one participant will be selected as the winner for the bounty, and they will be notified within 7 working days after the bounty has ended.

Description

Amount of Bounty

Grant Sponsor: XDC Community. All monies paid will be in XDC.

What will you be doing?

We are looking for a Go developer with experience on the XDC Network who can help to fix an issue where the RPC node on the XDC Network is returning the wrong blockHash when calling method eth_getLogs.

Details

request:

curl -s -X POST https://arpc.apothem.network/ -H "Content-Type: application/json" -d '
{
    "id": 1610,
    "jsonrpc": "2.0",
    "method": "eth_getLogs",
    "params": [
        {
            "address": "0x53350795c11cee781a7e174479778f848d76ab2a",
            "fromBlock": "0x22b2277",
            "toBlock": "0x22b2277",
            "topics": [
                [
                    "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
                    "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
                    "0x6a12b3df6cba4203bd7fd06b816789f87de8c594299aed5717ae070fac781bac"
                ]
            ]
        }
    ]
}' | jq

response:

{
  "jsonrpc": "2.0",
  "id": 1610,
  "result": [
    {
      "address": "xdc53350795c11cee781a7e174479778f848d76ab2a",
      "topics": [
        "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
        "0x0000000000000000000000000000000000000000000000000000000000000000",
        "0x000000000000000000000000ce77393582d39048a4fc73770ab19d2b239c45dd"
      ],
      "data": "0x000000000000000000000000000000000000000000084595161401484a000000",
      "blockNumber": "0x22b2277",
      "transactionHash": "0xbebc0bab1a0f9844b86b8edf3a169bb1eef9337ac8d2684d5ae758b6521c12fe",
      "transactionIndex": "0x1",
      "blockHash": "0x194a513ea40c94fccaca470cccb24c2ff3bd6398dec9a04e3eb3a4bfef8a330e",
      "logIndex": "0x2",
      "removed": false
    }
  ]
}

The right blockHash should be 0xe8ec0bfc021f839fd0a69ae89689e309632af2cc434e8a096732068f0736864b according to https://explorer.apothem.network/blocks/0x22b2277#transactions. The blockHash 0x194a513ea40c94fccaca470cccb24c2ff3bd6398dec9a04e3eb3a4bfef8a330e in response is wrong.

Total Prize of Bounty

Total sum of up to $5000.00 USD worth of XDC for this event, reward amount assigned at judge's discretion.

Resources

These are some of the resources you have available to you where you will find the necessary information to complete your submission.

Apothem Test Network

https://www.apothem.network/

Apothem Faucet

https://faucet.apothem.network/

xdc.dev

https://www.xdc.dev/

@WalterBlueu WalterBlueu added the Gitcoin Gitcoin Bounty label Jan 12, 2023
@WalterBlueu WalterBlueu self-assigned this Jan 12, 2023
@0xsant
Copy link

0xsant commented Feb 28, 2023

I will fix the bug by implementing EIP-234 Add blockHash option to eth_getLogs ,please give me confirmation to work on this bug or this bounty Expired ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Gitcoin Gitcoin Bounty
Projects
None yet
Development

No branches or pull requests

2 participants