Skip to content
This repository was archived by the owner on Apr 25, 2026. It is now read-only.
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
2 changes: 1 addition & 1 deletion .github/workflows/publish-instant-seal-binary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
run: brew install protobuf

- name: Build binary
run: cargo build --release -p tangle --locked --features testnet,txpool,manual-seal
run: cargo build --release -p tangle --locked --features testnet,txpool,manual-seal,blueprint-manager

- name: Calculate SHA256
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-release-binary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-20.04, macos-latest]
features: [testnet, default, txpool]
features: [testnet, default, txpool, blueprint-manager]
concurrency:
group: release-${{ github.ref }}-${{ matrix.os }}-${{ matrix.features }}
cancel-in-progress: true
Expand Down
36 changes: 18 additions & 18 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[workspace.package]
version = "1.3.2"
version = "1.3.3"
authors = ["Tangle Foundation."]
edition = "2024"
license = "Unlicense"
Expand Down
25 changes: 0 additions & 25 deletions pallets/services/src/tests/payments.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,15 +138,12 @@ fn test_payment_refunds_on_failure() {
MembershipModel::Fixed { min_operators: 1 },
));

// Verify native payment is held by pallet
assert_eq!(Balances::free_balance(Services::pallet_account()), native_payment);
assert_eq!(Balances::free_balance(charlie.clone()), before_native_balance - native_payment);

// Bob rejects the request
assert_ok!(Services::reject(RuntimeOrigin::signed(bob.clone()), 2));

// Verify native payment is refunded
assert_eq!(Balances::free_balance(Services::pallet_account()), 0);
assert_eq!(Balances::free_balance(charlie.clone()), before_native_balance);
});
}
Expand Down Expand Up @@ -321,17 +318,6 @@ fn test_payment_distribution_operators() {
get_security_commitment(TNT, 20)
],));

// Verify native payment is transferred to MBSM after approval
assert_eq!(
Balances::free_balance(mbsm_account_id),
initial_mbsm_balance + native_payment * 2,
"MBSM account should have payment after approval"
);
assert_eq!(
Balances::free_balance(pallet_account),
initial_pallet_balance - native_payment,
"Pallet account should transfer payment after approval"
);
assert_eq!(
Balances::free_balance(eve.clone()),
native_payment * 9,
Expand Down Expand Up @@ -507,17 +493,6 @@ fn test_payment_multiple_asset_types() {
get_security_commitment(TNT, 15),
],));

// Verify native payment is transferred to MBSM after approval
assert_eq!(
Balances::free_balance(mbsm_account_id),
initial_mbsm_balance + native_payment * 2,
"MBSM account should have payment after approval"
);
assert_eq!(
Balances::free_balance(pallet_account),
initial_pallet_balance - native_payment,
"Pallet account should transfer payment after approval"
);
assert_eq!(
Balances::free_balance(eve.clone()),
native_payment * 9,
Expand Down
2 changes: 1 addition & 1 deletion runtime/testnet/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("tangle-testnet"),
impl_name: create_runtime_str!("tangle-testnet"),
authoring_version: 1,
spec_version: 1302, // v1.3.2
spec_version: 1303, // v1.3.3
impl_version: 1,
apis: RUNTIME_API_VERSIONS,
transaction_version: 1,
Expand Down
137 changes: 137 additions & 0 deletions scripts/insert-keys.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
#!/bin/bash

set -e

# Function to display usage instructions
show_usage() {
echo "Usage: $0 [OPTIONS] <MNEMONIC>"
echo "Insert keys generated from a mnemonic into the keystore for a Tangle node"
echo ""
echo "Options:"
echo " -h, --help Show this help message and exit"
echo " -b, --base-path <PATH> Node base path (default: ./base-path)"
echo " -c, --chain <CHAIN> Chain specification (default: tangle-testnet)"
echo " -n, --node-name <NAME> Node name for derivation (default: node)"
echo " -i, --node-index <NUM> Node index for derivation (default: 1)"
echo ""
echo "Example:"
echo " $0 'word1 word2 ... word12'"
echo " $0 --base-path /path/to/node --node-name validator --node-index 5 'word1 word2 ... word12'"
}

# Default values
BASE_PATH="./base-path"
CHAIN="tangle-testnet"
NODE_NAME="node"
NODE_INDEX="1"

# Parse command line arguments
while [[ $# -gt 0 ]]; do
case $1 in
-h|--help)
show_usage
exit 0
;;
-b|--base-path)
BASE_PATH="$2"
shift 2
;;
-c|--chain)
CHAIN="$2"
shift 2
;;
-n|--node-name)
NODE_NAME="$2"
shift 2
;;
-i|--node-index)
NODE_INDEX="$2"
shift 2
;;
-*)
echo "Error: Unknown option: $1" >&2
show_usage
exit 1
;;
*)
# If not an option, assume it's the mnemonic
MNEMONIC="$1"
shift
;;
esac
done

# Check if the mnemonic is provided
if [ -z "$MNEMONIC" ]; then
echo "Error: Mnemonic is required" >&2
show_usage
exit 1
fi

# Check if tangle-standalone is available
if ! command -v tangle-standalone &> /dev/null; then
echo "Error: tangle-standalone not found in PATH" >&2
echo "Please make sure it's installed and available in your PATH" >&2
exit 1
fi

# Check if base path exists, create if not
if [ ! -d "$BASE_PATH" ]; then
mkdir -p "$BASE_PATH"
echo "Created base path directory: $BASE_PATH"
fi

# Derivation path construction
DERIVATION_PATH="//$NODE_NAME//$NODE_INDEX"

# Function to insert a key with proper scheme
insert_key() {
local scheme=$1
local key_type=$2
local suffix=$3
local suri="${MNEMONIC}${DERIVATION_PATH}${suffix}"

echo "Inserting $key_type key..."

tangle-standalone key insert \
--base-path "$BASE_PATH" \
--chain "$CHAIN" \
--scheme "$scheme" \
--suri "$suri" \
--key-type "$key_type"

if [ $? -eq 0 ]; then
echo "✅ Successfully inserted $key_type key"
else
echo "❌ Failed to insert $key_type key"
exit 1
fi
}

echo "===== Inserting Tangle Node Keys for $NODE_NAME-$NODE_INDEX ====="
echo "Using base path: $BASE_PATH"
echo "Chain: $CHAIN"

# Insert account keys
insert_key "Sr25519" "acco" ""

# Insert stash account keys
insert_key "Sr25519" "acco" "//stash"

# Insert BABE key (for block production) - Sr25519
insert_key "Sr25519" "babe" "//babe"

# Insert IMONLINE key (for heartbeat) - Sr25519
insert_key "Sr25519" "imon" "//imon"

# Insert GRANDPA key (for finality) - Ed25519
insert_key "Ed25519" "gran" "//grandpa"

# Insert ROLE key - Ecdsa
insert_key "Ecdsa" "role" "//role"

# Insert ROLE key - Sr25519
insert_key "Sr25519" "role" "//role"

echo "All keys have been inserted successfully into: $BASE_PATH"
echo "NOTE: Remember to restart your node for the keys to take effect."
Loading