Skip to content
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

feat(svm): initial sbfv2 work #496

Merged
merged 8 commits into from
Feb 3, 2025
Merged

feat(svm): initial sbfv2 work #496

merged 8 commits into from
Feb 3, 2025

Conversation

Rexicon226
Copy link
Contributor

@Rexicon226 Rexicon226 commented Jan 15, 2025

This PR has two main improvements.

The first is including a source for building the testing ELF binaries from scratch, using Zig. The method there is quite simple, we emit LLVM bitcode (not IR, since IR is not backward compatible), and use the SBPF LLVM fork to compile and link to a shared library. There are certain ELF binaries that we want to be compiled for SBPFv1 as well since they test features that have been changed or deprecated since, so those are in the V1_FILES array in the bash script.

The second major change is expanding the ELF parser to support parsing SBPFv2 binaries. There isn't too much to say there, my implementation just closely follows how RBPF and Firedancer parse their ELF binaries. The tests should ensure that it's parsing correctly, as well as my solana-conformance work with the elf parser shows that most inputs pass.

Copy link
Contributor Author

Rexicon226 commented Jan 16, 2025

@Rexicon226 Rexicon226 self-assigned this Jan 16, 2025
Copy link
Contributor

@yewman yewman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

couple of minor questions otherwise lgtm

@Rexicon226 Rexicon226 force-pushed the Rexicon226/sbpfv2 branch 2 times, most recently from a15694e to a5a2d79 Compare January 21, 2025 19:32
Copy link
Contributor

@dnut dnut left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly I just have questions and mild suggestions, but a couple things look wrong.

@Rexicon226 Rexicon226 added this pull request to the merge queue Feb 3, 2025
Merged via the queue into main with commit 6ea81ac Feb 3, 2025
12 of 13 checks passed
@Rexicon226 Rexicon226 deleted the Rexicon226/sbpfv2 branch February 3, 2025 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

3 participants