fix: live protocol fee, EVM chain validation, chain_id bounds, scoped auth - #322
Open
quartune wants to merge 1 commit into
Open
fix: live protocol fee, EVM chain validation, chain_id bounds, scoped auth#322quartune wants to merge 1 commit into
quartune wants to merge 1 commit into
Conversation
… solver/user auth - fill_intent now charges the live set_config protocol_fee_bps instead of the compile-time PROTOCOL_FEE_BPS constant. - validate_src_token recognizes "avalanche" and "bsc" as EVM chains, closing a format-validation gap. - proof_registry's set_authorized_emitter rejects chain_id > u16::MAX. - Audited all require_auth() call sites (docs/auth-audit.md); upgraded submit_intent, accept_intent, and fill_intent to require_auth_for_args scoped to their load-bearing arguments. Closes: stellar-vortex-protocol#260 Closes: stellar-vortex-protocol#261 Closes: stellar-vortex-protocol#262 Closes: stellar-vortex-protocol#263
|
@quartune Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
This file contains hidden or 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
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.
Summary
Combined fix for four assigned issues:
fill_intent's protocol fee to honor the live, admin-configured rate #260 —fill_intentnow readsprotocol_fee_bpsfrom the liveset_config-managedProtocolConfiginstead of the compile-timePROTOCOL_FEE_BPSconstant, so admin fee-rate changes actually take effect.validate_src_tokenmissing Avalanche/BSC branches #261 —validate_src_token's EVM chain set now includes"avalanche"and"bsc", closing a silent format-validation gap for those two chains.proof_registry'schain_id#262 —proof_registry::set_authorized_emitternow rejectschain_id > u16::MAX, since the real Wormhole chain-ID space is 16 bits.require_auth()call sites forrequire_auth_for_argsupgrade opportunities #263 — Audited everyrequire_auth()call site inintent_settlement(see newdocs/auth-audit.md); upgradedsubmit_intent,accept_intent, andfill_intenttorequire_auth_for_argsscoped to their load-bearing arguments, per the audit's own prior in-code notes. All other sites were reviewed and kept asrequire_auth()with documented rationale.Also updates
docs/pre-deploy-security-checklist.md(checks off #45),docs/solver-integration-guide.md(notes the scoped-auth change for solver bot authors), andCHANGELOG.md.Validation performed
README.mdanddocs/132-supported-chains.md.set_config-driven fee honoring,set_authorized_emitteru16 boundary (accept atu16::MAX, reject above), and a mismatched-argsMockAuthtest provingfill_intent's newrequire_auth_for_argsscope rejects a delegated auth entry signed for a differentintent_id.cargo build/test/clippy: no Rust toolchain is available in this environment. Additionally,maincurrently fails to compile for reasons unrelated to this PR — several constants used inintent_settlement/src/lib.rs(e.g.DEFAULT_MIN_BOND,MIN_FILL_WINDOW_SECS,MIN_INTENT_EXPIRY_SECS,MIN_BOND_FLOOR,MAX_PROTOCOL_FEE_BPS,SLASH_COOLDOWN,MAX_BATCH_SIZE,MAX_EXTENSION_DURATION) are referenced but never defined. This traces back to a merge conflict in PR feat: add max protocol fee cap and admin audit trail #184 (feat/protocol-fee-cap) that appears to have dropped the constant-definition hunk while keeping the code that uses them. This is a pre-existing, unrelated build-breaking issue and is out of scope for this PR — flagging it here since it will need a separate fix before CI can pass on any branch, including this one.Closes: #260
Closes: #261
Closes: #262
Closes: #263