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

Fix: eth_estimateGas error when providing gas field #1741

Merged
merged 1 commit into from
Sep 14, 2023

Conversation

AlfredoG87
Copy link
Collaborator

@AlfredoG87 AlfredoG87 commented Sep 13, 2023

Description:
HotFix is being applied into 0.31 via this PR #1740

Addresses Issue 1738 by formatting gas field before sending the tx data to the mirror-node contracts/call endpoint.

Mirror node is expecting a decimal number, and relay is getting a Hex string of the number.

Related issue(s):

Fixes #1738

Notes for reviewer:

I've verified and there are no other fields that need correct transformation from hex string to decimal number.
(see doc api of mirror node)

image

Checklist

  • Documented (Code comments, README, etc.)
  • Tested (unit, integration, etc.)

… mirror node

Signed-off-by: Alfredo Gutierrez <alfredo@swirldslabs.com>
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@codecov-commenter
Copy link

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.01% 🎉

Comparison is base (4b4e416) 76.83% compared to head (f73e2a3) 76.85%.

❗ Current head f73e2a3 differs from pull request most recent head bbd29ce. Consider uploading reports for the commit bbd29ce to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1741      +/-   ##
==========================================
+ Coverage   76.83%   76.85%   +0.01%     
==========================================
  Files          39       39              
  Lines        2914     2916       +2     
  Branches      585      586       +1     
==========================================
+ Hits         2239     2241       +2     
  Misses        496      496              
  Partials      179      179              
Files Changed Coverage Δ
packages/relay/src/lib/eth.ts 85.79% <100.00%> (+0.03%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@AlfredoG87 AlfredoG87 marked this pull request as ready for review September 13, 2023 21:27
@AlfredoG87 AlfredoG87 requested review from ebadiere, lukelee-sl and a team as code owners September 13, 2023 21:27
@AlfredoG87 AlfredoG87 self-assigned this Sep 13, 2023
@AlfredoG87 AlfredoG87 added bug Something isn't working P1 labels Sep 13, 2023
@AlfredoG87 AlfredoG87 modified the milestones: 0.31.0, 0.32.0 Sep 13, 2023
@AlfredoG87 AlfredoG87 merged commit f128c3c into main Sep 14, 2023
@AlfredoG87 AlfredoG87 deleted the 1738-hot-fix-into-main branch September 14, 2023 01:00
ebadiere pushed a commit that referenced this pull request Sep 18, 2023
Adding 'gas' field to formatting before relaying the call data to the mirror node
Signed-off-by: Alfredo Gutierrez <alfredo@swirldslabs.com>
Signed-off-by: ebadiere <ebadiere@gmail.com>
ebadiere pushed a commit that referenced this pull request Sep 20, 2023
Adding 'gas' field to formatting before relaying the call data to the mirror node
Signed-off-by: Alfredo Gutierrez <alfredo@swirldslabs.com>
Signed-off-by: ebadiere <ebadiere@gmail.com>
mshakeg pushed a commit to mshakeg/hedera-json-rpc-relay that referenced this pull request Oct 18, 2023
Adding 'gas' field to formatting before relaying the call data to the mirror node
Signed-off-by: Alfredo Gutierrez <alfredo@swirldslabs.com>
Signed-off-by: Mo Shaikjee <shaikjeemohammed@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P1
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

eth_estimateGas is returning 400 error sometimes
3 participants