Skip to content

Latest commit

 

History

History
59 lines (40 loc) · 1.58 KB

README.md

File metadata and controls

59 lines (40 loc) · 1.58 KB

🪓 BitVM2 Made Practical

Practical implementation of the BitVM2 protocol

📁 Contents

The project contains multiple crates:

Crate Description
splitter A crate for splitting the Bitcoin script into multiple parts as suggested by the recent BitVM2 paper.

Setting up a Local Bitcoin Node

docker compose up -d

Warning

Sometimes Docker Compose may fail at step of creating the volumes, the most simple solution is, in regards of failure, just trying starting it again several times until it works.

Let us create a temporary alias for bitcoin-cli from the container like this:

alias bitcoin-cli="docker compose exec bitcoind bitcoin-cli"

Create a fresh wallet for your user:

bitcoin-cli createwallet "my"

Warning

Do not create more than one wallet, otherwise further steps would require a bit of modification.

Generate fresh address and store it to environmental variable:

export ADDRESS=$(bitcoin-cli getnewaddress "main" "bech32")

Then mine 101 blocks to your address:

bitcoin-cli generatetoaddress 101 $ADDRESS

Note

Rewards for mined locally blocks will go to this address, but, by protocol rules, BTCs are mature only after 100 confirmations, so that's why 101 blocks are mined. You can see other in immature balances fields, after executing next command.

For more info about Bitcoin RPC API see 1.

bitcoin-cli getbalances

Footnotes

  1. https://developer.bitcoin.org/reference/rpc/