Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changelog updates & demo fixes #459

Merged
merged 3 commits into from
Aug 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,7 @@ test-results.xml

# Getting started / demo instructions
/demo/devnet/

# Testnet setups
testnet/logs/
vasil-testnet/logs/
15 changes: 7 additions & 8 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,20 @@ changes.

## [0.7.0] - UNRELEASED

#### Added

- The user manual is now also available in japanese thanks to @btbf! :jp:

#### Changed

- **BREAKING** Switch to `BabbageEra` and `PlutusV2`
+ `hydra-cardano-api` now uses `Era = BabbageEra` and constructs `PlutusV2` scripts
+ `hydra-plutus` scripts now use the `serialiseData` builtin to CBOR encode data on-chain
+ `hydra-node` now expects `BabbageEra` blocks and produces `BabbageEra` transactions
+ `hydra-cluster` now spins up a stake pool instead of a BFT node (not possible in `Praos` anymore)

#### Fixed
- **BREAKING** Use reference inputs and reference scripts in `abort` transaction.
+ Need to provide a `--hydra-scripts-tx-id` to the `hydra-node` containing the current (`--script-info`) Hydra scripts.
+ Added the `publish-scripts` sub-command to `hydra-node` to publish the current Hydra scripts.

- The user manual is now also available in japanese thanks to @btbf! :jp:

- Head contract check UTxO hash upon closing the head [#3rr38](https://github.com/input-output-hk/hydra-poc/pull/338). This prevents closing the head with arbitrary UTxO.

- Head contract check UTxO hash upon closing the head [#338](https://github.com/input-output-hk/hydra-poc/pull/338). This prevents closing the head with arbitrary UTxO.
- Remaining contestation period displayed in `hydra-tui` [#437](https://github.com/input-output-hk/hydra-poc/pull/437). Previously it was displaying 'total whole values' instead of 'relative whole values'.


Expand Down
39 changes: 27 additions & 12 deletions demo/seed-devnet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,45 @@ MARKER_DATUM_HASH="a654fb60d21c1fed48db2c320aa6df9737ec0204c0ba53b9b94a09fb40e75
SCRIPT_DIR=$(realpath $(dirname $(realpath $0)))
NETWORK_ID=42

CCLI_PATH=
CCLI_CMD=
DEVNET_DIR=/data
if [[ -n ${1} ]] && $(${1} version > /dev/null); then
CCLI_PATH=${1}
echo >&2 "Using provided cardano-cli"
CCLI_CMD=${1}
echo >&2 "Using provided cardano-cli command: ${1}"
DEVNET_DIR=${SCRIPT_DIR}/devnet
fi

HYDRA_NODE_CMD=
if [[ -n ${2} ]] && $(${2} --version > /dev/null); then
HYDRA_NODE_CMD=${2}
echo >&2 "Using provided hydra-node command: ${2}"
fi

# Invoke cardano-cli in running cardano-node container or via provided cardano-cli
function ccli() {
ccli_ ${@} --testnet-magic ${NETWORK_ID}
}
function ccli_() {
if [[ -x ${CCLI_PATH} ]]; then
cardano-cli ${@}
if [[ -x ${CCLI_CMD} ]]; then
${CCLI_CMD} ${@}
else
docker-compose exec cardano-node cardano-cli ${@}
fi
}

# Invoke hydra-node in a container or via provided executable
function hnode() {
if [[ -n ${HYDRA_NODE_CMD} ]]; then
${HYDRA_NODE_CMD} ${@}
else
docker run --rm \
-v ${PWD}:${PWD} \
-w ${PWD} \
-u ${UID} \
ghcr.io/input-output-hk/hydra-node -- ${@}
fi
}

# Retrieve some lovelace from faucet, marked as "fuel" if requested
function seedFaucet() {
ACTOR=${1}
Expand Down Expand Up @@ -72,14 +91,10 @@ function seedFaucet() {

function publishReferenceScripts() {
echo >&2 "Publishing reference scripts ('νInitial' & 'νCommit')..."
echo $(docker run --rm \
-v ${PWD}/devnet/credentials:/credentials:ro \
-v ${PWD}/devnet/ipc:/ipc \
ghcr.io/input-output-hk/hydra-node -- \
publish-scripts \
hnode publish-scripts \
--network-id ${NETWORK_ID} \
--node-socket /ipc/node.socket \
--cardano-signing-key /credentials/faucet.sk)
--node-socket devnet/ipc/node.socket \
--cardano-signing-key devnet/credentials/faucet.sk
}

seedFaucet "alice" 1000000000 # 1000 Ada to commit
Expand Down
7 changes: 4 additions & 3 deletions docs/docs/getting-started/demo/without-docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ First, let's prepare and start an ad-hoc, single `cardano-node` devnet using our
```
./prepare-devnet.sh
cd devnet
cabal exec cardano-node -- run \
cardano-node -- run \
--config cardano-node.json \
--topology topology.json \
--database-path db \
Expand All @@ -45,12 +45,13 @@ cabal exec cardano-node -- run \

## Seeding The Network

You can use the `seed-devnet.sh` script by passing it the path to a cardano-cli executable to use, instead of having it using the Docker container. For example:
You can use the `seed-devnet.sh` script by passing it the path/command to a cardano-cli and hydra-node executable to use, instead of having it using the Docker container. For example:


```mdx-code-block
<TerminalWindow>
./seed-devnet.sh $(which cardano-cli)
export CARDANO_NODE_SOCKET_PATH=devnet/ipc/node.socket
./seed-devnet.sh $(which cardano-cli) "cabal exec hydra-node --"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is slightly weird 🤔 ... Why not $(which hydra-node) too for consistency? I mean, this boils down to the same thing given how it is invoked but, I don't know, the example feels off to me 😅

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is kind of highlighting both ways. The hydra-node executable would only be in scope if one would be using the nix-shell -A demo environment and below we also use cabal exec invocations. Not sure which way is more clear 🤷

</TerminalWindow>
```

Expand Down
Loading