fix: preserve explicit transaction inputs in HTTP helpers - #6
Open
Astreo666 wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Preserve explicit transaction inputs in HTTP convenience methods
Summary
HTTP convenience methods now preserve their resolved account and nonce when delegating to
place_tx.Problem
Each convenience method resolved the caller-supplied account and nonce and placed them in
ActionMeta, but then calledplace_tx(..., None, None).place_txconsequently selected the signer's account and generated another nonce for the outer signed transaction.This made the wire transaction differ from the explicit values accepted by the convenience API.
Changes
Forward the resolved account and nonce into
place_txfrom all affected methods:Add loopback HTTP regression tests that capture the serialized request body and assert the actual wire-level account and nonce for all ten convenience paths.
Compatibility
No public signatures change. Calls that pass
Noneretain the existing defaulting behavior because each method first resolves the signer account and generated nonce. Calls that provide explicit values now observe those same values in the final signed transaction.Validation
cargo test -p bulk-client --all-targets: pass.cargo test --workspace --all-targets: pass.rustfmt --checkfor both changed files: pass.git diff --check: pass.clippy -D warningsis blocked by 15 pre-existing warnings at the pinned base commit; a detached baseline check reproduced the same 15 failures. No unrelated lint cleanup is included in this PR.Test isolation
The regression tests bind an ephemeral loopback port and make no production or testnet requests.
Scope
SDK correctness fix. No security impact is claimed.