-
Notifications
You must be signed in to change notification settings - Fork 221
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
Use acp 118 handler #1359
Open
ceyonur
wants to merge
35
commits into
master
Choose a base branch
from
use-acp-118-handler
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Use acp 118 handler #1359
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…bs/subnet-evm into always-sign-uptime
ceyonur
force-pushed
the
use-acp-118-handler
branch
from
October 9, 2024 14:03
e769981
to
beea962
Compare
ceyonur
changed the base branch from
uptime-tracking
to
always-sign-uptime-types
October 9, 2024 14:03
…into use-acp-118-handler
…into use-acp-118-handler
ceyonur
commented
Oct 18, 2024
} | ||
} | ||
|
||
func (h *verifierStats) IncAddressedCallSignatureValidationFail() { |
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.
not sure how to use this as there is no "invalid addressedcall msg". They're further parsed for a known payload; and if there is no known payload type, then they're invalid (but again it means they cannot be parsed).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This pull request introduces several changes to the
plugin/evm/vm.go
and related files to improve caching, message handling, and testing in the warp backend. The idea is to merge caches in favor of Cached ACP-118 handler. It also refactors warp backend and implements acp118 verifier interface.Dependency Updates
github.com/ava-labs/avalanchego
ingo.mod
to the latest release. ([go.modL8-R8](https://github.com/ava-labs/subnet-evm/pull/1359/files#diff-33ef32bf6c23acb95f5902d7097b7a1d5128ca061167ec0716715b0b9eeaa5f6L8-R8)
)Caching and Initialization Enhancements
cache
andmetercacher
modules inplugin/evm/vm.go
to support enhanced caching mechanisms. ([plugin/evm/vm.goR19-R22](https://github.com/ava-labs/subnet-evm/pull/1359/files#diff-3be5ea9687f8af021d9baaa6584d174a7975b181b604e1a759e4ad2e40136912R19-R22)
)warpSignatureCacheSize
with ameteredCache
for caching warp signatures. This change improves cache management and monitoring. ([plugin/evm/vm.goR491-R532](https://github.com/ava-labs/subnet-evm/pull/1359/files#diff-3be5ea9687f8af021d9baaa6584d174a7975b181b604e1a759e4ad2e40136912R491-R532)
)Initialize
method to include the creation and setup ofmeteredCache
and added logic to clear the warp database if configured. ([plugin/evm/vm.goR491-R532](https://github.com/ava-labs/subnet-evm/pull/1359/files#diff-3be5ea9687f8af021d9baaa6584d174a7975b181b604e1a759e4ad2e40136912R491-R532)
)initializeHandlers
method and integrated its logic directly into theInitialize
method, simplifying the initialization process. ([plugin/evm/vm.goL619-L632](https://github.com/ava-labs/subnet-evm/pull/1359/files#diff-3be5ea9687f8af021d9baaa6584d174a7975b181b604e1a759e4ad2e40136912L619-L632)
)Testing Improvements
plugin/evm/vm_warp_test.go
to support enhanced testing capabilities. ([[1]](https://github.com/ava-labs/subnet-evm/pull/1359/files#diff-816005c76cbcf9a7b2e47bb3b79f791507ae3b21594cfbbad80318ce065d2e2dR17)
,[[2]](https://github.com/ava-labs/subnet-evm/pull/1359/files#diff-816005c76cbcf9a7b2e47bb3b79f791507ae3b21594cfbbad80318ce065d2e2dR39)
)[[1]](https://github.com/ava-labs/subnet-evm/pull/1359/files#diff-816005c76cbcf9a7b2e47bb3b79f791507ae3b21594cfbbad80318ce065d2e2dR756-R765)
,[[2]](https://github.com/ava-labs/subnet-evm/pull/1359/files#diff-816005c76cbcf9a7b2e47bb3b79f791507ae3b21594cfbbad80318ce065d2e2dR814-R823)
)TestClearWarpDB
to verify the functionality of clearing the warp database and ensuring messages are correctly pruned when configured. ([plugin/evm/vm_warp_test.goR858-R914](https://github.com/ava-labs/subnet-evm/pull/1359/files#diff-816005c76cbcf9a7b2e47bb3b79f791507ae3b21594cfbbad80318ce065d2e2dR858-R914)
)Backend Refactoring
warp/backend.go
to include new dependencies for enhanced caching and message verification. ([warp/backend.goR14-R26](https://github.com/ava-labs/subnet-evm/pull/1359/files#diff-be66b853aa52c434887db29553e039e5536b325b159de2d4df44d2e8fb345930R14-R26)
)Backend
interface and its implementation to use a unifiedsignatureCache
instead of separate caches for message and block signatures. This change simplifies the caching logic and improves maintainability. ([[1]](https://github.com/ava-labs/subnet-evm/pull/1359/files#diff-be66b853aa52c434887db29553e039e5536b325b159de2d4df44d2e8fb345930L40-R49)
,[[2]](https://github.com/ava-labs/subnet-evm/pull/1359/files#diff-be66b853aa52c434887db29553e039e5536b325b159de2d4df44d2e8fb345930L62-R62)
)Clear
method from the backend and integrated its functionality into the VM initialization process. ([warp/backend.goL117-L123](https://github.com/ava-labs/subnet-evm/pull/1359/files#diff-be66b853aa52c434887db29553e039e5536b325b159de2d4df44d2e8fb345930L117-L123)
)signMessage
method to encapsulate the signing logic and ensure signatures are cached consistently. ([warp/backend.goR199-R208](https://github.com/ava-labs/subnet-evm/pull/1359/files#diff-be66b853aa52c434887db29553e039e5536b325b159de2d4df44d2e8fb345930R199-R208)
)Test Cleanup
TestClearDB
test fromwarp/backend_test.go
as its functionality is now covered by the newTestClearWarpDB
test inplugin/evm/vm_warp_test.go
. ([warp/backend_test.goL38-R46](https://github.com/ava-labs/subnet-evm/pull/1359/files#diff-3a69b001767fa655e727b1d3763e0d128c2145db8b6dca70474c22aa08eb2a9fL38-R46)
)These changes collectively enhance the performance, reliability, and test coverage of the warp backend in the
plugin/evm
module.How this was tested
Added new UTs and improved existing warp tests.
How is this documented
Not needed.