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

Validation of consensus rules #86

Open
thomaseizinger opened this issue Jul 15, 2021 · 7 comments
Open

Validation of consensus rules #86

thomaseizinger opened this issue Jul 15, 2021 · 7 comments

Comments

@thomaseizinger
Copy link
Contributor

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?

@sanket1729
Copy link
Member

Are there any plans on doing something similar in this library to the libbitcoinconsensus feature 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

@thomaseizinger
Copy link
Contributor Author

@sanket1729
Copy link
Member

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

@thomaseizinger
Copy link
Contributor Author

thomaseizinger commented Jul 22, 2021

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.

@apoelstra
Copy link
Member

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.

@thomaseizinger
Copy link
Contributor Author

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!

@apoelstra
Copy link
Member

Let's revisit after we get Elements 0.21 out. The more I think about this the more I like it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants