-
Notifications
You must be signed in to change notification settings - Fork 177
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
[EVM] Make chain config concurrency safe #6578
Conversation
|
||
FlowEVMPreviewNetChainIDInUInt64 = FlowEVMPreviewNetChainID.Uint64() | ||
FlowEVMTestNetChainIDInUInt64 = FlowEVMTestNetChainID.Uint64() | ||
FlowEVMMainNetChainIDInUInt64 = FlowEVMMainNetChainID.Uint64() |
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.
conversion to uuid is not cheap, so I made it global vars to also save computation per evm tx
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6578 +/- ##
=======================================
Coverage 41.15% 41.16%
=======================================
Files 2020 2020
Lines 178778 178808 +30
=======================================
+ Hits 73575 73602 +27
- Misses 99043 99048 +5
+ Partials 6160 6158 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
We don't need this for the on-chain and live operations but for concurrent use of the emulator we need it (e.g. GW nodes)
Since these chain configs are read-only during execution and identical when on specific chain, I created a global instances to be reused to reduce memory allocation.