Skip to main content

Transactions and Consensus

Four changes touch the transaction format and the chain rules: reference inputs, 30-second blocks, the asset marker migration and a replaceability rule for asset spends.

Transaction v3 and reference inputs (NIP-014)

Transaction version 3 adds a vrefin section: a list of outpoints that the transaction reads but does not spend. Scripts inspect them with the OP_REFINPUT opcodes. This is what makes oracles, shared state and DePIN state models expressible without consuming the UTXO that holds the state.

transaction v3vinspent inputsconsumed by the transactionsignatures as usualclassical or AuthScriptvrefinreference inputs · NIP-014read-only, never spentmust be confirmed and unspentcommitted in txid and wtxidvoutoutputsXNA and asset outputsAuthScript commitmentsasset payloads with xna markerscripts in vin call OP_REFINPUTCOUNT · OP_REFINPUTFIELD · OP_REFINPUTASSETFIELD over vrefin

Rules:

  • vrefin is serialized between vout and the witness and is committed in both txid and wtxid.
  • Every reference input must be a confirmed and unspent output. A transaction whose reference is spent by a confirmed block is evicted from the mempool.
  • The number of reference inputs in a standard transaction is capped.
  • A transaction with reference inputs is v3 by definition. Version 3 transactions are rejected before activation.

The functional test suite and unit tests in the node cover serialization, mempool eviction and block validation of vrefin.

30-second blocks (NIP-028)

The block target is halved from 60 to 30 seconds. To keep the emission schedule unchanged, the subsidy halving interval is doubled and the per-block subsidy is halved at the activation height.

Beforelegacy parametersblock target60 ssubsidy halving every14,400 blocksmicro-halving cadence≈ 10 daysNIP-028Aftertestnet, from height 22,700block target30 ssubsidy halving every28,800 blocksmicro-halving cadence≈ 10 days
ParameterBeforeAfter
Block target60 s30 s
Difficulty retargetDark Gravity Wave, 180 blocksSame, over 30-second spacing
Subsidy halving interval14,400 blocks28,800 blocks
Maximum reorganization depth60120
Block versionas beforemust carry the NIP-028 flag (bit 30)

Activation is by height on testnet. Blocks at or above the activation height must carry the flag in nVersion, so an upgraded node rejects legacy-mined blocks immediately. Mainnet and regtest keep the 60-second target until a future NIP schedules the change.

Asset marker migration (NIP-040)

Asset payloads keep a binary prefix inherited from Ravencoin: rvnq, rvnt, rvno, rvnr. NIP-040 replaces the prefix of new outputs with xna, keeping the fourth byte that identifies the operation.

OperationLegacyNIP-040
Issuervnqxnaq
Transferrvntxnat
Owner tokenrvnoxnao
Reissuervnrxnar

Legacy UTXOs stay spendable forever and migrate naturally when spent: the input is read with the old marker and the output is written with the new one. No snapshot, no claims, no change to name, supply, metadata or ownership. Activation is a fixed height per network.

Non-replaceable asset spends (NIP-025)

A transaction that spends at least one asset-wrapped AuthScript output must set a non-replaceable sequence on every input. This protects DEX partial-fill covenants and plain asset transfers to post-quantum addresses from replace-by-fee races.

Strict asset scripts

Outputs that contain the asset opcode but are not a valid asset script are rejected outright on testnet and regtest. Mainnet keeps the legacy acceptance rule until the unified fork, because applying it retroactively would invalidate history.

Activation status

ChangeTestnetRegtestMainnet
Transaction v3 and vrefinActiveActiveInactive
30-second blocksActive from height 22,700InactiveInactive
xna asset markerActive from height 303,000Active from genesisNot scheduled
Non-replaceable asset-AuthScript spendsActiveActiveInactive
Strict asset scriptsActiveActiveInactive