Skip to content

Commit

Permalink
Remove hydra-tools executable
Browse files Browse the repository at this point in the history
Also remove hydra-tools mentioning from various readme files and
docs.
  • Loading branch information
v0d1ch committed Aug 21, 2023
1 parent 7af62d0 commit 1a94dcd
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 111 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
As a minor extension, we also keep a semantic version for the `UNRELEASED`
changes.

## [0.13.0] - UNRELEASED

- Remove hydra-tools package. Move functionality to generate hydra keys to the
hydra-node executable.

## [0.12.0] - 2023-08-18

- **BREAKING** Support new cardano-node version 8.1.2
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/getting-started/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ docker run --rm ghcr.io/input-output-hk/hydra-node --help

## Using prebuilt static binaries

We provide builds for `hydra-node`, `hydra-tools` and `hydra-tui` as statically
We provide builds for `hydra-node` and `hydra-tui` as statically
linked `x64_86` binaries. These binaries can be found in our CI or attached to
[github releases](https://github.com/input-output-hk/hydra/releases)
starting with version `0.8.1`.
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/getting-started/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,11 +155,11 @@ The second set of keys are the so-called Hydra keys, which are used for multi-si

These are similar to cardano keys but are used only in the layer 2. We provide demo key pairs as `alice.{vk,sk}`, `bob.{vk,sk}` and `carol.{vk,sk}` in our [demo folder](https://github.com/input-output-hk/hydra/tree/master/demo).

Alternatively, unique keys can be generated using `hydra-tools`, a command-line utility that's provided as part of Hydra:
Alternatively, unique keys can be generated using `hydra-node`:

```mdx-code-block
<TerminalWindow>
hydra-tools gen-hydra-key --output-file my-key
hydra-node gen-hydra-key --output-file my-key
</TerminalWindow>
```

Expand Down
72 changes: 0 additions & 72 deletions hydra-node/exe/hydra-tools/Main.hs

This file was deleted.

16 changes: 1 addition & 15 deletions hydra-node/hydra-node.cabal
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cabal-version: 3.0
name: hydra-node
version: 0.12.0
version: 0.13.0
synopsis: The Hydra node
author: IOG
copyright: 2022 IOG
Expand Down Expand Up @@ -206,20 +206,6 @@ executable hydra-node

ghc-options: -threaded -rtsopts -with-rtsopts=-N4

executable hydra-tools
import: project-config
hs-source-dirs: exe/hydra-tools
main-is: Main.hs
build-depends:
, cryptonite
, filepath
, hydra-cardano-api
, hydra-node
, hydra-prelude
, optparse-applicative

ghc-options: -threaded -rtsopts

executable hydra-net
import: project-config
hs-source-dirs: exe/hydra-net
Expand Down
9 changes: 0 additions & 9 deletions nix/hydra/docker.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,6 @@ in
};
};

hydra-tools = pkgs.dockerTools.buildImage {
name = "hydra-tools";
tag = "latest";
created = "now";
config = {
Entrypoint = [ "${hydraPackages.hydra-tools-static}/bin/hydra-tools" ];
};
};

