Skip to content

Wormhole Core Contract Fixes#74

Merged
Oghma merged 14 commits intostellarfrom
fix/wormhole-core
Apr 3, 2026
Merged

Wormhole Core Contract Fixes#74
Oghma merged 14 commits intostellarfrom
fix/wormhole-core

Conversation

@dkgoutham
Copy link
Copy Markdown

Summary

Implements all 11 fixes from Wormhole team review feedback on the Stellar core contract.

  1. Trailing bytes check — All four governance payload parsers now reject payloads with extra bytes after parsing, matching EVM/Solana behavior.
  2. CurrentGuardianSetIndex TTLset_current_index now extends TTL on write, preventing the contract from becoming non-functional if the entry gets archived.
  3. Remove StorageKey::Admin — Removed dead admin storage key and its write in initialization; Soroban's update_current_contract_wasm doesn't use it.
  4. Remove governance_emitter storage — Getter now returns the GOVERNANCE_EMITTER const directly; constructor validates the param matches the const instead of persisting it.
  5. MessageFee TTL on readpost_message_with_fee now extends the MessageFee TTL when fee is non-zero, preventing silent fallback to free messaging.
  6. Eliminate double VAA parsing in governanceverify_and_hash_governance_vaa now calls verify_vaa_signatures directly instead of verify_vaa, which was internally re-parsing the VAA.
  7. Fix is_governance_vaa_consumed return type — Changed from Result<(), WormholeError> to Result<bool, WormholeError>; errors are now reserved for parse failures only.
  8. Add parse_and_verify_vaa — New combined trait method and implementation matching EVM's parseAndVerifyVM; verify_vaa now delegates to it internally.
  9. VAA version checkVAA::try_from now rejects VAAs with version != 1, matching EVM.
  10. Remove MINIMUM_CONTRACT_BALANCE — Removed the 1 XLM minimum balance check from transfer_fees; Soroban contracts cannot be deallocated for having zero XLM.
  11. Remove TTL extension from consume_vaa — Persistent storage archival already provides replay protection; the extend_ttl was unnecessary cost.

@dkgoutham dkgoutham requested a review from Oghma April 2, 2026 17:51
Comment thread stellar/contracts/wormhole-contract/src/governance/mod.rs Outdated
Comment thread stellar/contracts/wormhole-contract/src/initialize.rs Outdated
Comment thread stellar/contracts/wormhole-contract/src/storage.rs Outdated
@Oghma Oghma merged commit c818fdc into stellar Apr 3, 2026
31 of 34 checks passed
@Oghma Oghma deleted the fix/wormhole-core branch April 3, 2026 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants