This repository was archived by the owner on May 22, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 43
Update private tangle setup #1106
Merged
thibault-martinez
merged 9 commits into
iotaledger:2.0
from
Thoralf-M:2.0-private-tangle
Sep 5, 2023
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
289889f
Update private tangle setup
Thoralf-M 718a7bc
pruning_slot -> pruning_epoch
Thoralf-M f5b348b
boxed_slice_prefix_serde
Thoralf-M 74a41a4
Revert
Thoralf-M ec3d31d
Update sdk/src/utils/serde.rs
Thoralf-M 1a01898
Remove commented part
Thoralf-M d0126d7
Rename
Thoralf-M 255019a
Merge branch '2.0' into 2.0-private-tangle
thibault-martinez 63d9437
Add comment
Thoralf-M File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,37 @@ | ||
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 | ||
|
||
# remove the last 5 lines and add docker compose with `-d` to run it in the background | ||
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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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"; |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.