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

feat: backport versioned transactions #11

Open
wants to merge 4 commits into
base: 1.31.0-exodus
Choose a base branch
from

Conversation

kewde
Copy link

@kewde kewde commented Nov 3, 2023

This PR backport Versioned Transactions to 1.31.0 which is the only version that works on mobile right now due to the lack of BigInt and TextEncoder. Whenever a big int was required, we instead opt for a normal number which should technically be fine for now since it only impacts the slots which are currently at 227,790,149 so we don't expect it to overflow in the near future.

@kewde kewde requested a review from a team November 3, 2023 19:30
@andrejborstnik
Copy link

Whenever a big int was required, we instead opt for a normal number which should technically be fine for now since it only impacts the slots which are currently at 227,790,149 so we don't expect it to overflow in the near future.

@kewde usually we use BN.js as a replacement for BigInt. Even if size is not a problem precision might be - not sure if that is the case here. Try 0.1 + 0.2 === 0.3 😛

How would we test this PR?

@kewde
Copy link
Author

kewde commented Nov 6, 2023

@andrejborstnik recent slot should be an integer, my assumption here is that the precision should be fine 😅

@kewde
Copy link
Author

kewde commented Nov 6, 2023

How would we test this PR?

I've also backported the tests from the original version, which all pass at the moment.
The PR will not impact any existing code, it only adds a class for parsing versioned transactions, so I would like to release a beta version and test this on mobile with the dApp browser.

@kewde
Copy link
Author

kewde commented Nov 6, 2023

@andrejborstnik https://github.com/ExodusMovement/exodus-mobile/pull/16939 works on my end, can exchange on Jupiter again!

@gutenye
Copy link

gutenye commented Sep 9, 2024

@kewde Is this still needed?

@kewde
Copy link
Author

kewde commented Sep 12, 2024

@gutenye not for mobile, Hermes has BigInt.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants