Repository navigation
feat: add Axelar GMP proof oracle - #133
Merged
Merged
Conversation
Adds transparent Axelar (paid/self-relay, Solana executable envelope, strict base58/StrKey identities) and LayerZero V2 oracles with constructor-only bounded chain mappings, plus Stellar transport tests. MessageEncodingLib now rejects trailing message bytes.
…eat/axelar-oracle
reednaa
marked this pull request as ready for review
October 2, 2026 12:25
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Drop MappedOracle/BoundedOracle. The oracle now inherits ChainMap with the key being the ASCII-lowercased Axelar name packed left-aligned into a uint256, so reverseChainIdMap yields the name. - submit takes the destination OIF chain ID and the recipient's Axelar address string; a nonzero destinationConfig selects the Solana envelope. - execute infers the sender format (0x hex, Stellar StrKey, Solana base58) and records proofs like HyperlaneOracle. - Names are 1-32 bytes without NUL, no character set imposed; packing lives in the AxelarChainName library (word-at-a-time lowercasing). - No Stellar message limits on EVM; destinations enforce their own. - ChainMap.setChainMap is public virtual so the oracle can validate keys. - OracleAddress moves to axelar/ and is decode-only. - Chain-map script takes (oracle, name, chainId); README updated. - Axelar tests move to test/oracle/axelar, with exhaustive key tests.
…ime decoding - AxelarStrings replaces AxelarChainName and OracleAddress: chainKey, chainName, decodeAddress; error names (and selectors) unchanged. - decodeAddress decodes EVM hex and Stellar StrKeys a word at a time with a one-word nibble-table CRC16 (EVM 14.2k -> 1.0k gas, Stellar 57.5k -> 7.7k). Solana base58 is unchanged. - Differential tests against the per-character reference decoder: every byte at every position, every length 0-100, calldata padding junk, single-bit IDs, real mainnet StrKeys, fuzzing. - Chain-name sweep computes expectations in O(1) so it fits the gas cap under forge coverage (CI coverage step was out of gas). - AxelarChainMap script rejects non-canonical names before broadcast.
Forge-native `--symbolic` properties comparing AxelarStrings with independent branch-free specs: chain-name packing, unpacking and setter canonicality; EVM address decoding; dispatch rejection; Stellar bad-shape rejection; and a fixed-id Stellar round trip with symbolic trailing calldata. Pins `[profile.default.symbolic]` and documents the local-only run and forge 1.8.4's CRC limit in the README.
setChainMap accepted any 1-32-byte name without NUL or ASCII uppercase. Axelar's ChainNameRaw only admits 1-20 ASCII bytes without '_', and the chain map is set-once in both directions, so mapping a name Axelar cannot route permanently consumed the OIF chain ID. Enforce the ChainNameRaw grammar in setChainMap on top of the existing packing check. Inbound lookup, submit and execute are unchanged. Addresses sujithsomraaj/lifi-intent-audit-oct-26#1. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # README.md
reednaa
added a commit
that referenced
this pull request
Oct 29, 2026
Independent differential review by Sujith Somraaj (20-29 October 2026) of the Axelar GMP oracle (#133, scoped at e57f0b2) and the Chainlink CCIP oracle (#138, scoped at b382bb1), both against base 7e32479. 1 Low and 2 Informational findings: - Low 6.1.1 (AxelarOracle accepts chain names Axelar rejects): fixed in 8e3efc7, verified. - Info 6.2.1 (vendored CCIP receiver interface names OffRampRouter): fixed in 254835c, verified. - Info 6.2.2 (default CCIP destination gas not sized to batch): acknowledged; callers size their own extraArgs. Solana and Stellar counterpart programs were out of scope. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.
EVM side of the cross-VM proof transport (counterparts: lifi-intent-svm #129, intent-soroban #1). Branched from
main. LayerZero is in #137.Contracts
AxelarOracle:submitchecksIAttester(source).hasAttested(payloads), encodes withMessageEncodingLib, and calls the gateway.DeliveryMode.Relayedrequiresmsg.value > 0and pays it to the gas service (refund tomsg.sender);SelfRelayrequires zero value and skips the gas service. A nonzerodestinationConfigwraps the message in the Solana envelope.recipientOracleis passed through unchecked; a wrong recipient loses only that delivery and can be resubmitted.executeis permissionless but records proofs only aftergateway.validateContractCallapproves the exact(commandId, sourceChain, sourceAddress, keccak256(payload)). The original strings go to the gateway; the lowercased chain key goes to the chain map.AxelarStrings: chain name ↔ chain-map key (ASCII-lowercased, packed left-aligned, 1–32 bytes, no NUL) and address string →bytes32. The address format is inferred from shape:0x+ 40 hex (EVM, left-padded), 56-char contract StrKey with CRC16-XModem checksum (Stellar), or canonical 32-byte base58 via OpenZeppelinBase58(Solana). Chain names, EVM and StrKey are decoded a word at a time.SolanaEnvelope: Axelar 1.1.1ExecutablePayloadBorsh layout with the destination config as the single read-only, non-signer account; message length bounded to 36 + 320 bytes.ChainMap(setChainMapis nowpublic virtual).AxelarOracle.setChainMap(key, chainId)isonlyOwner, set-once and bijective, and rejects keys that are not packed lowercase names. Renouncing ownership freezes the map. No upgrade, pause or withdrawal.MessageEncodingLib: reject trailing message bytes (TrailingMessageBytes).Scripts:
script/AxelarOracle.s.sol(CREATE2 deploy, no chain maps) andscript/AxelarChainMap.s.sol(one route per call; refuses non-lowercase names before broadcasting). Usage is in the README.Tests (
test/oracle/axelar/): oracle unit and flow tests against a gateway fixture,AxelarStringschain-name and address tests, differential tests against a reference decoder (OracleAddressReference), and symbolicAxelarStringsproperties (solver settings infoundry.toml).Verification (local):
forge test538 passed, 0 failed.Not done: live provider delivery. Audit pending.