add covenants example with dockerfile for nitro enclave#4
Conversation
bcace16 to
4b8d7f7
Compare
|
Thanks for this PR! It's awesome we now have a working kernel that implements covenant opcodes. I need to run this on my own machine and may make a few changes to the examples folder (like putting this in its own sub-directory), but it looks good at first glance. While I prefer building things with Nix (see enclaver and confidential-script-tee) because we want reproducible PCR0's, I think it would be good to have an example built with Docker as well. |
|
|
||
| ENV Boost_DIR=/usr/lib/aarch64-linux-gnu/cmake/Boost-1.83.0 | ||
|
|
||
| RUN cargo zigbuild --release --target aarch64-unknown-linux-musl -p examples --bin covenants_example |
| serde = { version = "1.0", features = ["derive"] } | ||
| vsock = "0.5.1" | ||
| serde_json = "1.0" | ||
| bitcoinkernel-covenants = { git = "https://github.com/stutxo/rust-bitcoinkernel-covenants", branch = "covenants_enabled"} |
There was a problem hiding this comment.
Any reason you're pointing to your GitHub instead of the Rust crate? It might not be a bad idea actually, just to make clear that this isn't some official "covenants" crate, but I'm curious if you had different thinking, or if this was inadvertent.
There was a problem hiding this comment.
ah yeah i had to make a change to get it working, il change it back to use the crate
| vsock = "0.5.1" | ||
| serde_json = "1.0" | ||
| bitcoinkernel-covenants = { git = "https://github.com/stutxo/rust-bitcoinkernel-covenants", branch = "covenants_enabled"} | ||
| confidential-script-lib = { path = "../" } |
There was a problem hiding this comment.
My instinct is that examples should point to the latest version of the published library. That way users can just copy the example and run it.
There was a problem hiding this comment.
updated Cargo.toml to use the latest verson of the bitcoinkernel-covenats crate with this commit 6cacaa6
4b8d7f7 to
6cacaa6
Compare
This adds an examples folder with a
covenants_exampleusing a customCovenantVerifierwhich hasOP_CAT,OP_CSFSandOP_CTVenabledI have also added an example dockerfile that can be used to build targeted at
aarch64-unknown-linux-muslto create a static binary that is needed for nitro enclaves