-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Conversation
Codecov Report
@@ Coverage Diff @@
## master #25141 +/- ##
===========================================
- Coverage 82.0% 75.1% -7.0%
===========================================
Files 610 38 -572
Lines 167945 2243 -165702
Branches 0 323 +323
===========================================
- Hits 137868 1686 -136182
+ Misses 30077 444 -29633
- Partials 0 113 +113 |
Hmm, by the same logic, I could see an argument for allowing the fee payer, or even instructions, to be mutated, as long as the transaction hasn't been signed yet. Maybe the change that should be made is not to remove these fields but to make the check specific to signed transactions? |
Good point. What do you think about allowing anything in the transaction to be modified? We just trust devs to know that if they modify the transaction, any existing signatures would be invalidated. The main thing that #23720 fixed was ensuring that a deserialized transaction would serialize to the same thing if it wasn't touched. |
So crazy it just might work! But yeah, throwing an error isn't great either, so maybe we just reserialize if changed? |
Yeah, that's exactly what I'm thinking. Let me know what you think of the updated PR |
LGTM! |
* fix: backport solana-labs/solana#23720 * fix: backport solana-labs/solana#24475 * fix: backport solana-labs/solana#25141
Problem
After deserializing a transaction, it's not possible to sign and send because sending the transaction could mutate the transaction's blockhash and cause a mutation error.
Summary of Changes
Allow mutating the recent blockhash of a deserialized transaction
Fixes #25137