RGB v0.12 Integration Testing: Progress Updates
Introduction
As contributors to the Bitcoin RGB ecosystem, BitlightLabs has been collaborating with Dr. Maxim to upgrade the rgb-tests framework for compatibility with RGB v0.12. This post summarizes our progress, design principles, and critical updates during the migration.
RGB v0.11 Baseline Execution Summary
The v0.11 baseline tests (feat/rgb-v11-baseline-tests) validated core functionalities, including asset issuance, transfers, and state consistency.
Test Results Overview
| Test Type |
Total |
Passed |
Failed |
Ignored |
issuance.rs |
20 |
20 |
0 |
0 |
stress.rs |
6 |
0 |
0 |
6 |
transfers.rs |
101 |
88 |
0 |
13 |
validation.rs |
6 |
5 |
0 |
1 |
| Total |
133 |
113 |
0 |
20 |
Key Insights
- Success Rate: 85% (113/133 tests passed).
- Core Stability: All
issuance.rs tests passed, confirming stable asset issuance.
- Ignored Tests:
- Stress Tests: All 6
stress.rs tests were deferred for v0.12 evaluation.
- Legacy Issues: 13 transfer-related tests (e.g.,
reorg_history::case_2, invoice_reuse::case_1) were flagged as v0.11-specific edge cases.
Critical Passed Tests
- Asset lifecycle:
mainnet_wlt_receiving_test_asset, check_fungible_history.
- Transfer workflows:
rbf_transfer, collaborative_transfer, transfer_loop (72 cases).
- Validation:
validate_consignment_chain_fail, validate_consignment_success.
RGB v0.12 Test Design Principles
To address v0.12’s breaking changes, we adopted:
- Simplicity: Focus on essential integration tests (e.g., total value conservation in transfers).
- Modularity: Decouple core tests from low-level abstractions to minimize future migration efforts.
- Unit Test Gaps: Identify and supplement missing module-level tests in upstream RGB crates.
Key Updates (Feb 10–15 & Feb 17–21)
Phase 1: Infrastructure Overhaul (Feb 10–15)
- ARM/MacOS Support: Enabled ARM compatibility and migrated to Bitlight’s optimized
local-env Docker images.
- Dependency Upgrades: Updated all submodules to RGB v0.12-compatible versions.
- Framework Redesign: Restructured test architecture in to align with v0.12’s API changes (e.g., revised asset issuance logic).
Phase 2: Functional Testing (Feb 17–21)
- Wallet Utilities: Refactored wallet operations for v0.12 in
feat/rgb-v12-enhanced-tests.
- Test Coverage: Validated NIA/CFA asset issuance and basic transfers. UDA tests are pending upstream stabilization.
- Critical Issues Filed:
- #285: UTXO reuse failure in asset issuance.
- #286: RBF transfer state inconsistency.
- #33: Log file conflicts.
Phase 3: Full Migration to v0.12
Branch: v0.12
Key Contributions:
- Concurrency Optimization: Adjusted index synchronization concurrency settings during parallel testing to mitigate Esplora’s HTTP 429 rate-limiting errors.
- Wallet Enhancements: Implemented
import_articles and related methods to ensure proper processing of consignments and UDA data received from peers.
- Test Restoration: Reinstated all transfer and issuance test cases, excluding UDA tests pending upstream stabilization.
Results:
- Issuance & Issuance: All non-UDA test cases succeeded.
Next Steps
- Finalize stress-test modules for performance benchmarking.
- Expand non-custodial scenario tests (key management, signature separation).
- Collaborate upstream to resolve identified issues.
Repo Links
Follow our progress and contribute via GitHub! 🚀