-
Notifications
You must be signed in to change notification settings - Fork 34
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
Making bitcoind
and electrsd
production-grade?
#123
Comments
Great to know!
Not that I am aware of
The only functional change I see to achieve this is to make the network configurable, which I would accept. But I am not sure I get the entire picture of using this out of the testing framework.
I think there is some work to accomplish this:
Also |
This is not a big deal for us. We're happy to contribute to the 'productionizing' of these crates and use them without API stabilization guarantees. Although, if we change the wording of the readme and other documents to express that this crate is actually ready for production use, people will probably expect that API-breaking changes (before 1.0.0) come with a minor version bump, but it seems you stick to this already. If you do accept to productionize however I think it is important to remove the "integration testing" phrasing throughout the docs to make it clear to contributors that security and reliability should be taken more seriously than would be for simple test util code.
Happy to contribute here too. Reading through the code it seems like you've already done a good job of avoiding random Another thing to think about is an async interface. All the rest of our Rust code is async, so integrating with this crate comes with a bit of a mismatch. Thankfully, this harness code is pretty high-level, rather than something that needs to be very efficient or performant, so we can probably get around it with |
Sure, I'm happy to be a second maintainer of this crate. But @MaxFangX I'd encourage you to take a quick look at whether Nix would be a better fit than Rust for this sort of thing. Nix is is dynamically typed but it is strongly typed, unlike Bash, and can provide determinisism/reproducibility guarantees that Rust can't. (That blog post describes doing integration tests for Python and isn't directly applicable to rust-bitcoin. It's just somewhat accessible. But you can take a look at the nix-bitcoin project to see what's possible for bitcoind.) |
Thanks @apoelstra, I'll look into it! |
I currently focus my efforts on the Speaking about alternatives there's also |
I am not sure if there is a best-practice method to reproducibly build |
The
bitcoind
/electrsd
crates have been enormously helpful for our integration testing, and we (Lexe) think they could be very useful in production as well.Our interest in a production-grade
bitcoind
/electrs
Rust harnesses: Due to the headaches of managing bash scripts / config files / systemd service files and whatnot, we actually decided to write our production (as well as testnet, dev, regtest etc) orchestration code in pure Rust, so that we could handle all of our argument shuttling in a strongly-typed language, resulting in a sharp reduction in deployment errors. Cleaning upbitcoind
andelectrsd
to be "production-grade" software would allow us to extend our current paradigm to the deployment of these services as well, and allows bitcoind / electrsd arguments to be programmatically configurable in production. We also have an internal framework which centralizes things like CLI arguments, config files, and environment variables, so exposing Rust hooks into abitcoind
/electrs
harness allows us to reuse this system as well.So, I wanted to start a discussion on this. Some questions:
bitcoind
/electrsd
crates from a "production" standpoint, and what work would need to be done to accomplish this?bitcoind
/electrs
harness so different that it would be better to develop them in separate repositories? (My hunch is this is not so).Especially interested in your thoughts @RCasatta.
The text was updated successfully, but these errors were encountered: