Skip to content

build(svm): support Solana instruction 3.4#419

Merged
lgalabru merged 1 commit into
mainfrom
build/svm-instruction-3.4
Jul 13, 2026
Merged

build(svm): support Solana instruction 3.4#419
lgalabru merged 1 commit into
mainfrom
build/svm-instruction-3.4

Conversation

@lgalabru

@lgalabru lgalabru commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator

Context

This is the prerequisite txtx release for Surfpool 1.5: LiteSVM 0.14 requires Solana instruction 3.4, which conflicts with the addon’s current exact 3.2 pin.

Summary

  • release txtx-addon-network-svm 0.3.23 with Solana instruction 3.4 and client 4.1 support
  • preserve the addon’s Solana 3 transaction model while converting signed JSON transactions to the Solana 4 RPC type at the send boundary
  • pin Rust 1.91 in development, PR CI, and CLI release jobs for the Agave 4.1 dependency graph

Test plan

  • cargo check -p txtx-addon-network-svm --all-targets --locked
  • cargo test -p txtx-addon-network-svm
  • cargo test --workspace --features txtx-supervisor-ui/bypass_supervisor_build
  • cargo build --workspace --release --features txtx-supervisor-ui/bypass_supervisor_build
  • cargo package -p txtx-addon-network-svm --allow-dirty
  • rustfmt --edition 2021 --check addons/svm/core/src/codec/send_transaction.rs

Breaking changes

None.

@greptile-apps

greptile-apps Bot commented Jul 13, 2026

Copy link
Copy Markdown

Greptile Summary

This PR upgrades txtx-addon-network-svm to v0.3.23 to unblock Surfpool 1.5, satisfying LiteSVM 0.14's requirement for solana-instruction 3.4 and solana-client 4.1. The core technique is a thin JSON bridge: transactions are still built and signed using the Solana 3 types (preserving the existing codec), but deserialize_transaction now deserialises those JSON bytes into the solana-transaction v4 type (aliased as solana-transaction-rpc) just before handing off to the v4 RPC client.

  • Dependency bridge (Cargo.toml): solana-instruction bumped from 3.2 → 3.4, solana-client to 4.1.0, and a solana-transaction-rpc alias added for solana-transaction v4.1.1 (serde-only, used only at the send boundary).
  • Toolchain consolidation (workflows + rust-toolchain): Both CI workflows now awk-read the channel from rust-toolchain instead of hardcoding a version, making rust-toolchain the single source of truth; the toolchain is also exported as RUSTUP_TOOLCHAIN in the release job for the nested checkout build.

Confidence Score: 5/5

Safe to merge. The change is well-scoped: only the send boundary is touched, the v3 signing pipeline is preserved, and a signed round-trip test validates JSON schema compatibility between the two Transaction versions.

All logic changes are in send_transaction.rs and the associated Cargo.toml. The JSON bridge between v3 and v4 Transaction types is directly validated by the updated test. CI toolchain pinning is consolidated cleanly via rust-toolchain. No error-handling regressions, no dropped fields, no auth boundary changes.

No files require special attention.

Important Files Changed

Filename Overview
addons/svm/core/src/codec/send_transaction.rs Introduces a JSON bridge that deserializes v3-signed transactions into the v4 RPC Transaction type at the send boundary; test validates round-trip fidelity with a real payer signature.
addons/svm/core/Cargo.toml Bumps solana-instruction to 3.4.0 and solana-client to 4.1.0; adds solana-transaction-rpc alias (solana-transaction v4.1.1) for the send-boundary type conversion.
rust-toolchain Pins toolchain to 1.91.0 (up from 1.79) to satisfy the Agave 4.1 dependency graph; now the single authoritative source read by both CI workflows.
.github/workflows/pr.yaml Replaces hardcoded 1.79 toolchain pin with a dynamic awk read from rust-toolchain; correctly threads the version through rustup install and target add.
.github/workflows/release_cli.yaml Consolidates two Rust-setup steps into one, reads toolchain from txtx/rust-toolchain, and exports RUSTUP_TOOLCHAIN to the environment for the nested checkout build.
Cargo.lock Lock file updated to reflect the Solana 4.1 dependency graph; new entries include agave-transaction-view, aya/eBPF crates (pulled in transitively), and rayon 1.12.0.

Sequence Diagram

%%{init: {'theme': 'neutral'}}%%
sequenceDiagram
    participant Runner as Runbook Runner
    participant ST as send_transaction.rs
    participant JSON as JSON bytes (stored in ValueStore)
    participant V4 as solana-transaction-rpc v4 (Transaction alias)
    participant RPC as Solana RPC Client v4.1

    Runner->>ST: send_transaction_background_task(inputs)
    ST->>JSON: get_buffer_bytes_result()
    Note over JSON: Bytes previously serialized from v3 Transaction via serde_json
    ST->>ST: deserialize_transaction(bytes)
    JSON->>V4: serde_json::from_slice(bytes)
    Note over V4: v3 JSON schema is compatible with v4 Transaction serde
    ST->>RPC: "rpc_client.send_and_confirm_transaction(&transaction)"
    RPC-->>ST: Signature
    ST-->>Runner: Ok(signature)
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
sequenceDiagram
    participant Runner as Runbook Runner
    participant ST as send_transaction.rs
    participant JSON as JSON bytes (stored in ValueStore)
    participant V4 as solana-transaction-rpc v4 (Transaction alias)
    participant RPC as Solana RPC Client v4.1

    Runner->>ST: send_transaction_background_task(inputs)
    ST->>JSON: get_buffer_bytes_result()
    Note over JSON: Bytes previously serialized from v3 Transaction via serde_json
    ST->>ST: deserialize_transaction(bytes)
    JSON->>V4: serde_json::from_slice(bytes)
    Note over V4: v3 JSON schema is compatible with v4 Transaction serde
    ST->>RPC: "rpc_client.send_and_confirm_transaction(&transaction)"
    RPC-->>ST: Signature
    ST-->>Runner: Ok(signature)
Loading

Reviews (3): Last reviewed commit: "build(svm): support Solana instruction 3..." | Re-trigger Greptile

Comment thread addons/svm/core/src/codec/send_transaction.rs
Comment thread .github/workflows/release_cli.yaml Outdated
@lgalabru lgalabru force-pushed the build/svm-instruction-3.4 branch from adef09c to c4f5b56 Compare July 13, 2026 15:10
@MicaiahReid MicaiahReid self-requested a review July 13, 2026 18:06
@lgalabru lgalabru force-pushed the build/svm-instruction-3.4 branch from c4f5b56 to 398a42d Compare July 13, 2026 18:21
@lgalabru lgalabru merged commit f5e711e into main Jul 13, 2026
2 checks passed
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