This repository was archived by the owner on Jan 22, 2025. It is now read-only.
sdk: add Immutable and IncorrectAuthority to ProgramError#35113
Merged
buffalojoec merged 1 commit intosolana-labs:masterfrom Feb 7, 2024
Merged
sdk: add Immutable and IncorrectAuthority to ProgramError#35113buffalojoec merged 1 commit intosolana-labs:masterfrom
Immutable and IncorrectAuthority to ProgramError#35113buffalojoec merged 1 commit intosolana-labs:masterfrom
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #35113 +/- ##
=========================================
- Coverage 81.6% 81.6% -0.1%
=========================================
Files 830 830
Lines 224955 224963 +8
=========================================
- Hits 183752 183728 -24
- Misses 41203 41235 +32 |
Contributor
|
Backports to the beta branch are to be avoided unless absolutely necessary for fixing bugs, security issues, and perf regressions. Changes intended for backport should be structured such that a minimum effective diff can be committed separately from any refactoring, plumbing, cleanup, etc that are not strictly necessary to achieve the goal. Any of the latter should go only into master and ride the normal stabilization schedule. Exceptions include CI/metrics changes, CLI improvements and documentation updates on a case by case basis. |
CriesofCarrots
approved these changes
Feb 7, 2024
buffalojoec
added a commit
to solana-program/address-lookup-table
that referenced
this pull request
Mar 13, 2024
This PR introduces the Core BPF implementation of Address Lookup Table. There are a few caveats with the implementation so far. You can find them in the source code by searching for comments prefixed with: ``` [Core BPF]: ``` The following caveats will be solved in the next Solana release, and a discussion can be had for backporting any of these changes: - `InstructionError::Immutable` has no `ProgramError` counterpart ([#35113](solana-labs/solana#35113)). - `InstructionError::IncorrectAuthority` has no `ProgramError` counterpart ([#35113](solana-labs/solana#35113)). - `solana-program-test` will not overwrite a builtin if the BPF program you've provided shares the same address as an existing builtin ([#35233](solana-labs/solana#35233)). The following caveat seems to be unavoidable: - The `build.rs` script and annotations in `lib.rs` are required for `solana-frozen-abi-macro` (See #3). Finally, I've implemented a cooldown period based on `Clock`, but this will likely not be sufficient. I think we should consider merging this initial implementation and leaving #1 unfinished until the proper research is completed.
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Problem
Two error variants from
solana_sdk::instruction::InstructionErrorare used in the Address Lookup Table's processor. However, as we prepare to port this program to BPF, we will require these error counterparts to exist insolana_program::program_error::ProgramError.Variants:
InstructionError::ImmutableInstructionError::IncorrectAuthoritySummary of Changes
Add the variants to
solana_program::program_error::ProgramError.