fix(core): preserve remote transaction errors - #764
Conversation
Greptile SummaryThis PR distinguishes valid null remote transaction responses from genuine datasource failures while preserving the existing public client API.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains. Important Files Changed
Reviews (4): Last reviewed commit: "fix(core): log sanitized transaction err..." | Re-trigger Greptile |
koriyoshi2041
left a comment
There was a problem hiding this comment.
Validated exact head b1262b94f0 locally. cargo test -p surfpool-core surfnet::remote::tests::a_ -- --test-threads=1 passed 5/5: valid JSON-RPC null remains a missing transaction, provider failures reach the locker caller, and the 401/timeout paths retain useful failure categories without disclosing datasource userinfo, path, or query credentials. The post-review change also removes provider-controlled RpcError/Custom text rather than trying to redact only a full URL. git diff --check is clean; the only build output was the existing unrelated dead-code warning in the integration test module.
MicaiahReid
left a comment
There was a problem hiding this comment.
@xternet I can't merge without verified commit signatures: https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification
8785c15 to
69316d6
Compare
|
@MicaiahReid All three updated commits are now SSH-signed and shown as Verified by GitHub. Thanks. |
Summary
Surfpool's remote
getTransactionpath previously treated every client error as a missing transaction. This conflated two different RPC outcomes:null, meaning the transaction is unavailable; andThe Solana RPC client convenience method deserializes directly into a concrete transaction, so a valid
nullarrives through its error path too.Change
getTransactionresponse asOption<EncodedConfirmedTransactionWithStatusMeta>.nullmapped toGetTransactionResult::None.SurfpoolResultboundary.SurfnetRemoteClient::get_transactionreturn type with a compatibility wrapper; the new fallible method is crate-private.Regression coverage
nullresponse remainsNoneand verifies the exact outgoingGetTransactionrequest/config.None.401 Unauthorizedand the sanitized host but omits every secret.Validation
cargo test -p surfpool-core surfnet::remote::tests::a_ -- --test-threads=1— 5 passedcargo test -p surfpool-core --no-default-features surfnet::remote::tests::a_ -- --test-threads=1— 5 passedcargo +nightly fmt --all -- --checkcargo clippy -p surfpool-core --lib --no-default-features— completed with existing repository warnings onlygit diff --checkThis branch and #762 both add tests to
surfnet/remote.rs; whichever lands second may need a trivial rebase, but the production changes are independent.