fix(proof_registry): declare Axelar gateway and authorized-source keys (#379 #381 #382 #383) - #442
Merged
james2177 merged 2 commits intoSep 30, 2026
Conversation
|
@chideraisiguzor 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.
proof_registry: declare the Axelar gateway and authorized-source keys (#381)
This PR delivers one acceptance-criteria item from #381. #382 and #383 are referenced so that they close with this PR, but nothing from them is implemented here.
#381 Authenticate
receive_message_axelarthrough the Axelar GatewayWhat existed:
initializewroteProofKey::AxelarGateway, andreceive_message_axelarcalledSelf::get_authorized_axelar_source(..), but neither the key variant nor the helper existed onmain. They were lost in merge debris, so these were 2 of the crate's compile errors. There was also no way for the admin to configure an Axelar source.Done:
ProofKey::AxelarGatewayandProofKey::AuthorizedAxelarSource(Symbol)declared.set_authorized_axelar_source(chain_name, source_address)andremove_authorized_axelar_source(chain_name). Both are admin-auth gated, bump the instance TTL, and emitaxelar_source_authorized/axelar_source_removed.get_authorized_axelar_source(chain_name)(the missing helper, now a contract entry point) andget_axelar_gateway().initialize, which takes 3 args onmain. The existing tests still called it with 2.receive_message_axelaraccepts the configured source and rejects a wrong source and an unconfigured or removed chain.Not done in this PR:
command_id+gateway.validate_message(..)through acontractclienttrait (the forged-call exploit is still open).#382 Replay protection and chain-identity binding on the Axelar path
Not done in this PR:
SeenAxelar(command_id)replay key and its TTL.EmitterChainMismatch.payload.get(i)calls with the checkedbyte()helper.command_idinProofRecord, and the sharedstore_proofhelper.#383 Restore the
proof_registrypause circuit breakerNot done in this PR:
pause/unpausewith admin + guardian and per-bridgeProofKey::Paused(bridge).#379 Per-token outflow rate limits as an automatic circuit breaker
Assigned after this PR was opened; folded in here (one PR per account + repo).
Not done in this PR:
(window_secs, max_outflow)config behind a timelock (loosening timelocked, tightening immediate).Verification
proof_registrydoes not compile onmain(pre-existing merge debris, unrelated to this change). It is missingPROOF_TTL_*/INSTANCE_TTL_*constants and theChainIdOutOfRange/ProofStalevariants,receive_message_axelarcastsOption<u8>withas, and the#[cfg(feature = "testutils")]mock fns break#[contractimpl]. Becauseintent_settlementdepends on it, that crate fails too.To test this change I applied a minimal repair of that debris locally (not part of this PR) and ran it with this commit on top:
cargo test --libinproof_registry: 28 passed, 0 failed (19 existing + 9 new).cargo fmt --checkandcargo clippy --all-targets: no findings on lines this PR touches. The remaining fmt hunks and 3 clippy warnings are on pre-existing lines.```block inreceive_message_axelar's doc comment (not touched).Closes #379
Closes #381
Closes #382
Closes #383