dumptxoutset
Summary
Write the serialized UTXO set to a file. This can be used in loadtxoutset afterwards if this snapshot height is supported in the chainparams as well.
Description
Write the serialized UTXO set to a file. This can be used in loadtxoutset afterwards if this snapshot height is supported in the chainparams as well.
Unless the "latest" type is requested, the node will roll back to the requested height and network activity will be suspended during this process. Because of this it is discouraged to interact with the node in any other way during the execution of this call to avoid inconsistent results and race conditions, particularly RPCs that interact with blockstorage.
This call may take several minutes. Make sure to use no RPC timeout (qbit-cli -rpcclienttimeout=0)
Arguments
path(STR, required): Path to the output file. If relative, will be prefixed by datadir.type(STR): The type of snapshot to create. Can be "latest" to create a snapshot of the current UTXO set or "rollback" to temporarily roll back the state of the node to a historical block before creating the snapshot of a historical UTXO set. This parameter can be omitted if a separate "rollback" named parameter is specified indicating the height or hash of a specific historical block. If "rollback" is specified and separate "rollback" named parameter is not specified, this will roll back to the latest valid snapshot block that can currently be loaded with loadtxoutset.options(OBJ_NAMED_PARAMS): No description.rollback(NUM): Height or hash of the block to roll back to before creating the snapshot. Note: The further this number is from the tip, the longer this process will take. Consider setting a higher -rpcclienttimeout value in this case.
Results
value(OBJ): No description.coins_written(NUM): the number of coins written in the snapshotbase_hash(STR_HEX): the hash of the base of the snapshotbase_height(NUM): the height of the base of the snapshotpath(STR): the absolute path that the snapshot was written totxoutset_hash(STR_HEX): the hash of the UTXO set contentsnchaintx(NUM): the number of transactions in the chain up to and including the base block
Examples
qbit-cli -rpcclienttimeout=0 dumptxoutset utxo.dat latest
qbit-cli -rpcclienttimeout=0 dumptxoutset utxo.dat rollback
qbit-cli -rpcclienttimeout=0 -named dumptxoutset utxo.dat rollback=853456