-
Notifications
You must be signed in to change notification settings - Fork 3
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
program: introduce core BPF implementation #7
program: introduce core BPF implementation #7
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. Join @buffalojoec and the rest of your teammates on Graphite |
f4b68c0
to
227a8a0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks really good for the most part! Lots of comments, but mostly small things
program/Cargo.toml
Outdated
@@ -0,0 +1,35 @@ | |||
[package] | |||
name = "address-lookup-table" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: are we going with solana-program-address-lookup-table
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can do better. I'd love us to commit on a good naming convention. Our current one is:
Organization name: solana-program
Program name: address-lookup-table
Program crate name: solana-program-address-lookup-table
Rust client crate name: solana-program-address-lookup-table-client
JS client package name: @solana-program/address-lookup-table
I like the JS client package name but maybe the crates are a bit too verbose. We could replace solana-program-
with something like spl-
for crate names but then we risk to have conflicts with existing ones.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about just sp-
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess for any programs we port over from SPL land, sp
would be royally confusing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah... we haven't been able to come up with anything better. The crate is currently called solana-address-lookup-table-program
so I'm not too fussed about solana-program-address-lookup-table
, unless we want to create a new acronym to make it totally clear that it's different.
I haven't liked anything enough to push for it. I don't think we should use spl-
though, that means something different. The best might be to use sbpf
in it, so I could (weakly) vouch for sbpf-address-lookup-table-program
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I went with scbpf-
for now, but let's see where we land in talks. Lmk if this should block merging. Ideally we aren't publishing anytime soon.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's fine, we can stick with that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For anyone reading this, the conversation continued here:
https://discord.com/channels/428295358100013066/1204657211402489876/1215666108141539358
ad4436b
to
6a92d6a
Compare
227a8a0
to
ac1776b
Compare
@joncinque I believe I've addressed everything here in some follow-up commits. Just need to land on the crate name. |
f78f0ec
to
8fa1a4a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All right, good to go on my side!
6a92d6a
to
ea4af0a
Compare
e697aa7
to
79db606
Compare
Merge activity
|
ea4af0a
to
056f91b
Compare
79db606
to
f7164f3
Compare
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:
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 noProgramError
counterpart(#35113).
InstructionError::IncorrectAuthority
has noProgramError
counterpart(#35113).
solana-program-test
will not overwrite a builtin if the BPF program you'veprovided shares the same address as an existing builtin
(#35233).
The following caveat seems to be unavoidable:
build.rs
script and annotations inlib.rs
are required forsolana-frozen-abi-macro
(See Determine proper build script and Frozen ABI compatibility #3).Finally, I've implemented a cooldown period based on
Clock
, but this willlikely not be sufficient. I think we should consider merging this initial
implementation and leaving #1 unfinished until the proper research is completed.