LayerTwo-Labs / bip300301_enforcer

CUSF software enforcing BIP300 and BIP301 rules.
1 stars 4 forks source link

multi: create_sidechain_proposal implementation #57

Closed torkelrogstad closed 6 days ago

torkelrogstad commented 1 week ago

TODO:

For testing this locally:

$ buf curl --protocol grpc --http2-prior-knowledge \
     -d '{"declaration": {"v0": {"title": "title", "description": "description"}}}' \ 
      http://localhost:50051/cusf.mainchain.v1.WalletService/CreateSidechainProposal
torkelrogstad commented 1 week ago

I tested this locally on regtest, and got it to work. With this request:

# create_sidechain_proposal.json
{
  "sidechain_id": 1,
  "declaration": {
    "v0": {
      "title": "test",
      "description": "test",
      "hash_id_1": {
        "hex": "0000000000000000000000000000000000000000000000000000000000000000"
      },
      "hash_id_2": {
        "hex": "0000000000000000000000000000000000000000"
      }
    }
  }
}

$ buf curl --protocol grpc --http2-prior-knowledge \
    -d @create_sidechain_proposal_request.json \
    http://localhost:50051/cusf.mainchain.v1.WalletService/CreateSidechainProposal

I was able to create the proposal, and through generating a block I got it onto the blockchain where it was picked up and processed by the validator.