-
Notifications
You must be signed in to change notification settings - Fork 45
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
Hardhat/anvil for Bitcoin local development #54
Comments
Here are some of the advantages of working with Anvil on Ethereum, I've extracted those which could also make sense for Bitcoin. The toolkit is quite configurable and has several options for startup:
It also provides a compatible ETH RPC interface and some additional methods:
The docs here list many more configurations and methods. |
The Bitcoin Dev Kit (BDK) provides a variety of tooling, for instance we can integrate the wallet functionality - signing and coin selection. |
Instead of writing our own tool from scratch we want to:
|
@gregdhill do you think we should close this issue and create a new one? |
I would be inclined to leave this open for now and get feedback from teams working directly with regtest so we can get a better idea of the pain points to determine if a more grandiose tool is required. We can open a separate issue to track the setup tooling you described above. |
Is your feature request related to a problem? Please describe.
Local development/regtest is difficult and often impractical, especially when a local Bitcoin node is required. It requires good knowledge of Bitcoin core (which is good to have) but:
bitcoin-cli
Describe the solution you'd like
We need an easy-to-use tool similar to
bitcoind -regtest
with additional functionality. It does not need to provide consensus compatibility, but should make it easier to replicate Bitcoin "quirks" for testing. For example with regtest we cannot emulate chain forks to test light client (SPV) logic, it is also cumbersome to auto-mine blocks andbitcoind
does not allow us to "fork" from some pre-existing state. The tool should be similar toanvil
from the Foundry suite and should provide Bitcoin RPC compatibility so we can re-use existing tools such as Electrs.Describe alternatives you've considered
We have been using
regtest
for quite some time, right now nothing exists which satisfies these requirements.Additional context
We should use
rust-bitcoin
and existing Bitcoin libraries as much as possible. We may need to provide additional tooling to support forking since we need to load state over HTTP(S), it may be possible with Electrs but requires further experimentation.The text was updated successfully, but these errors were encountered: