Skip to content

Separate warp storage and message verification#5199

Merged
StephenButtolph merged 6 commits intoceyonur/sae-warpfrom
StephenButtolph/separate-storage-and-verification
Apr 8, 2026
Merged

Separate warp storage and message verification#5199
StephenButtolph merged 6 commits intoceyonur/sae-warpfrom
StephenButtolph/separate-storage-and-verification

Conversation

@StephenButtolph
Copy link
Copy Markdown
Contributor

Behavioral changes

  1. Changed the ACP-118 error codes so not re-use error codes. If we determine that maintaining the same error codes is important.. Then we can revert this... But I highly doubt anyone uses these (and it allows better testing).
  2. Allowed any warp message to be specified as an off-chain warp message. Previously there was special casing around not allowing Hash messages. It isn't clear to me why this restriction existed.
  3. Removed the verification metrics. We could re-add this, but if we do we should register them through the VM registerer rather than the global.
  4. Removed the signature cache. We should probably re-add this, but we don't need to actually have a reference to the cache. I feel like it would make the most sense for us to just always cache the signatures in the acp118.Handler, and then remove the NewCachedHandler function.

Cleanup

  1. Removed message parsing from the Backend type, it is handled by the Config now
  2. Removed message signing from the Backend type, it is handled by the acp.118.Handler
  3. Split Backend into 2 types, Storage and Verifier.
  4. Simplified (imo) the Verifier logic
  5. Simplified the tests of the Storage and Verifier.
  6. Passed around concrete types rather than interfaces.
  7. Moved files in the warp/backend package into the warp package.

Other

I also just removed the log from Backend.AddMessage, we could provide the logger to the Storage... But I felt like it wasn't worth it... Happy to re-add it if we have found this log useful in production.

@StephenButtolph StephenButtolph requested a review from a team as a code owner April 7, 2026 21:40
Copy link
Copy Markdown
Contributor Author

@StephenButtolph StephenButtolph left a comment

Choose a reason for hiding this comment

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

Sorry... The diff is super annoying to review because of the renames:

  • warp/backend/backend.go -> warp/storage.go
  • warp/backend/backend_test.go -> warp/storage_test.go
  • warp/backend/verifier_backend.go -> warp/verifier.go
  • warp/backend/verifier_backend_test.go -> warp/verifier_test.go

Comment thread vms/saevm/vm.go Outdated
Copy link
Copy Markdown
Contributor

@ceyonur ceyonur left a comment

Choose a reason for hiding this comment

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

left a small comment regarding to preserve the caching, otherwise lgtm.

Comment thread vms/saevm/vm.go Outdated
Comment thread vms/saevm/warp/storage_test.go
@StephenButtolph StephenButtolph merged commit d511f86 into ceyonur/sae-warp Apr 8, 2026
52 of 57 checks passed
@StephenButtolph StephenButtolph deleted the StephenButtolph/separate-storage-and-verification branch April 8, 2026 17:41
@github-project-automation github-project-automation bot moved this to Done 🎉 in avalanchego Apr 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants