-
Notifications
You must be signed in to change notification settings - Fork 179
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
Add offchain block context creation method #6751
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6751 +/- ##
==========================================
+ Coverage 41.23% 43.23% +1.99%
==========================================
Files 2060 1586 -474
Lines 182635 146021 -36614
==========================================
- Hits 75316 63128 -12188
+ Misses 101011 77665 -23346
+ Partials 6308 5228 -1080
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
|
||
// For testnet & mainnet, we fetch the block hash from the hard-coded | ||
// array of hashes. | ||
if chainID == flow.Mainnet && height < blockHashListFixHCUEVMHeightMainnet { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to add this logic to BasicProvider.OnBlockExecuted to call PushBlockHash with the hard-coded array of hashes.
So that my backward compatibility test will be able to save with the hard-coded hashes, and verify the trie update matches. If it matches, then we know these hard-coded configs are correct and can be used by gateway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did some refactor in my branch for your reference
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added a method similar to what you had in your branch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good
This adds a way to create block context used for re-execution so that the block context contains historically correct data.
This addresses the Block Hash list issue and the coinbase issue. more details in the comments of the code.