Bitcoin Checkpointing MVP
Abstract
This PR add the checkpointing feature in Bitcoin (see #41).
Details
- [x] Load distributed key file
config.toml(see./data/alice/config.toml) - [x] Ping bitcoind to see if available
- [x] Connect to participants using Libp2p PubSub
- [x] Generate new distributed keys among participants
- [x] First participant publish the funding transaction to the taproot address (loaded pubkey + block 0 CID)
- [x] Every 20 blocks create a new checkpoint
- [x] Create a config file in S3
- [x] Collect precedent checkpoint tx (add taproot address to wallet and list transactions)
- [x] Verify checkpoints
- [ ] Kick misbehaving participant
- [x] Sign using tweaked value in a distributed fashion
- [x] Mocked power actors
Run it
You will need docker bitcoind running locally under port 18443 with rpc user satoshi and rpc password amiens.
Under data you will find preconfigure participants in order to quickly start (Alice, Bob and Charlie).
$ make eudico
$ ./scripts/taproot.sh
It will start 3 nodes and a miner.
After rebasing I started to have this error :
2021-12-03T14:23:59.999+0100 ERROR events events/events_called.go:352 event diff fn failed: cbor input had wrong number of fields
I am not sure how to fix it.
After rebasing I started to have this error : 2021-12-03T14:23:59.999+0100 ERROR events events/events_called.go:352 event diff fn failed: cbor input had wrong number of fields I am not sure how to fix it.
Try running make type-gen to generate all cbor schemas again. It seems like some state that you are unmarshalling the wrong state into an object. Let me know if you don't manage to fix it and I can try to look at it next week.
After adding the mocked power it seems that the error has disappeared.
@rllola, I did a first pass through the code and left a few comments. Let me know if you feel any part of the code needs a deeper review at this point. Feel free to resolve the comments as you fix them or if you see that they don't apply, and ping me whenever you need/want another review.