diff --git a/configs/coins/syscoin.json b/configs/coins/syscoin.json index d0ca2aaae5..1d8af46612 100644 --- a/configs/coins/syscoin.json +++ b/configs/coins/syscoin.json @@ -65,7 +65,7 @@ "internal_binding_template": ":{{.Ports.BlockbookInternal}}", "public_binding_template": ":{{.Ports.BlockbookPublic}}", "explorer_url": "", - "additional_params": "-dbcache=4294967296 -dbmaxopenfiles=500000 -workers=16 -chunk=1000", + "additional_params": "-dbcache=4294967296 -dbmaxopenfiles=500000 -workers=16 -chunk=1000 -extendedindex", "block_chain": { "parse": true, "mempool_workers": 8, diff --git a/configs/coins/syscoin_testnet.json b/configs/coins/syscoin_testnet.json index 77d186ac84..ee2a86946f 100644 --- a/configs/coins/syscoin_testnet.json +++ b/configs/coins/syscoin_testnet.json @@ -66,7 +66,7 @@ "internal_binding_template": ":{{.Ports.BlockbookInternal}}", "public_binding_template": ":{{.Ports.BlockbookPublic}}", "explorer_url": "", - "additional_params": "-dbcache=4294967296 -dbmaxopenfiles=500000 -workers=16 -chunk=1000", + "additional_params": "-dbcache=4294967296 -dbmaxopenfiles=500000 -workers=16 -chunk=1000 -extendedindex", "block_chain": { "parse": true, "mempool_workers": 8, diff --git a/docs/api-syscoin.md b/docs/api-syscoin.md index 1871507051..98808e4e00 100644 --- a/docs/api-syscoin.md +++ b/docs/api-syscoin.md @@ -36,6 +36,24 @@ These fields appear on existing transaction endpoints, including `/api/v2/tx/{txid}` and address transaction lists. They are omitted for ordinary base coin transactions. +### Spending transaction lookups + +The `syscoin` and `syscoin_testnet` package configurations enable +`-extendedindex`. This stores the spending transaction ID, input index, and +block height with each spent output during indexing. `/spending/{txid}/{vout}` +can then read the spender directly instead of scanning the output address's +transaction history. Transaction responses also include `spentTxId`, +`spentIndex`, and `spentHeight` where applicable, without requiring +`?spending=true`. + +Existing Blockbook databases created without `-extendedindex` must be rebuilt +before using the updated service configuration. Changing the startup flag alone +does not backfill historical records and fails with `ExtendedIndex setting does +not match`. Build the new index in a separate database directory, retain the +original index for rollback, and verify synchronization and spending lookups +before switching public traffic. The Syscoin Core blockchain data does not need +to be rebuilt. + ## Address Responses Address responses retain the standard Blockbook `tokens` array for regular