hydra-tui = pkgs.dockerTools.buildImage {
name = "hydra-tui";
tag = "latest";
Expand Down
2 changes: 0 additions & 2 deletions nix/hydra/packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,6 @@ rec {
"hydra-node"
paddedRevision;

hydra-tools-static = musl64Pkgs.hydra-node.components.exes.hydra-tools;

hydra-tui =
embedRevision
nativePkgs.hydra-tui.components.exes.hydra-tui
Expand Down
10 changes: 5 additions & 5 deletions sample-node-config/aws/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ This directory contains some [Terraform](https://www.hashicorp.com/products/terr

### Pre-requisites
- you have access to an aws account with root priviledges.
- you have configured your local aws credentials.
- you have configured your local aws credentials.
for this example in `~/.aws/credentials` we have:
```
[personal]
Expand Down Expand Up @@ -99,11 +99,11 @@ prepare the funds to be marked as fuel.
To get some funds from the preview faucet to your address, you can either:
+ claim them from site:
https://faucet.preview.world.dev.cardano.org/basic-faucet
+ or request them via http:
+ or request them via http:
```sh
$ curl -X POST -s "https://faucet.preview.world.dev.cardano.org/send-money/$(cat credentials/cardano.addr)?api_key="
```

> to request via http you must first obtain your api_key.

Note: From now on we are assuming that the following commands will be executed inside of `sample-node-config/aws`
Expand Down Expand Up @@ -139,7 +139,7 @@ $ fuel
## Configuring Hydra Node
We need to make sure some files, which are not provided by default and which are required for starting the `hydra-node`, are in place at the home folder of your VM:
* A Hydra signing key file `hydra-key.sk` which will be used in the Head to sign snapshots.
This can be generated using [hydra-tools](https://hydra.family/head-protocol/docs/getting-started/quickstart#hydra-keys),
This can be generated using [hydra-node](https://hydra.family/head-protocol/docs/getting-started/quickstart#hydra-keys),
* A cardano signing key file `cardano-key.sk` which is required to identify the parties on-chain and sign transactions.
This is a standard Cardano key so one can reuse an existing key or [generate a new one](https://hydra.family/head-protocol/docs/getting-started/quickstart#cardano-keys),
* 0 or more hydra verification keys and cardano verification keys for the other Head parties,
Expand Down Expand Up @@ -174,7 +174,7 @@ Finally, execute the hydra-tui and open the head:
$ tui
```

> If you take down your hydra-node instance once the head is open. you will loose access to your funds commited to the head.
> If you take down your hydra-node instance once the head is open. you will loose access to your funds commited to the head.
To get them back, currently you need to start the head from a point time in the past.
For that you must run hydra-node the using parameter `--start-chain-from`.
i.e.: --start-chain-from 2730515.c7a3629911ef004c873ef07313842df5d1331f61e0eb632432ac8c0636dfd391
Expand Down
8 changes: 4 additions & 4 deletions sample-node-config/aws/setup/credentials.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@ test -d $DIR || mkdir $DIR

echo "building personal keys"

test -f $DIR/hydra-key.sk ||
cabal run hydra-tools gen-hydra-key
test -f $DIR/hydra-key.sk ||
cabal run hydra-node gen-hydra-key

test -f hydra-key.sk &&
mv hydra-key.sk $DIR

test -f hydra-key.vk &&
mv hydra-key.vk $DIR

test -f $DIR/cardano-key.sk ||
test -f $DIR/cardano-key.sk ||
cardano-cli address key-gen \
--signing-key-file "$DIR/cardano-key.sk" \
--verification-key-file "$DIR/cardano-key.vk"
Expand All @@ -36,7 +36,7 @@ MEMBERS=$(echo $TEAM_JSON | jq keys | jq -r '.[]')
for member in $MEMBERS; do
echo "Processing peer: $member"
MEMBER_JSON=$(echo $TEAM_JSON | jq ".$member")

cardanoVK=$(echo $MEMBER_JSON | jq '.["cardano-vk"]')
cat << EOF >./$DIR/$member.cardano.vk
{
Expand Down
2 changes: 1 addition & 1 deletion sample-node-config/gcp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ $ terraform plan -out vm.plan

The configuration process expects to find some files which are not provided by default and which are required for starting the Hydra node:
* A Hydra signing key file `keys/arnaud-hydra.sk` which will be used in the Head to sign snapshots.
This can be generated using [hydra-tools](https://hydra.family/head-protocol/docs/getting-started/quickstart#hydra-keys),
This can be generated using [hydra-node](https://hydra.family/head-protocol/docs/getting-started/quickstart#hydra-keys),
* A cardano signing key file `keys/arnaud.sk` which is required to identify the parties on-chain and sign transactions.
This is a standard Cardano key so one can reuse an existing key or [generate a new one](https://hydra.family/head-protocol/docs/getting-started/quickstart#cardano-keys),
* 0 or more hydra verification keys and cardano verification keys for the other Head parties,
Expand Down

0 comments on commit 1a94dcd

Please sign in to comment.