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

rpc: replace default encoding from Binary to Base64 #29356

Closed
wants to merge 1 commit into from

Conversation

fanatid
Copy link
Contributor

@fanatid fanatid commented Dec 21, 2022

Problem

Right now JS library use base64 as the default encoding and solana-client do not use Binary/Base64 as the default encoding. But RPC still assumes Binary as default which has a length limitation of encoding account data (128 bytes).

Summary of Changes

This PR change UiAccountEncoding::Binary is few RPC methods to UiAccountEncoding::Base64.

@mergify mergify bot added the community Community contribution label Dec 21, 2022
@mergify mergify bot requested a review from a team December 21, 2022 14:05
@CriesofCarrots
Copy link
Contributor

I totally agree with the impetus here, but unfortunately these are technically breaking changes for cases where users do not supply an encoding parameter, and violate our backward compatibility policy. (With the exception of the test change. That one we could totally do, but there's no great reason to.)
Sorry. That said, we are discussing establishing a JSON-RPC spec, and this is absolutely something we can fix in that "v2" implementation.

@fanatid
Copy link
Contributor Author

fanatid commented Dec 21, 2022

Yeah, it would be a breaking change. Any ETA for v2? 😬

@CriesofCarrots
Copy link
Contributor

Yeah, it would be a breaking change. Any ETA for v2? 😬

No specific timeline yet, but definitely follow that issue I linked: solana-foundation/specs#22
Okay if I close this?

@fanatid
Copy link
Contributor Author

fanatid commented Dec 22, 2022

Yeah, let's close it 🙂

@fanatid fanatid closed this Dec 22, 2022
@fanatid fanatid deleted the rpc-default-encoding branch December 22, 2022 00:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community Community contribution
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants