Skip to content

Commit

Permalink
Use hosted version of kormir
Browse files Browse the repository at this point in the history
  • Loading branch information
bennyhodl committed Oct 31, 2024
1 parent 6b7827a commit 8c80544
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 66 deletions.
5 changes: 2 additions & 3 deletions ddk-node/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,14 @@ If you are testing local changes to [`ddk`](../ddk/) or running `ddk-node` local
# Start bitcoin and esplora
$ just deps
# Start kormir server that ddk-node runs
$ just kormir
$ just node-one # Start node one
$ just node-two # Start node two in a different terminal
$ just bc ...ARGS # Interface with the Bitcoin node.
```

An oracle is hosted at `https://kormir.dlcdevkit.com`

To interface the nodes with the CLI, you can use `just cli-one` and `just cli-two`.

To create an enum event with `kormir`:
Expand Down
6 changes: 3 additions & 3 deletions ddk-node/src/opts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ pub struct NodeOpts {
pub log: String,
#[arg(short, long)]
#[arg(help = "Set the Bitcoin network for DDK")]
#[arg(default_value = "regtest")]
#[arg(default_value = "signet")]
#[arg(value_parser = ["regtest", "mainnet", "signet"])]
pub network: String,
#[arg(short, long)]
Expand All @@ -34,11 +34,11 @@ pub struct NodeOpts {
#[arg(help = "Host and port the gRPC server will run on.")]
pub grpc_host: String,
#[arg(long = "esplora")]
#[arg(default_value = "http://127.0.0.1:30000")]
#[arg(default_value = "https://mutinynet.com/api")]
#[arg(help = "Esplora server to connect to.")]
pub esplora_host: String,
#[arg(long = "oracle")]
#[arg(default_value = "http://127.0.0.1:8082")]
#[arg(default_value = "https://kormir.dlcdevkit.com")]
#[arg(help = "Kormir oracle to connect to.")]
pub oracle_host: String,
#[arg(long)]
Expand Down
7 changes: 2 additions & 5 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,14 @@ deps:
ci-deps:
- docker compose up -d

kormir:
- {{justfile_directory()}}/testconfig/use-kormir.sh

bc *args:
- docker exec bitcoin bitcoin-cli --rpcport=18443 --rpcuser=ddk --rpcpassword=ddk -rpcwallet=ddk {{args}}

node-one:
- cargo run --bin ddk-node
- cargo run --bin ddk-node -- --network regtest --esplora http://127.0.0.1:30000

node-two:
- cargo run --bin ddk-node -- --port 1777 --grpc 0.0.0.0:3031 --storage-dir ~/.ddk/node-two
- cargo run --bin ddk-node -- --network regtest --esplora http://127.0.0.1:30000 --port 1777 --grpc 0.0.0.0:3031 --storage-dir ~/.ddk/node-two

cli-one *args:
- cargo run --bin ddk-cli {{args}}
Expand Down
55 changes: 0 additions & 55 deletions testconfig/use-kormir.sh

This file was deleted.

0 comments on commit 8c80544

Please sign in to comment.