-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
62 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,36 @@ | ||
name: 'private-tangle-setup' | ||
description: 'Setup a private tangle' | ||
name: "private-tangle-setup" | ||
description: "Setup a private tangle" | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Clone private tangle files | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: iotaledger/hornet | ||
path: hornet | ||
repository: iotaledger/iota-core | ||
path: iota-core | ||
|
||
- name: Prepare files for start and stop | ||
shell: bash | ||
run: | | ||
echo "docker compose down -v" >> cleanup.sh | ||
echo "rm *.snapshot" >> cleanup.sh | ||
chmod +x cleanup.sh | ||
sed -i -n -e :a -e '1,5!{P;N;D;};N;ba' run.sh | ||
echo "docker compose -f \$DOCKER_COMPOSE_FILE up -d" >> run.sh | ||
working-directory: iota-core/tools/docker-network | ||
|
||
- name: Setup private tangle | ||
shell: bash | ||
run: | | ||
# TODO: use next lines when a working hornet release is published | ||
# # Download the private_tangle setup from the hornet repo. | ||
# mkdir private_tangle | ||
# cd private_tangle | ||
# # Use the output of https://api.github.com/repos/iotaledger/hornet/releases/latest once there's a 2.0 Hornet release. | ||
# DOWNLOAD_URL=$(curl "https://api.github.com/repos/iotaledger/hornet/releases" | jq -r '.[0].assets[] | select(.name | contains("private_tangle")) | .browser_download_url') | ||
# echo "Downloading private tangle from $DOWNLOAD_URL" | ||
# curl -L -o private_tangle.tar.gz $DOWNLOAD_URL | ||
# tar -xf private_tangle.tar.gz | ||
# TODO: remove next lines when a working hornet release is published | ||
# Set protocol_parameters to the same values as in the shimmer network | ||
jq '.tokenSupply="1813620509061365" | .rentStructure.vByteCost=100 | .bech32HRP="rms"' protocol_parameters.json > tmp.json && mv tmp.json protocol_parameters.json | ||
jq --color-output . protocol_parameters.json | ||
# Reduce milestone interval to 1 second | ||
yq eval '.services.inx-coordinator.command += "--coordinator.interval=1s"' docker-compose.yml > tmp.yml && mv tmp.yml docker-compose.yml | ||
jq --color-output . config_private_tangle.json | ||
# Start Tangle | ||
sudo ./cleanup.sh | ||
sudo ./bootstrap.sh | ||
sudo ./run.sh -d --quiet-pull | ||
working-directory: hornet/private_tangle | ||
sudo ./run.sh | ||
working-directory: iota-core/tools/docker-network | ||
|
||
- name: Wait for tangle to start | ||
shell: bash | ||
run: wget -qO- https://raw.githubusercontent.com/eficode/wait-for/$WAIT_FOR_VERSION/wait-for | sh -s -- -t 60 http://localhost:14265/health -- echo "Tangle is up" | ||
env: | ||
WAIT_FOR_VERSION: 4df3f9262d84cab0039c07bf861045fbb3c20ab7 # v2.2.3 | ||
- name: Wait for faucet to start | ||
shell: bash | ||
run: wget -qO- https://raw.githubusercontent.com/eficode/wait-for/$WAIT_FOR_VERSION/wait-for | sh -s -- -t 60 http://localhost:8091/api/info -- echo "Faucet is up" | ||
env: | ||
WAIT_FOR_VERSION: 4df3f9262d84cab0039c07bf861045fbb3c20ab7 # v2.2.3 | ||
run: wget -qO- https://raw.githubusercontent.com/eficode/wait-for/v2.2.4/wait-for | sh -s -- -t 120 http://localhost:8080/health -- echo "Tangle is up" | ||
# TODO enable, maybe need another URL | ||
# - name: Wait for faucet to start | ||
# shell: bash | ||
# run: wget -qO- https://raw.githubusercontent.com/eficode/wait-for/v2.2.4/wait-for | sh -s -- -t 120 http://localhost:8081/api/info -- echo "Faucet is up" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
// Copyright 2023 IOTA Stiftung | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
pub static NODE_LOCAL: &str = "http://localhost:14265"; | ||
pub static NODE_LOCAL: &str = "http://localhost:8080"; | ||
|
||
pub static FAUCET_URL: &str = "http://localhost:8091/api/enqueue"; |