use explicity structs and innervm calls #1015
Open
+27
−27
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Why this should be merged
There were few reviews in #1009 after it was merged. This PR intends to responde those.
How this works
This pull request refactors the atomic sync components in the EVM plugin to improve clarity and maintainability. Key changes include renaming internal types to exported ones, enhancing comments for better documentation, and updating initialization logic to align with the new architecture.
Refactoring of sync components:
plugin/evm/atomic/sync/extender.go
: Renamedextender
toExtender
and updated comments to clarify its role as the sync extender for the atomic VM. Updated methods to align with the new exported type. [1] [2] [3]plugin/evm/atomic/sync/summary_provider.go
: RenamedsummaryProvider
toSummaryProvider
and updated comments to describe its role in providing state summaries for the atomic trie. Adjusted initialization logic to match the new exported type.Updates to VM initialization logic:
plugin/evm/atomic/vm/vm.go
: Updated initialization ofsync.Extender
andsync.SummaryProvider
to use exported types. Adjusted initialization of dependent components (atomicBackend
,atomicTrie
, andleafHandler
) to improve clarity and consistency. [1] [2]Minor corrections:
plugin/evm/atomic/sync/leaf_handler.go
: Fixed a typo in the comment forNewLeafHandler
("uninitialzied" → "uninitialized").plugin/evm/atomic/vm/vm.go
: Corrected the method call to set the extension configuration fromvm.SetExtensionConfig
tovm.InnerVM.SetExtensionConfig
for proper delegation.How this was tested
Existing tests
Need to be documented?
No
Need to update RELEASES.md?
No