Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[web3.js] Discrepancy between legacy Transaction API and new VersionedTransaction API #28900

Closed
vovacodes opened this issue Nov 20, 2022 · 2 comments · Fixed by #28990
Closed
Assignees
Labels
community Community contribution javascript Pull requests that update Javascript code

Comments

@vovacodes
Copy link
Contributor

vovacodes commented Nov 20, 2022

Problem

Version: @solana/[email protected]

Combination of VersionedTransaction.deserialize and TransactionMessage.decompile produces different result from the legacy Transaction.from API when deserializing the same exact transaction.

Reproduction below (note the difference in the isWritable flag of the last key)
Screenshot 2022-11-20 at 23 31 41

https://codesandbox.io/p/sandbox/funny-ride-1zmikd

While not 100% sure, I believe the legacy API produces the correct result and the new API is being wrong.

Serialized transaction
AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAUHLl06XmBMUgEaGqFEDWXlrfuG9BxuqyiqilWnn+lBhO3ljbFniLvsim6dTEc5cyoTN2b5SA3mE/vy52heCKtBsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACK/25BBZJGavm0hr5XZ58vaLQc3cMeAgkndKj2Ni7RPDGxjMPhSKClKTgYkg7frtqzkeSTNsC3TbZp0QRwNCSwUhn4magdT/hPtZPS7fipCsGzqzQlj33yM+pQMCsb0uBX82VZkozhurrbZbi12eMbon+FOb7GAsyxrcKvufRnDqK6IjeTZQF0WwCoTTZmOO6HR7bBk26zWjZL9jPKBtpQEFBgAGAQMEAhHyI8aJUuHytv5AQg8AAAAAAA==
@vovacodes vovacodes added the community Community contribution label Nov 20, 2022
@steveluscher steveluscher added the javascript Pull requests that update Javascript code label Nov 21, 2022
@steveluscher
Copy link
Contributor

Thanks for this! Super helpful. I'll take a look in a bit.

@steveluscher steveluscher self-assigned this Nov 21, 2022
@steveluscher
Copy link
Contributor

Found the bug. I'm so grateful for your find!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community Community contribution javascript Pull requests that update Javascript code
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants