feat(solana): expose solana default keys#2485
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR exposes Solana’s default test-validator identity keys as exported constants in the blockchain component, and adds a regression test to ensure the constants remain consistent with the embedded id.json keypair bytes.
Changes:
- Add
DefaultSolanaPrivateKeyandDefaultSolanaPublicKeyconstants to the Solana blockchain component. - Add a unit test that derives base58 encodings from
idJSONRawand asserts they match the exported constants. - Add
github.com/mr-tron/base58as a direct Go module dependency (and updatego.sum).
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| framework/components/blockchain/solana.go | Exports default Solana test-validator key constants. |
| framework/components/blockchain/solana_test.go | Adds a consistency test that base58-encodes idJSONRaw and compares against the exported constants. |
| framework/go.mod | Adds mr-tron/base58 dependency. |
| framework/go.sum | Records checksums for the new dependency. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
f21f425 to
24245fc
Compare
Tofel
approved these changes
Mar 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Below is a summarization created by an LLM (gpt-4-0125-preview). Be mindful of hallucinations and verify accuracy.
Why
The changes introduce a new constant for the default Solana private and public keys within the Solana blockchain component to facilitate testing with a known keypair. Additionally, a new test is added to ensure the consistency of these keys with the raw key data. The update in dependencies includes adding the
github.com/mr-tron/base58package, which is used for encoding and decoding the keys, ensuring compatibility with Solana's base58-encoded key format.What
framework/components/blockchain/solana.goDefaultSolanaPrivateKeyandDefaultSolanaPublicKeyconstants.These changes introduce default keys for testing purposes, ensuring developers can work with a consistent and expected environment.
framework/components/blockchain/solana_test.goTestDefaultSolanaKeypairConsistencyto check the consistency of the default keys with the raw key data.This ensures the integrity of the default keys, confirming they match the expected values derived from the raw keypair data.
framework/go.modandframework/go.sumgithub.com/mr-tron/base58 v1.2.0to dependencies.This addition supports the new test implementation by providing necessary base58 encoding and decoding, aligning with Solana's key format.