Skip to content

feat: DogeOS-minimal local stack for integration testing#61

Draft
vmarkushin wants to merge 6 commits intodogeosfrom
vlad/e2e-testing-env
Draft

feat: DogeOS-minimal local stack for integration testing#61
vmarkushin wants to merge 6 commits intodogeosfrom
vlad/e2e-testing-env

Conversation

@vmarkushin
Copy link
Copy Markdown

@vmarkushin vmarkushin commented Feb 13, 2026

Summary

  • Adds a Docker-based local stack (local-stack/) that runs Dogecoin regtest + l1-interface + L2 geth for integration testing without Kubernetes
  • Extends test dogeos with a direct Dogecoin RPC backend that auto-detects regtest and bypasses Electrs/Blockbook — fully backward-compatible with existing testnet/mainnet usage
  • Auto-funds master wallet, auto-mines blocks for confirmations and L1 finality on regtest

Details

Local stack (local-stack/)

  • start.sh / stop.sh — orchestration scripts that bring up Dogecoin regtest, l1-interface, and L2 geth
  • deploy-contracts.sh — optional Anvil-based bridge contract deployment (Phase 1/2 only; Phase 3 skips Anvil)
  • Config templates for l1-interface and da-publisher

test dogeos improvements

  • New DogeRpcConfig interface + dogeRpc() helper in dogeos-utils.ts
  • getUtxos, getTx, broadcastTx, waitForConfirmations accept optional rpcConfig — when provided, use direct Dogecoin RPC instead of Electrs/Blockbook
  • waitForConfirmations auto-mines 1 block per poll on regtest
  • setupRegtest() — auto-funds master address from coinbase if balance < 1000 DOGE
  • mineRegtestFinality() — mines 200 blocks for l1-interface deposit finality
  • dogecoinRegtest network definition — Dogecoin regtest uses Bitcoin testnet address/WIF prefixes (0x6f/0xEF), not Dogecoin testnet ones (0x71/0xF1)
  • WIF cross-decoding — Dogecoin testnet WIFs are transparently re-encoded for regtest

Backward compatibility

All new parameters are optional. Existing testnet/mainnet users see zero behavior change — no new dependencies, no config changes required.

Test plan

  • yarn build passes
  • yarn lint passes (0 errors, only pre-existing complexity warnings)
  • Run local-stack/start.sh and verify Dogecoin regtest + L2 geth come up
  • Run ./bin/run.js test dogeos 1 against local stack — Case 1 (Multiple OP_RETURN) passes
  • Run ./bin/run.js test dogeos 2 against local stack — Case 2 (Multiple Output) passes
  • Run ./bin/run.js test dogeos 3 against local stack — Case 3 (Bridge UTXO Attack) broadcasts 100/100 txs, Dogecoin side passes. L2 deposit verification requires full l1-interface pipeline processing time.
  • Run ./bin/run.js test dogeos against testnet — verify no regression

🤖 Generated with Claude Code

vmarkushin and others added 6 commits February 12, 2026 21:39
Adds a local development stack that runs Anvil (L1), L2 geth, Dogecoin
regtest, and l1-interface without Kubernetes. Full deposit pipeline
proven end-to-end: Dogecoin → l1-interface → L2 geth → Moat contract.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Auto-detects regtest via getblockchaininfo and uses importaddress+
listunspent/getrawtransaction/sendrawtransaction instead of
Electrs/Blockbook. Fully backward-compatible — testnet/mainnet
callers are unaffected.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- setupRegtest(): auto-funds master address from regtest coinbase
- waitForConfirmations: auto-mines blocks on regtest so txs confirm
- mineRegtestFinality(): mines blocks for l1-interface deposit finality
- Bridge address defaults to known value on regtest
- Export dogeRpc for direct Dogecoin RPC calls

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Remove agent-handoff and testing_improvements docs from PR
- Anvil only starts for Phase 1/2 (contract deployment), not Phase 3
- Add comments explaining L1 contract deployment is for address generation
- Add removed docs to .gitignore

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…test

Dogecoin regtest uses Bitcoin testnet prefixes (pubKeyHash 0x6f, WIF 0xEF)
unlike Dogecoin testnet (0x71, 0xF1). This caused "Invalid Dogecoin address"
errors when the test command tried to use testnet-encoded addresses on regtest.

- Add dogecoinRegtest network definition with correct prefixes
- Auto-switch to regtest network when direct RPC is detected
- Cross-decode WIF keys (testnet WIF works on regtest via private key extraction)
- Store decoded masterKeyPair as instance variable (avoids repeated WIF decoding)
- Relax UTXO confirmation filter on regtest (>= 1 instead of > 1)
- Mine 6 blocks after funding to ensure UTXOs are immediately spendable

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…tSpec

Add L1InterfaceConfig and DaPublisherConfig types to DeploymentSpec so
l1-interface and da-publisher configs are generated from a single source
of truth instead of hand-maintained static files. The generator writes
to .data/ alongside doge-config.toml; start.sh falls back to the old
local-stack/ paths for backward compatibility.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant