fix(pyth): automate router set rotation via vaa - #2081
Conversation
Router sets must not be changed through ordinary config updates. Store router sets separately and require submit_v_a_a to verify the current router set before advancing to the next index. This keeps the new pyth_vaa contract aligned with the previous guarded Wormhole rotation behavior while preserving the operational VAA submit shape. Signed-off-by: Joseph Chalabi <chalabi.joseph@gmail.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (5)
Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review. WalkthroughThe contract now stores router sets by index and rotates them through signed governance VAAs. It adds governance-chain validation, migration from the legacy configuration, indexed router-set parsing, new errors, query fields, and tests for rotation and rejection paths. ChangesRouter rotation and migration
Estimated code review effort: 4 (Complex) | ~45 minutes Merge Risk: ⚪ Minimal · up to Router-set rotation now requires current-router signatures, validates governance targets, and advances sequentially while preserving the existing configuration response shape. No current merge-blocking risk is identified. Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
Move the active router index out of config storage and validate the governance target chain before accepting router-set rotation VAAs. This restores the sender-independent but signature-gated rotation behavior used by the legacy verifier.\n\nSigned-off-by: Joseph Chalabi <chalabi.joseph@gmail.com>
Summary
submit_v_a_apathget_configresponse shape that pyth_pro and Hermes use at runtimeValidation
Local validation reproduced the stale-router failure, submitted the router-set
rotation through
submit_v_a_a, then confirmed Hermes price updates succeededagainst pyth_pro and x/oracle after the rotation.