Skip to main content

Z-DAG Developer Guide

Z-DAG gives integrations a status for unconfirmed SPT allocation transfers from a Core node. The node checks the transaction and its unconfirmed ancestors in the local mempool. Configure the waiting period and confirmation policy for the application. Z-DAG design and whitepaper · Core architecture

The eligible format is allocation send, transaction version 142. The queried transaction and its unconfirmed ancestors must meet the Z-DAG size policy of 1,100 serialized bytes. For example, an unconfirmed ordinary SYS transfer that funds a fee input can make the child ineligible even when the child is an SPT allocation send. Policy size limit · Mempool ancestor checks

Understanding Z-DAG Statuses​

assetallocationverifyzdag "<txid>" returns a numeric status based on the node's mempool checks.

StatusDescription
-1The transaction was not found by the mempool check. It may already be confirmed.
0Z-DAG OK. The node's checks passed.
1The transaction or an unconfirmed ancestor signals replace-by-fee (RBF).
2The transaction or an unconfirmed ancestor is not a Z-DAG transaction.
3The transaction or an unconfirmed ancestor exceeds the Z-DAG size limit.
4The node detected a double-spend conflict involving the transaction or an unconfirmed ancestor.
5The node cannot complete conflict verification because it exhausted its budget for retaining conflict evidence. This warning replaces an otherwise OK result until the node restarts.

Statuses 2 and 4 already have these meanings in Syscoin Core 5.1.3. Status 5 is available in releases that include Syscoin Core #609.

After your configured Z-DAG waiting period, accept only numeric 0 as Z-DAG OK. That result applies to the node's view of the unconfirmed transaction. For any other status, including an unknown value, verify the transaction on the active chain and check that it meets your confirmation requirement before treating it as confirmed.

Using Z-DAG Balances​

Core 4.x exposed a zdag_balance through assetallocationbalance. Core 5.0 removed that RPC. In Core 5.x, apply the transaction status and confirmation checks above to each transfer. Core 5.0 release notes