Skip to content
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
22 changes: 22 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,25 @@ rustflags = []

[target.aarch64-apple-darwin]
rustflags = ["-C", "link-args=-Wl,-undefined,dynamic_lookup"]

[target.wasm32-unknown-unknown]
rustflags = [
"-C",
"target-feature=+atomics,+bulk-memory",
"-C",
"link-args=--shared-memory",
"-C",
"link-args=--import-memory",
"-C",
"link-args=--export-memory",
"-C",
"link-args=--max-memory=4294967296",
"-C",
"link-args=--export=__wasm_init_tls",
"-C",
"link-args=--export=__tls_size",
"-C",
"link-args=--export=__tls_align",
"-C",
"link-args=--export=__tls_base",
]
65 changes: 65 additions & 0 deletions .github/scripts/test-misc-mina-key-pair.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
#!/bin/bash

set -euo pipefail

# Test the mina misc mina-key-pair command

SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
REPO_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
cd "$REPO_ROOT"

MINA_BIN="${MINA_BIN:-./target/release/mina}"

echo "Testing: mina misc mina-key-pair"
echo ""

# Test 1: Basic mina-key-pair command
echo "Test 1: mina misc mina-key-pair (basic)"
if "$MINA_BIN" misc mina-key-pair > /dev/null 2>&1; then
echo "✓ Command executed successfully"
else
echo "✗ Test failed: Command failed to execute"
exit 1
fi
echo ""

# Test 2: mina-key-pair with --web-node-secrets flag
echo "Test 2: mina misc mina-key-pair --web-node-secrets"
OUTPUT=$("$MINA_BIN" misc mina-key-pair --web-node-secrets)
EXIT_STATUS=$?

# Verify command executed successfully
if [ $EXIT_STATUS -ne 0 ]; then
echo "✗ Test failed: Command failed to execute"
exit 1
fi
echo "✓ Command executed successfully"

# Verify output is valid JSON
if ! echo "$OUTPUT" | jq empty 2>/dev/null; then
echo "✗ Test failed: Output is not valid JSON"
echo "Output was: $OUTPUT"
exit 1
fi
echo "✓ Output is valid JSON"

# Verify JSON contains "publicKey" field with a string value
PUBLIC_KEY=$(echo "$OUTPUT" | jq -r '.publicKey' 2>/dev/null)
if [ -z "$PUBLIC_KEY" ] || [ "$PUBLIC_KEY" = "null" ]; then
echo "✗ Test failed: JSON does not contain 'publicKey' field with a string value"
echo "Output was: $OUTPUT"
exit 1
fi
echo "✓ JSON contains 'publicKey' field with value: $PUBLIC_KEY"

# Verify JSON contains "privateKey" field with a string value
PRIVATE_KEY=$(echo "$OUTPUT" | jq -r '.privateKey' 2>/dev/null)
if [ -z "$PRIVATE_KEY" ] || [ "$PRIVATE_KEY" = "null" ]; then
echo "✗ Test failed: JSON does not contain 'privateKey' field with a string value"
echo "Output was: $OUTPUT"
exit 1
fi
echo "✓ JSON contains 'privateKey' field with value: [REDACTED]"

echo ""
echo "✓ All tests passed!"
3 changes: 3 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,9 @@ jobs:
- name: Test OCaml-specific GraphQL endpoints
run: ./.github/scripts/test-ocaml-specific-endpoints.sh

- name: Test mina misc mina-key-pair command
run: ./.github/scripts/test-misc-mina-key-pair.sh

- name: Upload binaries
uses: actions/upload-artifact@v5
with:
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
([#1736](https://github.com/o1-labs/mina-rust/pull/1736))
- **CI**: automatically push Docker images for `vX.Y.Z` and `vX.Y` when tag `vX.Y.Z` is created
([#1838](https://github.com/o1-labs/mina-rust/pull/1838))
- **Web Node**: fix webnode build, add quality-of-life improvements when running
webnode in Docker. ([#1778](https://github.com/o1-labs/mina-rust/pull/1778))

### Changes

Expand Down
Loading
Loading