Validation of consensus rules
Are there any plans on doing something similar in this library to the libbitcoinconsensus feature in rust-bitcoin?
At the moment, we are testing all of our stuff by spinning up elementsd instance which is obviously quite slow. It would be cool if we could at least test a subset of the functionality, in particular script evaluation, in a unit test.
What would it take to make that happen?
Are there any plans on doing something similar in this library to the
libbitcoinconsensusfeature in rust-bitcoin?
At present, there is no such project planned.
What would it take to make that happen?
I guess we need bindings similar to those we have for rust-bitcoin for script/bitcoinconsensus.h file in ElementsProject/elements
I made a thing: https://github.com/comit-network/rust-elements-consensus
Thanks for doing this :). We will also require this for internal testing of our complicated scripts like covenants. I can offer help in maintaining/reviewing code for the repository.
And if it is okay with you, we can also move this into ElementsProject org so that other developers who are working with rust-elements can also find it there. cc @apoelstra
It is highly experimental at the moment 😁
But have a look please yes! We will be playing around with it internally soon, can report back on whether or not it works as intended. Once that happens, I was planning to release it on crates.io.
If we wanted to make this more official-y, I think a good way forward would be to just have the -sys crate and integrate the rest directly into rust-elements. That way, less things have to be kept in sync.
Can always feature-gate it to reduce dependency bloat.
If it's useful we can move it into ElementsProject, but let's give it a bit to see how much mileage we get out of it.
It has worked well for us to test spending of covenant scripts, but it is not released yet to crates.io. Happy to transfer it into the org if you find it useful as well!
Let's revisit after we get Elements 0.21 out. The more I think about this the more I like it.