eudico icon indicating copy to clipboard operation
eudico copied to clipboard

Bitcoin Checkpointing MVP

Open rllola opened this issue 4 years ago • 4 comments

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.

rllola avatar Dec 03 '21 13:12 rllola

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.

rllola avatar Dec 03 '21 13:12 rllola

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.

adlrocha avatar Dec 03 '21 16:12 adlrocha

After adding the mocked power it seems that the error has disappeared.

rllola avatar Dec 04 '21 13:12 rllola

@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.

adlrocha avatar Dec 10 '21 10:12 adlrocha