forked from anza-xyz/solana-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Rebase #1
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
Merged
Merged
Rebase #1
Conversation
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
* Deprecate re-exports more loudly #### Problem There are many different crates and types that we would like to remove from the sdk, but they are still re-exported from solana-sdk and solana-program. The re-exports have a `#[deprecated(...)]` attribute, but they aren't flagged to downstream users. #### Summary of changes Make the re-export deprecations louder by creating a deprecated module and re-exporting from in there. These are the types affected * `DecodeError`: this trait isn't all that useful, and is set to be removed entirely with #104, so deprecate it here These are the crates to no longer re-export from solana-program because they will be moved to program-specific repos: * `address_lookup_table` -> `solana_address_lookup_table_interface` * `bpf_loader_upgradeable` -> `solana_loader_v3_interface` * `loader_upgradeable_instruction` -> `solana_loader_v3_interface::instruction` * `loader_v4` -> `solana_loader_v4_interface` * `loader_v4_instruction` -> `solana_loader_v4_interface::instruction` * `nonce` -> `solana_nonce` * `feature` -> `solana_feature_gate_interface` * `loader_instruction` -> `solana_loader_v2_interface` * `vote` -> `solana_vote_interface` * `stake` -> `solana_stake_interface` * `stake_history` -> `solana_stake_interface::stake_history` * `system_instruction` -> `solana_system_interface` * `system_program` -> `solana_sdk_ids::system_program` (not sure about this one) Separately, `solana_message` and `solana_sanitize` are no longer re-exported. They never quite fit in `solana_program`, and caused more annoyance than anything else. The re-exports remain in `solana_sdk`. `solana-decode-error` will be removed entirely, so its deprecation is louder too. For `solana-sdk`, there are many types that just don't belong, so stop re-exporting these: * `commitment_config` -> `solana_commitment_config` * `genesis_config` -> `solana_genesis_config` * `hard_forks` -> `solana_hard_forks` * `rent_collector` -> `solana_rent_collector` * `alt_bn128` -> `solana_bn254` * `client` -> `solana_client_traits` * `compute_budget` -> `solana_compute_budget_interface` * `derivation_path` -> `solana_derivation_path` * `ed25519_instruction` -> `solana_ed25519_program` * `nonce_account` -> `solana_nonce_account` * `packet` -> `solana_packet` * `poh_config` -> `solana_poh_config` * `quic` -> `solana_quic_definitions` * `rent_debits` -> `solana_rent_debits` * `secp256k1_instruction` -> `solana_secp256k1_program` * `secp256k1_recover` -> `solana_secp256k1_recover` * `system_transaction` -> `solana_system_transaction` * `exit` -> `solana_validator_exit` * Address review feedback
…155) Adds UpgradeableLoaderInstruction::ExtendProgramChecked.
Marks the authority in extend_program_checked() as signer.
* Add syscalls helpers * Add syscalls feature * Reuse helpers in solana program * Review comments
Add no_std attribute
#### Problem The `generate()` function on `Keypair` exposes a public dependency on `rand` because it requires certain types from the crate. Using the public type from an external crate in our interface means that we can't upgrade without breaking downstream users. #### Summary of changes Mark the function as deprecated, and provide a new way to create a random keypair using `new_from_array`. Unfortunately, we can't mark the function as `const` because the dalek types don't have const constructors.
…tion idx (#162) instructions: check data length before storing current instruction idx for sysvar instructions
#### Problem The `sol_to_lamports` and `lamports_to_sol` functions are problematic because they use floats, which are not precise. #### Summary of changes Deprecate the functions, and add versions that use strings instead.
#### Problem When building certain crates with `cargo build-sbf`, we generate warnings currently, which isn't great for downstream users. #### Summary of changes Fix the warnings, and make CI stricter by forbidding warnings.
#### Problem The YAML file apparently isn't parsable: https://github.com/anza-xyz/solana-sdk/actions/runs/15467354813 #### Summary of changes Remove the quotes around the args, which seems to help pass a check.
#### Problem The minimal versions check is now failing when building the toml crate. #### Summary of changes Bump the toml crate to the newest version, which seems to resolve the issue. No other version worked.
#### Problem The `ToStr` trait is a bit difficult to use, forcing a lot of redundant uses of types, when programs will just want to call `err.to_str::<MyError>()`. #### Summary of changes Simplify the trait to not require anything, then add a generic `to_str` function directly on `ProgramError` that allows us to get the error message for a particular error type. Also, clarify the deprecation warning on `DecodeError`. BREAKING CHANGE: the `ToStr` trait requires fewer bounds
* sdk!: Remove re-exports #### Problem It's time to make breaking changes in the sdk! There are a lot of deprecated symbols all over the repository, especially in solana-sdk. #### Summary of changes Remove all deprecated symbols and dependencies from solana-sdk, and include upgrade information in the README for people porting their code. BREAKING CHANGE: many re-exports and symbols removed, documented in the README * Add links * Update README.md Co-authored-by: Fernando Otero <febo@anza.xyz> --------- Co-authored-by: Fernando Otero <febo@anza.xyz>
* Space efficient panic * Add `sol_panic_` syscall definition * Bump platform tools version * Bump solana cli version * Change rust version from program/Cargo.toml BREAKING CHANGE: bumps msrv due to new panic type only available in Rust 1.81.0
* program!: Remove all re-exports, update changelog #### Problem There are many re-exports in solana-program that don't make sense, and should instead use component crates. #### Summary of changes Remove those re-exports, and document it in the README. BREAKING CHANGE: re-exports removed. * Add now-needed feature for transaction tests
fix solana crates dependencies to versions in crates.io for now
… submodules (#192) * add `pubkey` and `secret_key` submodules and refactor * use workspace versions for solana crates dependency * refactor logic in `lib.rs` to relevant submodules * fix bpf build visibility * format and clippy * fix a bad merge * cargo sort
Co-authored-by: Jon C <me@jonc.dev>
* Make it no_std * Add missing unsafe * Use unsafe * Fix rebase
* make std optional in solana-msg * lint * cargo sort
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.
No description provided.