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

feat: block gas limit should be 30_000_000 #2938

Merged
merged 5 commits into from
Sep 9, 2024

Conversation

natanasow
Copy link
Collaborator

@natanasow natanasow commented Sep 4, 2024

Description:

When querying block information, the block gasLimit is shown as 15M GAS (15000000). The correct value should be 30M GAS (30000000). This happens for all public networks (mainnet, testnet and previewnet).

Related issue(s):

Fixes #2740

Notes for reviewer:

We were using max gas per sec as a block limit gas which is incorrect. In the hedera ecosystem, there is a limit of up to 15 000 000 gas per sec (here) which means that a single transaction could use max 15 000 000 as a gas limit. Meanwhile one "block" is generated every 2 seconds which means that max block gas is 30 0000 000 = 15 000 000 per sec * 2 sec.

Checklist

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

@natanasow natanasow self-assigned this Sep 4, 2024
@natanasow natanasow added this to the 0.56.0 milestone Sep 4, 2024
@natanasow natanasow added the bug Something isn't working label Sep 4, 2024
Copy link

github-actions bot commented Sep 4, 2024

Tests

       3 files     272 suites   20s ⏱️
1 276 tests 1 275 ✔️ 1 💤 0
1 288 runs  1 287 ✔️ 1 💤 0

Results for commit 29c7b79.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Sep 4, 2024

Acceptance Tests

     21 files  295 suites   31m 19s ⏱️
   605 tests 594 ✔️   4 💤   7
1 004 runs  984 ✔️ 10 💤 10

Results for commit 29c7b79.

♻️ This comment has been updated with latest results.

@natanasow natanasow marked this pull request as ready for review September 4, 2024 09:14
Copy link

sonarqubecloud bot commented Sep 9, 2024

@natanasow natanasow merged commit df4d02e into main Sep 9, 2024
43 checks passed
@natanasow natanasow deleted the 2740-block-gaslimit-should-be-30000000 branch September 9, 2024 12:25
Copy link

codecov bot commented Sep 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.40%. Comparing base (559285b) to head (29c7b79).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff            @@
##             main    #2938    +/-   ##
========================================
  Coverage   84.39%   84.40%            
========================================
  Files          40       56    +16     
  Lines        3057     3770   +713     
  Branches      632      771   +139     
========================================
+ Hits         2580     3182   +602     
- Misses        276      351    +75     
- Partials      201      237    +36     
Flag Coverage Δ
relay 84.48% <100.00%> (+0.09%) ⬆️
server 83.05% <ø> (?)
ws-server 97.87% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
packages/relay/src/lib/clients/sdkClient.ts 56.06% <100.00%> (ø)
packages/relay/src/lib/constants.ts 90.69% <ø> (ø)
packages/relay/src/lib/errors/JsonRpcError.ts 70.58% <ø> (ø)
packages/relay/src/lib/eth.ts 81.44% <100.00%> (+0.34%) ⬆️
packages/relay/src/lib/precheck.ts 91.26% <100.00%> (ø)

... and 16 files with indirect coverage changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Block gaslimit should be 30000000 GAS
3 participants