fix(move): clone stargate query proto buffers#529
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthrough
ChangesStargate query data-race fix and tests
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 golangci-lint (2.12.2)level=error msg="[linters_context] typechecking error: pattern ./...: directory prefix . does not contain main module or its selected dependencies" Comment |
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #529 +/- ##
==========================================
- Coverage 38.53% 38.52% -0.01%
==========================================
Files 327 327
Lines 30697 30697
==========================================
- Hits 11829 11826 -3
- Misses 16967 16969 +2
- Partials 1901 1902 +1
🚀 New features to boost your workflow:
|
Description
Closes: N/A
This fixes a data race in Move VM stargate queries by treating whitelist protobuf messages as prototypes only.
queryStargatenow clones the request and response messages before JSON/protobuf conversion so concurrent VM queries do not mutate shared decode buffers.The PR also adds concurrent regression coverage for:
HandleVMQuerystargate queries0x1::query::get_proposalBoth tests assert zero errors and zero mismatched query results.
Validation
go test ./x/move/keeper -run 'TestQueryStargateDataRace|TestQueryStargateVMSessionRace' -count=1 -vgo test -race ./x/move/keeper -run 'TestQueryStargateDataRace|TestQueryStargateVMSessionRace' -count=1 -vgo test ./x/move/keeper -count=1Author Checklist
I have...
!in the type prefix if API or client breaking change