Solnet icon indicating copy to clipboard operation
Solnet copied to clipboard

[Bug] call to getTransaction on a versioned transaction fail

Open nazbrok opened this issue 3 years ago • 7 comments

Solana introduced versioned transaction

currently Solnet support only LEGACY transaction because the optional parameter maxSupportedTransactionVersion is not set on getBlock and getTransaction

to my understanding we just need to always set this optional parameter to 0 to support both mode.

To Reproduce

Metaplex action house started to use versioned transaction. Here is a (failed) TX using versioned transaction : X1GTDnoauLQvM7VoZjC492dVY1YRmYCbUDPX7WwyuiWizFyigJfdGJh61Qrkr7hjAqoo8aVWJLWXEeRgqv7JQPp

calling getTransaction for this tx return this json

{"jsonrpc":"2.0","error":{"code":-32015,"message":"Transaction version (0) is not supported by the requesting client. Please try the request again with the following configuration parameter: \"maxSupportedTransactionVersion\": 0"},"id":54}

nazbrok avatar Dec 19 '22 09:12 nazbrok

https://github.com/bmresearch/Solnet/pull/419/commits/eac74306442d8585646c90cb17bf7b2b57f4a529

Added support for versioned transactions. I believe compile message needs a update to write versioned transaction from the client not totally sure so this only covers the reading portion.

BifrostTitan avatar Jan 07 '23 00:01 BifrostTitan

eac7430

Added support for versioned transactions. I believe compile message needs a update to write versioned transaction from the client not totally sure so this only covers the reading portion.

indeed this PR only aim to fix the reading portion for the moment. My knowledge of Solana isn't great so I didn't dive too much into the writing part (yet)

nazbrok avatar Jan 17 '23 00:01 nazbrok

Well looks like this PR only fix the call to getTransaction and getBlock and is finally not enough for the reading portion

The transaction format changed so Solnet currently fail to decode the tx because of the table lookup I think.

nazbrok avatar Jan 17 '23 00:01 nazbrok

https://github.com/bmresearch/Solnet/commit/eac74306442d8585646c90cb17bf7b2b57f4a529 This PR allows you to get & decode versioned transactions successfully. You will no longer get the client warning that you mentioned above. The response for the TX in your issue was related to requiring permission from the metaplex auction house. Feel free to pull from my fork and test yourself. Everything is available in typescript in the Solana Javascript SDK. It just needs to be coded in C# and added to solnet. Ill see what needs to be updated to allow versioned txs to be built and sent from solnet

BifrostTitan avatar Jan 17 '23 02:01 BifrostTitan

thanks, your implementation is better.

I quickly looked at the typescript implementation, I will try to give a try if I get the time.

nazbrok avatar Jan 17 '23 19:01 nazbrok

Hi @nazbrok have you managed to implement it in C#?

esculapeso avatar Jun 26 '23 14:06 esculapeso

Hi @nazbrok and @BifrostTitan I'm getting this error of this issue in some transactions! I saw that has a commit fixing this eac74306442d8585646c90cb17bf7b2b57f4a529 but seams to be on a on hold PullRequest https://github.com/bmresearch/Solnet/pull/428 Did you have some update of this issue? Do you need any help ?

rwspatin avatar Jan 08 '24 14:01 rwspatin

Hello guys ! I don't see any signature for : GetTransaction , that takes maxSupportedTransactionVersion as a parameter.

Did you guys code a new signature for GetTransaction and GetBlock that uses this maxSupportedTransactionVersion parameter ?

Thanks !

lowki1119 avatar Apr 26 '24 01:04 lowki1119

Why is it closed? Are you going to merge it? It seems still not fixed.

danikishin avatar May 28 '24 10:05 danikishin

It already been patched. Compile from source to use the latest version. The nuget package will be updated soon

https://github.com/bmresearch/Solnet/pull/419/commits/eac74306442d8585646c90cb17bf7b2b57f4a529

BifrostTitan avatar May 28 '24 10:05 BifrostTitan