Q-BitX v0.3.0
Q-BitX Core v0.2.0-pq-witness
Consensus + Wallet Release: PQ Witness, PQ Sigops, LWMA and Legacy Migration Preparation
This release is a major Q-BitX Core update focused on post-quantum transaction scalability, mining stability, fee/weight accounting, and long-term legacy-to-witness migration safety.
The update introduces the first Q-BitX PQ witness transaction path for Dilithium signatures, aligns PQ sigops accounting with activation height logic, adds LWMA difficulty adjustment, updates wallet/RPC handling for legacy and witness PQ outputs, and adds preliminary tooling for legacy PQ UTXO consolidation before witness activation.
Activation heights
Mainnet / public networks:
LWMA difficulty adjustment: block 200,001
PQ sigops: block 230,000
PQ witness: block 230,000
Regtest:
PQ sigops: block 1
PQ witness: block 10
Coinbase maturity remains unchanged:
COINBASE_MATURITY = 100
Legacy PQ addresses remain valid.
Existing coins remain spendable.
Existing deposit addresses continue to work.
There is no forced migration, no swap, no coin freeze, and no legacy address shutdown.
- Consensus: PQ Witness for Dilithium transactions
This release introduces native PQ witness support for Q-BitX Dilithium transaction spends.
Dilithium signatures are significantly larger than classical ECDSA signatures. Keeping all PQ signature data in legacy scriptSig form creates heavy transaction weight pressure and makes large-input transactions inefficient over time.
PQ witness adds a dedicated witness-style transaction path for post-quantum signatures while preserving compatibility with existing legacy PQ outputs.
Main consensus behavior:
- Adds height-gated PQ witness activation.
- Adds SCRIPT_VERIFY_PQ_WITNESS.
- Adds native Dilithium witness spend validation.
- Adds witness-program handling for PQ witness outputs.
- Adds witness stack validation for Dilithium witness spends.
- Routes PQ witness spends through the appropriate Dilithium verification path.
- Keeps legacy PQ outputs valid before and after activation.
- Prevents pre-activation witness behavior from becoming consensus-valid too early.
- Keeps legacy PQ as a valid migration source after activation.
This is an additional transaction path, not a forced replacement.
Before block 230,000:
- Default PQ wallet addresses remain legacy.
- Existing M/legacy addresses continue to work.
- Legacy PQ transactions remain valid.
- PQ witness rules are not active on mainnet.
After block 230,000:
- PQ witness validation becomes active.
- Wallets may begin using PQ witness outputs by default where supported.
- Legacy PQ outputs remain spendable.
- Migration can happen gradually.
- K=16 PQ witness discount
This release adds a PQ-specific witness accounting model.
Q-BitX now uses:
PQ_WITNESS_SCALE_FACTOR = 16
after PQ witness activation.
The goal is to make large Dilithium witness data practical while preserving block weight limits, mempool accounting, fee estimation, mining policy, and anti-spam constraints.
Updated areas include:
- GetWitnessDiscountScale
- transaction weight calculation
- virtual size calculation
- mempool entry accounting
- block template package accounting
- RPC transaction/block JSON reporting
- REST transaction/block output
- wallet fee and coin selection paths
- fee bumping paths
- testmempoolaccept / mempool reporting behavior
Before PQ witness activation, standard legacy witness accounting remains unchanged.
After PQ witness activation, transaction/block weight logic uses the PQ witness discount scale where appropriate.
- Consensus: PQ sigops activation alignment
PQ signature operation accounting has been aligned with the PQ witness activation model.
Public network activation:
PQ sigops: block 230,000
This release adds or updates:
- nPQSigopsHeight chain parameter
- PQ sigops activation state detection
- height-aware sigop counting
- mempool policy integration
- block validation integration
- reorg boundary handling
- tests for pre/post activation behavior
PQ/Dilithium opcode families are accounted for after activation while preserving pre-activation behavior.
The update also includes mempool safety handling when PQ sigops activation state changes across a reorg boundary, preventing stale sigop cost/policy assumptions from remaining in the mempool.
- Consensus: LWMA difficulty adjustment
This release includes LWMA difficulty adjustment for improved hashrate response.
Public network activation:
LWMA: block 200,001
LWMA window: 18 blocks
Q-BitX currently operates as a young PoW network, where sudden hashpower changes can cause unstable block intervals or long stalls. LWMA is added to improve difficulty response compared with slower adjustment behavior.
Main changes:
- Adds nLWMAHeight.
- Adds nLWMAWindow.
- Adds LWMA path in GetNextWorkRequired.
- Keeps pre-LWMA behavior before activation.
- Updates permitted difficulty transition logic after LWMA activation.
- Adds tests around activation boundary and LWMA difficulty behavior.
LWMA is intended to reduce the impact of abrupt hashpower entry/exit and make block production more stable after activation.
- Wallet/RPC: PQ witness and legacy PQ address behavior
Wallet and RPC logic has been updated to support the new legacy/witness split.
Expected behavior before PQ witness activation:
- getnewaddress "" pq returns legacy PQ addresses.
- validateaddress shows legacy addresses as non-witness.
- existing M/legacy addresses remain valid.
- legacy sending remains functional.
- exchanges and pools can continue using existing legacy deposit infrastructure.
Expected behavior after PQ witness activation:
- wallets may generate PQ witness addresses by default where configured.
- witness change/output handling becomes available.
- legacy PQ outputs remain spendable.
- users can migrate gradually instead of being forced into a one-time swap.
Updated wallet/RPC areas include:
- address generation
- address validation
- PQ send RPC paths
- wallet spend logic
- fee calculation
- coin selection interaction with witness weight
- IsMine handling
- scriptPubKey manager logic
- wallet transaction accounting
- PQ descriptor/address support paths
- mempool/RPC reporting of weight and vsize
This release is designed to preserve old address compatibility while adding the new PQ witness path.
- Wallet RPC: preliminary legacy PQ UTXO consolidation helper
A new RPC has been added:
pqconsolidatelegacy
Purpose:
many small legacy PQ UTXOs
→ fewer larger legacy PQ UTXOs
→ easier migration to PQ witness after activation
This is mainly intended for miners, pools, and users with many mined legacy outputs.
Important status:
pqconsolidatelegacy is preliminary pre-activation tooling.
It is not yet final migration UX.
It may be refined before block 230,000.
Current intended usage:
- Use dry_run first.
- Run gradually.
- Wait for confirmations between batches.
- Do not treat it as final automated migration tooling yet.
- Large-wallet behavior should be reviewed carefully before broad public use.
This RPC does not change consensus.
It is wallet-side operational tooling only.
Known operational note:
During mainnet testing, the RPC successfully created consolidation transactions, but the migration UX needs further refinement before being recommended for large-scale miner cleanup. In particular, large wallets with hundreds of UTXOs should not rely on aggressive multi-batch usage until the tool is finalized.
For this reason, the RPC is included as a preliminary helper, while the main consensus-critical update remains PQ witness, PQ sigops, and LWMA.
- Exchange and pool compatibility
This release is designed to avoid breaking existing exchange and pool integrations.
Important compatibility guarantees:
- Existing legacy deposit addresses remain valid.
- Legacy PQ outputs remain spendable.
- Old coins are not frozen.
- There is no forced migration.
- There is no swap.
- There is no central reissue.
- PQ witness is an additional address/output path.
Recommended checks for exchanges and pools:
- Continue supporting legacy PQ deposits.
- Review address validation for the new PQ witness format.
- Review deposit detection for the new scriptPubKey format.
- Review withdrawal support to PQ witness addresses when ready.
- Review block/transaction JSON fields related to weight and vsize.
- Review fee estimation behavior around PQ witness activation.
- Review mempool and transaction size assumptions.
- Test both legacy and witness paths before block 230,000.
Before block 230,000, services can continue operating on legacy addresses.
After block 230,000, services may gradually add PQ witness support while still accepting legacy deposits.
- RPC / REST / JSON reporting updates
Transaction and block reporting paths have been updated to account for PQ witness weight behavior.
Updated areas include:
- getblock
- getrawtransaction
- decoderawtransaction
- getmempoolentry
- getrawmempool verbose output
- testmempoolaccept
- mining/block template paths
- REST transaction/block output
- internal weight/vsize reporting
The goal is to keep external tooling consistent with the active witness discount model after activation.
Services that index transactions should verify:
- size
- vsize
- weight
- witness data
- scriptPubKey type
- address extraction
- mempool fee rate assumptions
- Script and validation updates
This release updates script and validation paths for PQ witness and PQ sigops behavior.
Main areas:
- interpreter witness validation
- Dilithium witness verification
- sigop counting
- consensus transaction verification
- policy standardness checks
- mempool admission
- block validation
- reorg activation boundary handling
- script error paths
- witness stack handling
PQ witness validation is height-gated and should not activate before the configured block height.
Legacy PQ validation remains available after activation.
- Tests
This release adds and updates tests covering:
- PQ witness activation height behavior
- K=16 witness discount transition
- PQ sigops activation behavior
- PQ sigop counting
- PQ sigop pipeline behavior
- mempool behavior across PQ sigops activation boundary
- script standardness
- wallet IsMine behavior
- PQ witness mempool/RPC behavior
- preliminary legacy PQ consolidation behavior
- LWMA difficulty adjustment behavior
- LWMA activation boundary behavior
New/updated test areas include:
- src/test/pq/pq_witness_activation_tests.cpp
- src/test/pq/pq_sigop_pipeline_tests.cpp
- src/test/pq/pq_sigopcount_tests.cpp
- src/test/pow_tests.cpp
- src/test/validation_tests.cpp
- src/test/script_standard_tests.cpp
- src/wallet/test/ismine_tests.cpp
- test/functional/feature_pq_witness_mempool_rpc.py
- test/functional/feature_pq_consolidate_legacy.py
Manual test status:
- Linux build completed successfully.
- Windows console binaries were prepared.
- Main branch was updated.
- Legacy address generation before PQ witness activation was confirmed.
- Legacy sending was confirmed.
- pqconsolidatelegacy dry-run and live behavior were tested manually.
- Static audit did not identify critical consensus blockers.
Full automated test passes are still recommended for downstream integrators, pools, exchanges, and service operators before broad deployment.
- Binary packages
This release provides console binaries only.
Included Linux x86_64 package:
- qbitx
- qbitx-cli
Included Windows x86_64 package:
- qbitx.exe
- qbitx-cli.exe
GUI wallet is not included in this release package.
Release files:
qbitx-v0.2.0-pq-witness-linux-x86_64.tar.gz
qbitx-v0.2.0-pq-witness-windows-x86_64.zip
SHA256SUMS
SHA256 checksums:
998bc13d2f37d892e638ca0217db8a14f55f51e8cbe3531189c1c91bdab91505 qbitx-v0.2.0-pq-witness-linux-x86_64.tar.gz
055e2c1703f75f74664772a08eb2ec7b5121fde8e37383fc52b83edb20b9d568 qbitx-v0.2.0-pq-witness-windows-x86_64.zip
- Upgrade notes for node operators
Recommended process:
- Stop the old node.
- Back up wallet and datadir.
- Replace qbitx and qbitx-cli binaries.
- Start the node.
- Verify sync status.
- Verify current block height.
- Verify legacy address validation.
- Monitor logs around activation heights.
Important:
- LWMA activates at block 200,001.
- PQ sigops activates at block 230,000.
- PQ witness activates at block 230,000.
- Legacy PQ remains valid after activation.
- Existing coins are not frozen.
- Exchanges do not need to immediately replace old deposit addresses.
- Summary
Q-BitX Core v0.2.0-pq-witness is a major network upgrade release.
It adds:
- PQ Witness for Dilithium transactions
- K=16 PQ witness discount
- PQ sigops activation and accounting
- LWMA difficulty adjustment
- wallet/RPC support for legacy and witness PQ behavior
- preliminary legacy PQ consolidation tooling
- expanded tests for activation, policy, wallet and consensus behavior
This update moves Q-BitX further toward its core goal:
Bitcoin-style PoW economics with post-quantum transaction security.
No premine.
No swap.
No forced migration.
No coin freeze.
Legacy addresses remain valid.
PQ witness is added as a new transaction path.