Skip to content

feat(solana): solidity solana constructor#928

Draft
vaporif wants to merge 38 commits intomainfrom
vaporif/solidity-solana-constructor
Draft

feat(solana): solidity solana constructor#928
vaporif wants to merge 38 commits intomainfrom
vaporif/solidity-solana-constructor

Conversation

@vaporif
Copy link
Collaborator

@vaporif vaporif commented Feb 15, 2026

Description

closes: #XXXX


Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

  • Linked to GitHub issue with discussion and accepted design, OR link to spec that describes this work.
  • Wrote unit and integration tests.
  • Added relevant natspec and godoc comments.
  • Provide a conventional commit message to follow the repository standards.
  • Re-reviewed Files changed in the GitHub PR explorer.
  • Review SonarCloud Report in the comment section below once CI passes.

@codecov
Copy link

codecov bot commented Feb 15, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.91%. Comparing base (a4a8191) to head (a1642ea).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #928   +/-   ##
=======================================
  Coverage   99.91%   99.91%           
=======================================
  Files          27       28    +1     
  Lines        1123     1130    +7     
=======================================
+ Hits         1122     1129    +7     
  Misses          1        1           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mariuszzak mariuszzak self-assigned this Feb 24, 2026
- Add Test_Deploy smoke test for chain and contract readiness
- Add timeout tests for both Eth→Solana and Solana→Eth directions
- Add error ack test for failed receive on Ethereum
- Enhance roundtrip test with pending transfer and packet commitment verification
- Restructure roundtrip with nested s.Run blocks matching other e2e suites
- Extract adminMintIFTTokens helper to reduce duplication
init_if_needed,
payer = payer,
space = 8 + SolanaPayloadHint::INIT_SPACE,
seeds = [SolanaPayloadHint::SEED, payer.key().as_ref()],
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add packet identifiers to the seeds (client_id, sequence)?

.remaining_accounts
.get(HINT_ACCOUNT_INDEX)
.ok_or(GMPError::InsufficientAccounts)?;

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could close the hint account after reading it.

- Inject attestation proofs into timeout messages via solana_attested
- Pass timeout_relay_height from caller to ensure proof height has a
  consensus timestamp past the packet's timeout
- Extract duplicated update_client logic into shared solana_attested.rs
  behind SolanaAttestationTxBuilder trait
@mariuszzak
Copy link
Collaborator

The hint content is not validated against the IBC payload - a malicious relayer can substitute the receiver in instruction data and redirect minted tokens.

Two alternatives that fix this by committing execution data in the IBC packet:

  1. Add extraArgs to constructMintCall - caller provides pre-computed Solana accounts, constructor builds
    validated instruction data (spec change)
  2. Add a dedicated iftTransferWithPayload - caller provides complete payload, contract validates receiver/amount
    match (spec extension)

@mariuszzak
Copy link
Collaborator

Opened a follow-up PR based on this branch with an alternative solution: #959

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