Skip to content

chore: migrate rust/basic_bitcoin to icp-cli#1397

Draft
marc0olo wants to merge 1 commit into
masterfrom
chore/migrate-rust-basic-bitcoin-to-icp-cli
Draft

chore: migrate rust/basic_bitcoin to icp-cli#1397
marc0olo wants to merge 1 commit into
masterfrom
chore/migrate-rust-basic-bitcoin-to-icp-cli

Conversation

@marc0olo

Copy link
Copy Markdown
Member

Summary

  • Replace dfx.json with icp.yaml using the same Bitcoin Docker image pattern as motoko/basic_bitcoin (custom image bundling bitcoind + IC network launcher)
  • Move Rust source from src/ into backend/ subdirectory; replace flat Cargo.toml with a workspace + backend/Cargo.toml (package name backend)
  • Copy Dockerfile and docker/start.sh from motoko/basic_bitcoin (same bitcoind setup)
  • Rewrite Makefile with icp canister call backend ... and 9 numbered tests covering address generation, balance, UTXOs, blockchain info, and block headers
  • Update README.md: replace all dfx commands with icp/icp-cli, preserve all domain-specific content (Bitcoin asset protocols, implementation notes, address type explanations)
  • Add rust-basic_bitcoin job to .github/workflows/basic_bitcoin.yml (runs on host, not container, so Docker bind-mounts work; includes dtolnay/rust-toolchain setup step)
  • Delete dfx.json, build.sh, basic_bitcoin.did (backend-only, no frontend)

Test plan

  • make build-image builds the Docker image successfully
  • icp network start -d && icp deploy --cycles 30t deploys the backend canister
  • make test runs all 9 tests (address generation, fee percentiles, mining 101 blocks, balance check, UTXOs, blockchain info, block headers)
  • CI job rust-basic_bitcoin in .github/workflows/basic_bitcoin.yml triggers on changes to rust/basic_bitcoin/**

🤖 Generated with Claude Code

- Replace dfx.json with icp.yaml (Bitcoin integration via custom Docker
  image bundling bitcoind, matching motoko/basic_bitcoin pattern)
- Move Rust source from src/ into backend/ subdirectory
- Replace root Cargo.toml with workspace + backend/Cargo.toml (name=backend)
- Copy Dockerfile and docker/start.sh from motoko/basic_bitcoin
- Rewrite Makefile with icp-cli commands and 9 numbered tests
- Update README with icp-cli instructions, preserve all domain content
- Add rust-basic_bitcoin CI job to .github/workflows/basic_bitcoin.yml
- Delete dfx.json, build.sh, basic_bitcoin.did, old src/

Co-Authored-By: Claude Sonnet 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