Problem
BQIP-0007 weight formula (base_bytes × 4 + witness_bytes × 1) was copied from Bitcoin SegWit but hurts PQC performance because Dilithium5 signatures are ~80x larger than ECDSA.
Numbers
| Formula |
Weight/tx (1-in 1-out D5) |
tx/block (4M WU) |
TPS |
| BQIP-0002 (old) |
~3,894 WU |
~1,027 |
~1.45 |
| BQIP-0007 (current) |
~7,240 WU |
~552 |
~0.78 |
BQIP-0007 gives 46% fewer transactions per block than BQIP-0002.
Root Cause
Bitcoin SegWit: signature ~100 bytes, base ~200 bytes → 4:1 discount helps
BitQuan PQC: signature ~8,000 bytes, base ~110 bytes → 4:1 discount penalizes base while witness still dominates
Solution
Rollback calculate_tx_weight() to BQIP-0002 formula:
weight = base_bytes + sig_count × 384 + witness_bytes × 0.5
base_bytes × 1 — base data at 1 WU/byte
sig_count × 384 — fixed cost per signature (algorithm-agnostic)
witness_bytes × 0.5 — 50% discount on witness data
Scope
crates/consensus/src/lib.rs — calculate_tx_weight()
crates/mempool/src/lib.rs — calculate_tx_weight()
- Remove deprecated
calculate_block_weight_with_beta() (now redundant)
- Update all test assertions
- BQIP-0007 SegWit infrastructure stays (struct separation, txid/wtxid, witness root)
Files NOT Changed
transaction.rs — struct already correct
block.rs — compute_witness_root() already exists
wire.rs — serialization already correct
aggregation.rs — BQIP-0008 already correct
Problem
BQIP-0007 weight formula (
base_bytes × 4 + witness_bytes × 1) was copied from Bitcoin SegWit but hurts PQC performance because Dilithium5 signatures are ~80x larger than ECDSA.Numbers
BQIP-0007 gives 46% fewer transactions per block than BQIP-0002.
Root Cause
Bitcoin SegWit: signature ~100 bytes, base ~200 bytes → 4:1 discount helps
BitQuan PQC: signature ~8,000 bytes, base ~110 bytes → 4:1 discount penalizes base while witness still dominates
Solution
Rollback
calculate_tx_weight()to BQIP-0002 formula:base_bytes × 1— base data at 1 WU/bytesig_count × 384— fixed cost per signature (algorithm-agnostic)witness_bytes × 0.5— 50% discount on witness dataScope
crates/consensus/src/lib.rs—calculate_tx_weight()crates/mempool/src/lib.rs—calculate_tx_weight()calculate_block_weight_with_beta()(now redundant)Files NOT Changed
transaction.rs— struct already correctblock.rs—compute_witness_root()already existswire.rs— serialization already correctaggregation.rs— BQIP-0008 already correct