-
Notifications
You must be signed in to change notification settings - Fork 22
feat: use arkade-regtest for regtest environment #492
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
d0dda55
7e283d2
70aa0db
2bba13c
10a5ae3
c5fb29b
ca1381c
3523403
a4da579
80e4760
4516f3b
29ac2c0
b88ef26
90af220
4883730
c031eca
43e927b
c571a34
e5c7ae2
3722613
addd9a8
92e6b25
b7d4e0e
19bf5f2
346fc15
59835c2
8f939fb
bca7760
5dbc44b
fbbc7e8
15e24bf
21fb32d
f351422
1d502cf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| # wallet arkade-regtest overrides | ||
| ARKD_IMAGE=ghcr.io/arkade-os/arkd:v0.9.1 | ||
| ARKD_WALLET_IMAGE=ghcr.io/arkade-os/arkd-wallet:v0.9.1 | ||
|
|
||
| # nbxplorer guard in start-env.sh handles missing container gracefully | ||
| BITCOIN_LOW_FEE=true | ||
|
|
||
| # Match wallet's existing arkd config | ||
| ARKD_SCHEDULER_TYPE=gocron | ||
| ARKD_BOARDING_EXIT_DELAY=1024 | ||
| ARKD_SESSION_DURATION=10 | ||
| ARKD_LOG_LEVEL=6 | ||
|
|
||
| # Zero fees — faucetOffchain uses wallet.settle() without fee budget | ||
| ARK_OFFCHAIN_INPUT_FEE="0.0" | ||
| ARK_ONCHAIN_INPUT_FEE="0.0" | ||
| ARK_OFFCHAIN_OUTPUT_FEE="0.0" | ||
| ARK_ONCHAIN_OUTPUT_FEE="0.0" | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,10 +7,19 @@ on: | |
| branches: [master, next] | ||
| jobs: | ||
| test: | ||
| timeout-minutes: 30 | ||
| timeout-minutes: 45 | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| submodules: true | ||
| - uses: actions/setup-go@v5 | ||
| with: | ||
| go-version: '1.23' | ||
| - uses: actions/cache@v4 | ||
| with: | ||
| path: regtest/_build | ||
| key: nigiri-${{ hashFiles('regtest/.env.defaults', '.env.regtest') }} | ||
|
Comment on lines
+19
to
+22
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -eu
echo "regtest submodule ref:"
git ls-tree HEAD regtest
echo
echo "Workflow cache stanza:"
sed -n '19,22p' .github/workflows/playwright.ymlRepository: arkade-os/wallet Length of output: 317 🏁 Script executed: find . -name "start-env.sh" -o -name "clean-env.sh" | head -20Repository: arkade-os/wallet Length of output: 42 🏁 Script executed: cat -n .github/workflows/playwright.ymlRepository: arkade-os/wallet Length of output: 2258 🏁 Script executed: # Check if regtest/_build is mentioned anywhere in the codebase
rg "regtest/_build" --type yaml --type shRepository: arkade-os/wallet Length of output: 42 🏁 Script executed: # Check if regtest directory exists and what's in it
ls -la regtest/ 2>/dev/null | head -20Repository: arkade-os/wallet Length of output: 170 🏁 Script executed: # Look for start-env.sh specifically in regtest
find regtest -name "*.sh" -type f 2>/dev/null | head -20Repository: arkade-os/wallet Length of output: 42 🏁 Script executed: # Check if regtest is a submodule or a regular directory
git config --file=.gitmodules --get-regexp "^submodule\.regtest"Repository: arkade-os/wallet Length of output: 219 🏁 Script executed: # Check what git ls-tree shows for regtest subdirectories
git ls-tree -r HEAD regtest | head -30Repository: arkade-os/wallet Length of output: 122 🏁 Script executed: # Check .gitmodules to see submodule configuration
cat .gitmodulesRepository: arkade-os/wallet Length of output: 196 🏁 Script executed: # Look for any documentation or comments in the workflow about submodule handling
head -n 40 .github/workflows/playwright.ymlRepository: arkade-os/wallet Length of output: 1259 🏁 Script executed: # Check if there are other workflows that handle submodule caching differently
find .github/workflows -name "*.yml" -o -name "*.yaml" | xargs grep -l "cache" 2>/dev/nullRepository: arkade-os/wallet Length of output: 117 🏁 Script executed: # Check the ci.yml workflow for cache patterns
cat .github/workflows/ci.ymlRepository: arkade-os/wallet Length of output: 1021 🏁 Script executed: # Since regtest is a submodule and it's checked out, let's verify the concern:
# The cache key does NOT include the submodule commit hash.
# Let's check if there's any documentation about this in the repo
find . -name "README*" -o -name "CONTRIBUTING*" | xargs grep -l "cache\|submodule" 2>/dev/null || echo "No matches in docs"Repository: arkade-os/wallet Length of output: 1565 🏁 Script executed: # Check if there are any recent commits that mention cache invalidation or submodule
git log --oneline --all -n 20 2>/dev/null | head -20Repository: arkade-os/wallet Length of output: 1370 Include the submodule commit hash in the cache key to ensure invalidation when regtest is updated. The cache key at lines 19-22 hashes only Add the submodule commit to the cache key: key: nigiri-${{ hashFiles('regtest/.env.defaults', '.env.regtest') }}-${{ hashFiles('.gitmodules') }}or use git commit tracking: key: nigiri-${{ hashFiles('regtest/.env.defaults', '.env.regtest') }}-${{ github.sha }}🤖 Prompt for AI Agents |
||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: lts/* | ||
|
|
@@ -20,14 +29,41 @@ jobs: | |
| run: pnpm install | ||
| - name: Install Playwright Browsers | ||
| run: pnpm exec playwright install --with-deps | ||
| - name: Run Nigiri | ||
| uses: vulpemventures/nigiri-github-action@v1 | ||
| with: | ||
| use_liquid: false | ||
| use_ln: true | ||
| - name: Setup regtest environment | ||
| run: pnpm regtest | ||
| - name: Start regtest environment | ||
| run: chmod +x regtest/*.sh regtest/helpers/*.sh && ./regtest/start-env.sh | ||
| - name: Add nigiri to PATH | ||
| run: echo "${{ github.workspace }}/regtest/_build/nigiri/build" >> $GITHUB_PATH | ||
| - name: Start nostr relay | ||
| run: docker compose -f docker-compose.nak.yml up -d --build | ||
| - name: Verify environment | ||
| run: pnpm regtest:setup | ||
| - name: Diagnostic - dump regtest env state | ||
| run: | | ||
| echo "=== .env.regtest ===" | ||
| cat .env.regtest || echo "no .env.regtest" | ||
| echo "=== arkd container env ===" | ||
| docker exec ark env 2>/dev/null | grep -E "ARKD_|ARK_|SCHEDULER|CSV|VTXO|ROUND" || true | ||
| echo "=== arkd info ===" | ||
| curl -s http://localhost:7070/v1/info 2>/dev/null | head -50 || true | ||
| echo "=== arkd admin fees ===" | ||
| curl -s http://localhost:7070/v1/admin/intentFees 2>/dev/null || true | ||
| echo "=== docker ps ===" | ||
| docker ps --format "table {{.Names}}\t{{.Status}}\t{{.Ports}}" || true | ||
| - name: Run Playwright tests | ||
| run: sleep 5 && pnpm run test:e2e | ||
| env: | ||
| CI: true | ||
| - name: Capture logs on failure | ||
| if: failure() | ||
| run: | | ||
| docker logs ark 2>&1 || true | ||
| docker logs ark-wallet 2>&1 || true | ||
| docker logs boltz 2>&1 || true | ||
| docker logs boltz-lnd 2>&1 || true | ||
| docker logs boltz-fulmine 2>&1 || true | ||
| docker logs nak 2>&1 || true | ||
| - name: Cleanup | ||
| if: always() | ||
| run: | | ||
| docker compose -f docker-compose.nak.yml down -v 2>/dev/null || true | ||
| chmod +x regtest/*.sh regtest/helpers/*.sh 2>/dev/null; ./regtest/clean-env.sh | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| [submodule "regtest"] | ||
| path = regtest | ||
| url = https://github.com/ArkLabsHQ/arkade-regtest.git | ||
| branch = master |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| name: nigiri | ||
| services: | ||
| nak: | ||
| build: | ||
| context: . | ||
| dockerfile: nak.Dockerfile | ||
| container_name: nak | ||
| ports: | ||
| - '10547:10547' | ||
| command: ['nak', 'serve', '--hostname', '0.0.0.0', '--port', '10547'] | ||
|
|
||
| networks: | ||
| default: | ||
| name: nigiri | ||
| external: true |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -47,10 +47,9 @@ | |||||
| "format": "prettier --write src", | ||||||
| "format:check": "prettier --check src", | ||||||
| "git-info": "node scripts/git-commit-info.js", | ||||||
| "regtest": "pnpm regtest:down && pnpm regtest:build && pnpm regtest:up && pnpm regtest:setup", | ||||||
| "regtest:build": "docker compose -f test.docker-compose.yml build", | ||||||
| "regtest:up": "docker compose -f test.docker-compose.yml up arkd arkd-wallet nbxplorer pgnbxplorer -d", | ||||||
| "regtest:down": "docker compose -f test.docker-compose.yml down -v", | ||||||
| "regtest:start": "./regtest/start-env.sh && docker compose -f docker-compose.nak.yml up -d", | ||||||
| "regtest:stop": "./regtest/stop-env.sh && docker compose -f docker-compose.nak.yml down", | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -eu
for f in regtest/start-env.sh regtest/stop-env.sh regtest/clean-env.sh; do
if [ -e "$f" ]; then
echo "FOUND $f"
else
echo "MISSING $f"
fi
doneRepository: arkade-os/wallet Length of output: 145 🏁 Script executed: # Check if regtest is a git submodule and its configuration
cat .gitmodules 2>/dev/null || echo "No .gitmodules file"
echo "---"
git ls-files --stage | grep regtest || echo "No regtest in git index"
echo "---"
# Check what's actually in the regtest directory
ls -la regtest/ 2>/dev/null || echo "regtest directory not found"Repository: arkade-os/wallet Length of output: 508 🏁 Script executed: # Check the CI workflow to see what it actually does
find .github/workflows -name "*.yml" -o -name "*.yaml" | head -5Repository: arkade-os/wallet Length of output: 117 🏁 Script executed: # Check the package.json scripts around lines 50-52
sed -n '48,55p' package.jsonRepository: arkade-os/wallet Length of output: 516 🏁 Script executed: # Check the CI workflow for submodule handling
cat .github/workflows/playwright.yml | head -50Repository: arkade-os/wallet Length of output: 1559 🏁 Script executed: # Check the main CI workflow
cat .github/workflows/ci.yml | head -50Repository: arkade-os/wallet Length of output: 1021 🏁 Script executed: # Get information about what's in the regtest submodule without cloning
git config --file .gitmodules --get submodule.regtest.urlRepository: arkade-os/wallet Length of output: 107 🌐 Web query:
💡 Result: No public GitHub repository named "arkade-regtest" under ArkLabsHQ or arkade-os was found containing scripts start-env.sh, stop-env.sh, or clean-env.sh. ArkLabsHQ maintains Ark protocol repositories like introspector, fulmine, arkadian (which lists arkade-os repos including arkd, go-sdk), but no regtest-specific repo matches. arkade-os has repos like arkd (protocol server), go-sdk. Older ARK Core (unrelated) has e2e testing with docker scripts, but archived. These env.sh scripts are typical for local dev environments (e.g., Bitcoin regtest), likely private/internal for Ark protocol testing. Citations:
🏁 Script executed: # Check if there are any other cleanup steps in the playwright workflow
cat .github/workflows/playwright.yml | tail -20Repository: arkade-os/wallet Length of output: 753 🏁 Script executed: # Check if stop-env.sh is referenced anywhere else in the codebase
rg "stop-env" --type sh --type js --type jsonRepository: arkade-os/wallet Length of output: 166 🏁 Script executed: # Check if there are any other scripts in the regtest directory pattern
rg "regtest.*\\.sh" package.jsonRepository: arkade-os/wallet Length of output: 349
The submodule contains 🤖 Prompt for AI Agents |
||||||
| "regtest:clean": "./regtest/clean-env.sh && docker compose -f docker-compose.nak.yml down -v", | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: # Check package.json around line 52
head -60 package.json | tail -15Repository: arkade-os/wallet Length of output: 679 🏁 Script executed: # Check the workflow file referenced in the comment
if [ -f .github/workflows/playwright.yml ]; then
sed -n '50,65p' .github/workflows/playwright.yml
fiRepository: arkade-os/wallet Length of output: 402 🏁 Script executed: # Also check if clean-env.sh exists and what it does
if [ -f ./regtest/clean-env.sh ]; then
cat ./regtest/clean-env.sh
fiRepository: arkade-os/wallet Length of output: 42 Reorder The current script uses - "regtest:clean": "./regtest/clean-env.sh && docker compose -f docker-compose.nak.yml down -v",
+ "regtest:clean": "docker compose -f docker-compose.nak.yml down -v 2>/dev/null || true; ./regtest/clean-env.sh",📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||
| "regtest:setup": "node src/test/setup.mjs" | ||||||
| }, | ||||||
| "eslintConfig": { | ||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: arkade-os/wallet
Length of output: 217
The referenced Docker images v0.9.1 do not exist in GitHub Container Registry.
Both
ghcr.io/arkade-os/arkd:v0.9.1andghcr.io/arkade-os/arkd-wallet:v0.9.1are unavailable. The regtest environment will fail to start with these image references. Either ensure these v0.9.1 images are built and pushed to the registry, or use the available v0.8.7 versions if v0.9.1 is not yet released.🤖 Prompt for AI Agents