Skip to content

[codex] Preserve crossbar simulation results and remove noisy gateway log#11

Merged
tamlut-modnys merged 1 commit into
mainfrom
codex/align-crossbar-solana-update-contract
Apr 24, 2026
Merged

[codex] Preserve crossbar simulation results and remove noisy gateway log#11
tamlut-modnys merged 1 commit into
mainfrom
codex/align-crossbar-solana-update-contract

Conversation

@tamlut-modnys
Copy link
Copy Markdown
Collaborator

Summary

  • preserve server-provided result values in both mirrored Rust Crossbar clients for Solana and Sui simulation responses
  • only compute the Solana median fallback when result is absent
  • remove the unconditional gateway URL log in both mirrored Rust Gateway clients without changing FetchSignaturesConsensusParams
  • add mirrored static regression tests covering empty results, server-result precedence, median fallback, and Sui decimal-string deserialization

Why

Crossbar can return results: [] while still providing a string result. The current Rust clients were dropping that server-provided value, and MarginFi PR #5 only fixed one of the two mirrored surfaces. MarginFi PR #9 also addressed a real logging annoyance, but did it by adding a field to a public params struct, which would be a downstream breaking change.

This keeps the useful behavior from both proposals while avoiding the public API break.

Validation

  • cargo test --locked --manifest-path solana/rust/switchboard-on-demand-client/Cargo.toml
    • new Crossbar regression tests passed
    • full command still fails on pre-existing doctests in solana/rust/switchboard-on-demand-client/src/lib.rs
  • cargo test --locked --no-default-features --features client --manifest-path solana/rust/switchboard-on-demand/Cargo.toml
    • passed
  • cargo check --locked --no-default-features --features client-v3 --manifest-path solana/rust/switchboard-on-demand/Cargo.toml
    • still fails in untouched surge.rs, subscription.rs, utils.rs, and transaction_builder.rs

@tamlut-modnys tamlut-modnys force-pushed the codex/align-crossbar-solana-update-contract branch from bb61003 to 01f835b Compare April 23, 2026 19:23
@tamlut-modnys tamlut-modnys requested a review from mgild April 23, 2026 19:26
@tamlut-modnys tamlut-modnys marked this pull request as ready for review April 24, 2026 15:30
@tamlut-modnys tamlut-modnys merged commit f11ebcb into main Apr 24, 2026
1 check failed
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.

3 participants