From 5431c3bc5c9b3ea77f016adcf47f235c1d614103 Mon Sep 17 00:00:00 2001 From: F0rm4l1ty Date: Sat, 11 Jan 2025 03:18:42 -0500 Subject: [PATCH 1/2] Fix: Remove logic that trimmed the last byte from transaction ID in publishReferenceScripts function I reported this in Discord, but this is a fix for the Hydra Head "Getting started" demo located here https://hydra.family/head-protocol/docs/getting-started Running the `./seed-devnet.sh` command would invoke a function called `publishReferenceScripts` that saves a transaction id to the `.env` file named `HYDRA_SCRIPTS_TX_ID`. This function included a command: `head -c -1` which removed the last byte from outputted transaction id. This must have been utilized in a previous version, however now it incorrectly removes the last byte from the transaction id, causing it to be invalid (incorrect length). Running the `docker compose up -d hydra-node-{1,2,3}` would cause an error like so and cause the containers to crash and keep restarting: ``` option --hydra-scripts-tx-id: RawBytesHexErrorBase16DecodeFail "0e2114c7a09c171ce8a8a5ba282fa2a47056a1c6415d4aaecbbb44093cdf2e7" "invalid bytestring size" ``` I have confirmed that removing this specific command fixes the issue and the Hydra nodes successfully start up. --- demo/seed-devnet.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/demo/seed-devnet.sh b/demo/seed-devnet.sh index 58b5d94ed37..4ac3e70400f 100755 --- a/demo/seed-devnet.sh +++ b/demo/seed-devnet.sh @@ -99,8 +99,7 @@ function publishReferenceScripts() { --testnet-magic ${NETWORK_ID} \ --node-socket ${DEVNET_DIR}/node.socket \ --cardano-signing-key devnet/credentials/faucet.sk \ - | tr '\n' ',' \ - | head -c -1 + | tr '\n' ',' } function queryPParams() { From 2769fc1407b28c9bd39d67aec22111f063e16a75 Mon Sep 17 00:00:00 2001 From: Noon van der Silk Date: Mon, 13 Jan 2025 12:09:53 +0000 Subject: [PATCH 2/2] No need for tr on 0.19.0 --- demo/seed-devnet.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/demo/seed-devnet.sh b/demo/seed-devnet.sh index 4ac3e70400f..d6b87456cc5 100755 --- a/demo/seed-devnet.sh +++ b/demo/seed-devnet.sh @@ -98,8 +98,7 @@ function publishReferenceScripts() { hnode publish-scripts \ --testnet-magic ${NETWORK_ID} \ --node-socket ${DEVNET_DIR}/node.socket \ - --cardano-signing-key devnet/credentials/faucet.sk \ - | tr '\n' ',' + --cardano-signing-key devnet/credentials/faucet.sk } function queryPParams() {