-
Notifications
You must be signed in to change notification settings - Fork 754
svm: re-land Firedancer testing harness without git submodules #8416
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
svm: re-land Firedancer testing harness without git submodules #8416
Conversation
The Firedancer team maintains a line-for-line reimplementation of the |
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.
@cmoyes-jump @mjain-jump @topointon-jump Thanks for putting this back up guys.
I think we just need to iterate on the protobuf library, to get rid of those weird wrapper types.
What you can do is actually use cargo links and just keep the protos in a crate in Git almost exactly like you're doing. You just need a little sugar to pull it off.
Check this out: https://github.com/buffalojoec/protolib-example
// Wrapper type to work around orphan rules | ||
pub struct ProtoAccount(pub AcctState); |
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.
Ah, this stinks. I have an idea that might work for this.
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.
Updated to use Cargo links
2edfbbe
to
db53e2a
Compare
let proto_dir = PathBuf::from( | ||
env::var("DEP_PROTOSOL_PROTO_DIR") | ||
.expect("protosol did not expose PROTO_DIR"), | ||
); |
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.
Isn't this going to panic whenever we run cargo build
without the environment variable set? I think that is a nuisance to Agave developers, and a potential problem for CI.
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.
Check out my example above (here). It's not a variable we set, but a build step by the dependency crate. It should never panic.
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.
This variable gets automatically set by Cargo during the build process.
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.
Ship it! 🚢
For anyone on-looking, a few use-cases for this library, which will come with us to the new SVM repo:
- Replace all usages of Bank in
programs/sbf
- Mature tooling for regression testing two versions of a program (ie. a Pinocchio-ified version vs. the original)
- Regression tests between SVM versions
Similar intentions apply to the rest of SolFuzz-Agave.
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.
Ahh, looks like just some minor CI stuff. Gotta fix clippy/fmt and then there's a Windows-specific issue resulting from just the path getting clobbered.
error: failed to run custom build command for `protosol v1.0.1 (https://github.com/firedancer-io/protosol?tag=v1.0.1#c842af8d)`
Caused by:
process didn't exit successfully: `D:\a\agave\agave\target\debug\build\protosol-e5a6d5a49ffd6ab7\build-script-build` (exit code: 1)
--- stdout
cargo:rerun-if-changed=\\?\C:\Users\runneradmin\.cargo\git\checkouts\protosol-696d8300f4248d03\c842af8\proto
cargo:PROTO_DIR=\\?\C:\Users\runneradmin\.cargo\git\checkouts\protosol-696d8300f4248d03\c842af8\proto
cargo:rerun-if-changed=\\?\C:\Users\runneradmin\.cargo\git\checkouts\protosol-696d8300f4248d03\c842af8\proto\block.proto
cargo:rerun-if-changed=\\?\C:\Users\runneradmin\.cargo\git\checkouts\protosol-696d8300f4248d03\c842af8\proto\context.proto
cargo:rerun-if-changed=\\?\C:\Users\runneradmin\.cargo\git\checkouts\protosol-696d8300f4248d03\c842af8\proto\elf.proto
cargo:rerun-if-changed=\\?\C:\Users\runneradmin\.cargo\git\checkouts\protosol-696d8300f4248d03\c842af8\proto\invoke.proto
cargo:rerun-if-changed=\\?\C:\Users\runneradmin\.cargo\git\checkouts\protosol-696d8300f4248d03\c842af8\proto\metadata.proto
cargo:rerun-if-changed=\\?\C:\Users\runneradmin\.cargo\git\checkouts\protosol-696d8300f4248d03\c842af8\proto\pack.proto
cargo:rerun-if-changed=\\?\C:\Users\runneradmin\.cargo\git\checkouts\protosol-696d8300f4248d03\c842af8\proto\serialize.proto
cargo:rerun-if-changed=\\?\C:\Users\runneradmin\.cargo\git\checkouts\protosol-696d8300f4248d03\c842af8\proto\shred.proto
cargo:rerun-if-changed=\\?\C:\Users\runneradmin\.cargo\git\checkouts\protosol-696d8300f4248d03\c842af8\proto\txn.proto
cargo:rerun-if-changed=\\?\C:\Users\runneradmin\.cargo\git\checkouts\protosol-696d8300f4248d03\c842af8\proto\type.proto
cargo:rerun-if-changed=\\?\C:\Users\runneradmin\.cargo\git\checkouts\protosol-696d8300f4248d03\c842af8\proto\vm.proto
--- stderr
Error: Custom { kind: Other, error: "protoc failed: block.proto: File not found.\r\n" }
I think you just need to adjust your path logic to support windows.
You should probably either get rid of .canonicalize()
or use #[cfg(windows)]
to strip the leading \\?\
for Windows paths.
…ons (anza-xyz#8047) (anza-xyz#8402)" This reverts commit 58863b0.
9834f35
to
5350fd0
Compare
Problem
We need a fast, reliable way to catch regressions across SVM components as we push forward on direct mapping, ABI v2, and other major runtime changes.
This approach does not clone the test-vectors repo, or run test-vectors in CI, and vendors protobuf using a crate instead of a git submodule.
Summary of Changes