Skip to content

WIP Feat btc canister#1295

Open
bysomeone wants to merge 85 commits into33cn:masterfrom
bysomeone:feat-btc-canister
Open

WIP Feat btc canister#1295
bysomeone wants to merge 85 commits into33cn:masterfrom
bysomeone:feat-btc-canister

Conversation

@bysomeone
Copy link
Copy Markdown
Collaborator

@bysomeone bysomeone commented May 6, 2026

Summary

This PR introduces RGBX and Lightclient modules for BTC cross-chain workflows, fixes key EVM runtime/query issues, and updates CI/build scripts for better portability and reliability.

Why

Main Changes

  • Added new dApps:
    • plugin/dapp/rgbx/*
    • plugin/dapp/lightclient/*
  • EVM fixes:
    • gas multiple config handling
    • log address behavior + related tests
  • Build/CI updates:
    • build/autotest/run.sh portability improvements
    • workflow/config updates for RGBX/Lightclient paths
  • Dependency updates:
    • go.mod / go.sum (chain33 and related modules)

Compatibility / Risk

  • Includes config/fork related changes; deployment environments should verify effective fork heights and module enablement.

Notes

  • This PR is large and may be easier to review commit-by-commit by area:
    1. RGBX
    2. Lightclient
    3. EVM fixes
    4. CI/build/refactor

- format asset symbol to upper case
-  handle change amount when transfer asset in utxo mode
* support setting rgbx asset precision
* use string type for utxo hash value
…tion

- Add sticky input validation in TSS signing to prevent duplicate withdrawals
- Add withdrawStickyUTXO mapping for signature consistency
- Add deposit/withdraw state tracking to prevent duplicate submissions
- Add removePendingChan for async pending tx removal
- Adjust init sequence and optimize cleanUp
- Add utxo message type for UTXO management
…t management

- Add cross-chain account system (newCrossChainAccount, crossChainLockAddress)
- Add deposit asset mint on deposit (AccDB.Mint)
- Add withdraw asset lock on withdrawal (AccDB.Transfer to lock address)
- Add deposit used tracking to prevent double spending
- Add fromAddress to pendingTx for source tracking
- Add txBlockIndexList for batch block index management
- Add unit tests for cross-chain and local exec operations
- Add isCrossChain field to transferAsset for cross-chain transfers
- Rename fields: from->fromUtxo, fromPkScript->fromUtxoPkScript, externalAsset->isCrossChain
- Add cross-chain account transfer logic when isCrossChain=true
- Return ErrNotSupport for cross-chain in transferAsset confirm
- Update unit tests for new transfer fields
- Add a dedicated GitHub workflow and CI packaging flow so rgbx integration tests run automatically with the standard make docker-compose entrypoint.
- Introduce a self-contained rgbx CI environment (Chain33 + para services + btcd) to exercise deposit, transfer, and withdraw paths in a realistic multi-service topology.
- Removed the `isCrossChain` flag from the `TransferAsset` message and related functions.
- Updated transfer logic to handle cross-chain assets based on symbol prefixes instead.
- Adjusted related tests and error handling to reflect the new asset management approach.
- Enhanced precision handling for asset amounts during transfers.
…g in withdraw processing

- Changed the command flag for BTC header height from `-h` to `-t` for better clarity.
- Modified the `processWithdrawRequest` function to include error handling for panic recovery and improved UTXO management.
- Enhanced logging and error handling in various withdrawal-related functions to improve traceability and debugging.
- Introduced new fork configurations for light client and RGBX in `chain33.para.toml`.
- Enhanced the `Makefile` to support conditional builds based on the operating system.
- Updated `docker-compose` scripts to include volume mounts for persistent data storage.
- Improved error handling and added new utility functions in the `docker-compose-pre.sh` script.
- Adjusted `docker-compose.yml` to ensure proper service dependencies and configurations for the RGBX dApp.
- Added `endHeight` parameter to `ReqListPendingTx` for improved transaction querying.
- Introduced `requiredConfs` in the `rgbx` struct to manage block confirmations dynamically.
- Adjusted logging and error handling in transaction processing for better traceability.
@bysomeone bysomeone changed the title Feat btc canister WIP Feat btc canister May 6, 2026
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