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

Support block hash operation in modularized web3 #10148

Merged
merged 4 commits into from
Jan 17, 2025
Merged

Conversation

steven-sheehy
Copy link
Member

@steven-sheehy steven-sheehy commented Jan 16, 2025

Description:

  • Add a BlockInfo singleton to return the last 256 block hashes
  • Add a RunningHashes singleton to return the running hash
  • Add MirrorOperationTracer to modularized execution
  • Change modularized code to not initialize stacked state frame
  • Change to always load requested block in modularized code for use in BlockInfo later
  • Change to initialize VersionedConfiguration once and use it everywhere
  • Change to reuse stateless TransactionExecutor between requests
  • Disable contracts.sidecars to avoid generating unnecessary sidecar data
  • Fix EVM version being cached for the first request
  • Fix some tests by always inserting exchange rate

Related issue(s):

Fixes #9983
Fixes #10149
Part of #10079

Notes for reviewer:

Before

3342 tests completed, 397 failed, 6 skipped

After

3350 tests completed, 302 failed, 6 skipped

Checklist

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

@steven-sheehy steven-sheehy added enhancement Type: New feature web3 Area: Web3 API labels Jan 16, 2025
@steven-sheehy steven-sheehy added this to the 0.122.0 milestone Jan 16, 2025
@steven-sheehy steven-sheehy self-assigned this Jan 16, 2025
Copy link

codecov bot commented Jan 16, 2025

Codecov Report

Attention: Patch coverage is 92.22222% with 7 lines in your changes missing coverage. Please review.

Project coverage is 92.30%. Comparing base (e9b46eb) to head (5ddade4).
Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
.../com/hedera/mirror/web3/state/MirrorNodeState.java 50.00% 2 Missing and 2 partials ⚠️
...hedera/mirror/web3/common/ContractCallContext.java 33.33% 1 Missing and 1 partial ⚠️
...irror/web3/state/singleton/BlockInfoSingleton.java 96.42% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #10148      +/-   ##
============================================
+ Coverage     92.20%   92.30%   +0.09%     
+ Complexity     7896     7804      -92     
============================================
  Files           958      944      -14     
  Lines         33021    32801     -220     
  Branches       4170     4154      -16     
============================================
- Hits          30447    30276     -171     
+ Misses         1593     1549      -44     
+ Partials        981      976       -5     

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

@steven-sheehy steven-sheehy marked this pull request as ready for review January 16, 2025 02:47
@steven-sheehy steven-sheehy requested a review from a team as a code owner January 16, 2025 02:47
Signed-off-by: Steven Sheehy <[email protected]>
Signed-off-by: Steven Sheehy <[email protected]>
Signed-off-by: Steven Sheehy <[email protected]>
@kselveliev
Copy link
Contributor

Looks great to me. From running the tests from main an here the only diff I see in the test result is ContractCallNativePrecompileTest here is getting THROTTLED_AT_CONSENSUS since on main are passing.
Currently trying to figure out what causes it.

@steven-sheehy
Copy link
Member Author

THROTTLED_AT_CONSENSUS is usually due to lack of throttle definition. Let's get this then I can add the system file defaults as a follow up.

Copy link
Contributor

@bilyana-gospodinova bilyana-gospodinova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@steven-sheehy steven-sheehy merged commit 468fec2 into main Jan 17, 2025
36 checks passed
@steven-sheehy steven-sheehy deleted the 9983-blockhash branch January 17, 2025 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Type: New feature web3 Area: Web3 API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix gas estimate when modularizedServices flag is enabled Historical block hash support
4 participants