Skip to content

Commit

Permalink
Change instructions for installing cardano-node. (#94)
Browse files Browse the repository at this point in the history
  • Loading branch information
Radu Ometita authored Nov 15, 2021
1 parent d575565 commit 4ecc1d9
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
22 changes: 13 additions & 9 deletions plutus-pab/test-node/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,19 @@ Steps:

You will need ~6 terminals to run all the different components.

1. Install cardano-node using the instructions found [here](https://github.com/input-output-hk/cardano-node/blob/master/README.rst)

1. Build all the necessary components:
Please make sure that the binary that you are executing is indeed that one that
you installed by using the command: `which cardano-node`.

2. Build all the necessary components:

```
> cd $PLUTUS
> cabal build plutus-pab-examples plutus-chain-index cardano-node cardano-wallet
```

2. Start the testnet node locally:
3. Start the testnet node locally:

```
> cd $PLUTUS/plutus-pab/test-node/
Expand All @@ -33,7 +37,7 @@ You will need ~6 terminals to run all the different components.
Note: It's important that this is done from the specific directory, because
the config paths are relative.

3. Run the cardano wallet backend:
4. Run the cardano wallet backend:

```
> cd $PLUTUS/plutus-pab/test-node/
Expand All @@ -42,7 +46,7 @@ You will need ~6 terminals to run all the different components.
--node-socket testnet/node.sock
```

4. Create or restore a public testnet wallet:
5. Create or restore a public testnet wallet:

Here you have a few options. You can re-use an existing wallet, or create
one.
Expand Down Expand Up @@ -99,14 +103,14 @@ You will need ~6 terminals to run all the different components.

![](faucet-example.png)

5. Start the chain index:
6. Start the chain index:

```
> cd $PLUTUS/plutus-pab/test-node/
> cabal exec -- plutus-chain-index --config testnet/chain-index-config.json start-index
```

6. Start the PAB:
7. Start the PAB:

If it's the first time your running, you'll need to ask the PAB to make the
database:
Expand All @@ -126,7 +130,7 @@ You will need ~6 terminals to run all the different components.
--passphrase pab123456789
```

7. Wait for all chain clients (`cardano-node`, `cardano-wallet`,
8. Wait for all chain clients (`cardano-node`, `cardano-wallet`,
`plutus-pab-examples`, `plutus-chain-index`) to fully synchronise with the testnet.

On my computer, the wallet takes about 1 hour, and the chain index takes
Expand Down Expand Up @@ -156,15 +160,15 @@ You will need ~6 terminals to run all the different components.
complete eventually; but if you want to see it live, then wait.)


8. **Start the integration test**
9. **Start the integration test**

```
> curl -H "Content-Type: application/json" -v -X POST -d \
"{\"caID\":{\"tag\":\"IntegrationTest\"},\"caWallet\":{\"getWalletId\":\"$WALLET_ID\"}}" \
localhost:9080/api/contract/activate
```

9. Wait for the integration test to finish.
10. Wait for the integration test to finish.

There will be a message like `"Tx confirmed. Integration test complete."`
printed from the console running the pab.
Expand Down
2 changes: 1 addition & 1 deletion plutus-pab/test-node/start-testnet-node.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

cabal exec cardano-node -- run \
cardano-node run \
--config testnet/testnet-config.json \
--topology testnet/testnet-topology.json \
--database-path testnet/db \
Expand Down

0 comments on commit 4ecc1d9

Please sign in to comment.