Skip to content
New issue

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

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

Already on GitHub? # to your account

[hmyv2_getTransactionReceipt] - new effectiveGasPrice field is crashing RPC receipt calls for the old transactions after update to the v2025.0.0 #4843

Open
samhsiung opened this issue Feb 6, 2025 · 5 comments

Comments

@samhsiung
Copy link
Contributor

samhsiung commented Feb 6, 2025

Describe the bug

hmyv2_getTransactionReceipt is returning:
{'jsonrpc': '2.0', 'id': 1, 'error': {'code': -32000, 'message': 'method handler crashed'}}

To Reproduce

Python code:

>>> hash = '0xb50c907dcdf2673a2c96d6469754f5c8b67cdb7426322797c179a3aa28f1764e'
>>> params = [hash]
>>> JSONRPC_ENDPOINT = "https://api.harmony.one"
>>> payload = {
...         "method": "hmyv2_getTransactionReceipt",
...         "params": params,
...         "jsonrpc": "2.0",
...         "id": 1,
...     }
>>> import json
>>> import requests
>>> response = requests.post(JSONRPC_ENDPOINT, json=payload).json()
>>> response
{'jsonrpc': '2.0', 'id': 1, 'error': {'code': -32000, 'message': 'method handler crashed'}}
>>>

Expected behavior
Should not return an error

Screenshots
If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

  • OS: [Linux, MacOS]
  • Go environment [ go env ]

Additional context
Add any other context about the problem here.

@mur-me
Copy link
Collaborator

mur-me commented Feb 6, 2025

Hello @samhsiung,

First of all, thanks for notifying us about the issue you faced!

Main initial investigation:

  • It looks like that new field effectiveGasPrice gives us issue for the old blocks, like 0xb50c907dcdf2673a2c96d6469754f5c8b67cdb7426322797c179a3aa28f1764e that were produced before binary update.
  • if you try something recent - 0xa65fc596d2a82a4c7bff56bf46330ae27bb814a3840b6fe751f7b597c9504401 it will be processed successfully.

@Frozen, please take a look on this 🙏

As a current mitigation measure of the issue that you have, please try to use https://a.api.s0.t.hmny.io, it still have an old binary.

Sorry for any inconvenience! 🙏

@samhsiung
Copy link
Contributor Author

Thanks, I tried https://a.api.s0.t.hmny.io and it does work for half the hashes I encountered but it also failed for other ones like this:

>>> def test():
...     hash = '0xb50c907dcdf2673a2c96d6469754f5c8b67cdb7426322797c179a3aa28f1764e'
...     params = [hash]
...     JSONRPC_ENDPOINT = "https://a.api.s0.t.hmny.io"
...     payload = {
...             "method": "hmyv2_getTransactionReceipt",
...             "params": params,
...             "jsonrpc": "2.0",
...             "id": 1,
...     }
...     import json
...     import requests
...     response = requests.post(JSONRPC_ENDPOINT, json=payload).json()
...     return response
...
>>> test()
{'jsonrpc': '2.0', 'id': 1, 'error': {'code': -32000, 'message': 'method handler crashed'}}

@mur-me
Copy link
Collaborator

mur-me commented Feb 6, 2025

Hello @samhsiung,

We are aware about the issue and have done an initial investigation and preparing a fix.

Please use a mitigation with retry mechanism -> don't go to the next transaction until you get the info for the previous one without error.

@mur-me
Copy link
Collaborator

mur-me commented Feb 7, 2025

Work on the fix started in #4844

@mur-me mur-me changed the title hmyv2_getTransactionReceipt crashing [hmyv2_getTransactionReceipt] - new effectiveGasPrice field is crashing RPC receipt calls for the old transactions after update to the v2025.0.0 Feb 7, 2025
@sophoah
Copy link
Contributor

sophoah commented Feb 12, 2025

@mur-me @Frozen issue is not only localized to staking transaction, here is one that also fails not related to staking:
https://explorer.harmony.one/tx/0xdc05ef17167e50746954b0b1efbb5d23e046ad1acf694b2e30590c8405e82d4b?shard=0

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants