feat(foreign-tx): wire svm chains into node - #4138
Conversation
80ebf9c to
285b50c
Compare
There was a problem hiding this comment.
Pull request overview
Wires SVM-based foreign chain verification (Solana and Fogo) end-to-end in the MPC node, connecting operator config through inspector fan-out into verify_foreign_tx, and extending health-check/config-tester/docs so nodes can validate and serve these chains instead of rejecting them.
Changes:
- Adds typed Solana/Fogo inspector fan-out and request dispatch for
verify_foreign_tx(plus config parsing / wiring tests). - Extends foreign-chain health checks with SVM genesis-hash fingerprint probing and golden vectors for Solana/Fogo.
- Updates operator/localnet documentation and templates to include Solana/Fogo configuration and Solana localnet request args.
Reviewed changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/running-an-mpc-node-in-tdx-external-guide.md | Adds Solana/Fogo foreign_chains examples for testnet/mainnet deployments. |
| docs/localnet/mpc-configs/config.yaml.template | Adds Solana config to localnet YAML template (needs follow-up for Fogo + comment correctness per PR comments). |
| docs/localnet/mpc-config.template.toml | Adds Solana config to localnet TOML template (needs follow-up for Fogo + comment correctness per PR comments). |
| docs/localnet/localnet.md | Documents how to generate a fresh Solana signature and run a Solana verify_foreign_transaction call. |
| docs/localnet/args/verify_foreign_tx_solana.json | Adds a localnet request fixture for Solana verification (with placeholder tx id). |
| docs/foreign-chain-transactions.md | Documents SVM fingerprint probing (getGenesisHash) and tabulates Solana/Fogo genesis hashes. |
| deployment/cvm-deployment/user-config.toml | Adds Solana/Fogo config blocks for CVM deployment user config (testnet + commented mainnet variant). |
| crates/node/src/web.rs | Extends debug/config surface to report configured provider counts for Fogo. |
| crates/node/src/tests/foreign_chain_configuration.rs | Ensures foreign chain configuration setup includes the new fogo slot. |
| crates/node/src/providers/verify_foreign_tx/sign.rs | Adds Solana/Fogo dispatch to SVM inspectors for request execution. |
| crates/node/src/providers/verify_foreign_tx.rs | Adds Solana/Fogo inspectors to the node wiring and tests to pin correct config-to-slot mapping. |
| crates/node-config/src/foreign_chains.rs | Adds fogo to config model and parsing/validation tests. |
| crates/foreign-chain-health-check/src/probe.rs | Implements provider probing for Solana and Fogo using their inspectors. |
| crates/foreign-chain-health-check/src/lib.rs | Runs SVM checks for Solana/Fogo instead of skipping them as “not yet supported”. |
| crates/foreign-chain-health-check/src/golden.rs | Introduces SVM golden vectors (genesis hash) for mainnet/testnet Solana/Fogo. |
| crates/foreign-chain-health-check/src/checks.rs | Adds check_svm that validates chain identity via canonicalized genesis hash. |
| crates/foreign-chain-config-tester/README.md | Updates config tester docs to reflect SVM chain checks and expected output. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Pull request overviewThis PR connects the already-merged SVM inspector to the rest of the node so that Solana and Fogo verification requests are actually served instead of rejected. It adds a Changes:
Reviewed changesPer-file summary
FindingsBlocking (must fix before merge):
Non-blocking (nits, follow-ups, suggestions):
|
285b50c to
33f3143
Compare
33f3143 to
b9f01ce
Compare
796ab4b to
3cb07e1
Compare
e88458d to
b904c1d
Compare
Connects config -> inspector -> signing, so a node actually serves Solana and
Fogo verification requests. Before this PR the node still rejects them.
fogosection added (solanaalready existed);(
SolanaInspector/FogoInspector, so a slot mix-up is a compile error)and dispatch arms that replace the old
bail!("ForeignChainRpcRequest::Solana is unsupported"); tests pin thateach chain's config feeds its own slot;
Every genesis hash committed here was read from a live node:
solana mainnet 5eykt4UsFv8P8NJdTREpY1vzqKqZKvdpKuc147dw2N9d
solana devnet EtWTRABZaYq6iMfeYKouRu166VU2xqa1wcaWoxPkrZBG
fogo mainnet CDLtwKnaCoK157uaHQDj4fHu72AyD2519Cphmpiq6hvT
fogo testnet 9GGSFo95raqzZxWqKM5tGYvJp5iv4Dm565S4r8h5PEu9
Verified with the config tester against live endpoints (mainnet and testnet both
pass), including a negative check: pointing the Solana entry at Fogo's URL fails
with "chain id mismatch", so the check is not passing vacuously.