Closed buffalojoec closed 3 months ago
pls add me as a reviewer, will do this next week
@2501babe For some reason I'm only able to add myself as a review on this PR, not sure why. 🙁
i think you need to invite me as a collaborator https://stackoverflow.com/questions/57946787/cant-add-a-reviewer-for-github-pull-request
Thanks! I've invited you, Joe and Jon. 🙂
This PR adds the BPF version of the Address Lookup Table program.
For now, I felt like this was a good place to kill two birds with one stone:
Address Lookup Table (BPF)
This BPF implementation essentially replaces the following crates in
github.com:solana-labs/solana/programs
:address-lookup-table
address-lookup-table-tests
Biggest changes for BPF migration:
Errors
Errors are now inside of the program crate, not
solana_sdk
.This was necessary for the following reasons:
bincode::serialize(..)
does not return an error that maps to aProgramError
InstructionError
variants that do not have aProgramError
counterpart, such asInstructionError::Immutable
We should discuss whether or not to remove the original errors from the SDK and lean on the newly defined ones, or add the new ones necessary to the existing SDK module. Regardless, they will need to be modified to be able to map to
ProgramError
.PACKET_DATA_SIZE
andlimited_deserialize(..)
In this implementation, I added a temporary hack for
limited_deserialize
until we decide if and how to update the SDK.We can decide to export this if we want, if other programs also need it and it's useful to on-chain program developers.