aboutsummaryrefslogtreecommitdiff
path: root/doc/tracing.md
diff options
context:
space:
mode:
authorArnab Sen <arnabsen1729@gmail.com>2021-09-03 22:08:53 +0530
committerArnab Sen <arnabsen1729@gmail.com>2021-11-28 11:51:21 +0530
commit2bc51c5c3215398875c04456a3f3df1c07b830b5 (patch)
treeaef191c5127b3a7e4a0d1c791e96b54c9958d082 /doc/tracing.md
parenta26e8eef43c5ff0f4a5cd44d1d331a7bd72564a5 (diff)
downloadbitcoin-2bc51c5c3215398875c04456a3f3df1c07b830b5.tar.xz
[tracing] tracepoints to utxocache add, spent and uncache
Signed-off-by: Arnab Sen <arnabsen1729@gmail.com>
Diffstat (limited to 'doc/tracing.md')
-rw-r--r--doc/tracing.md33
1 files changed, 33 insertions, 0 deletions
diff --git a/doc/tracing.md b/doc/tracing.md
index 4c18179928..5b9ba09c2f 100644
--- a/doc/tracing.md
+++ b/doc/tracing.md
@@ -124,6 +124,39 @@ Arguments passed:
5. If the flush was pruned as `bool`
6. If it was full flush as `bool`
+#### Tracepoint `utxocache:add`
+
+It is called when a new coin is added to the UTXO cache.
+
+Arguments passed:
+1. Transaction ID (hash) as `pointer to unsigned chars` (i.e. 32 bytes in little-endian)
+2. Output index as `uint32`
+3. Block height the coin was added to the UTXO-set as `uint32`
+4. Value of the coin as `int64`
+5. If the coin is a coinbase as `bool`
+
+#### Tracepoint `utxocache:spent`
+
+It is called when a coin is spent from the UTXO cache.
+
+Arguments passed:
+1. Transaction ID (hash) as `pointer to unsigned chars` (i.e. 32 bytes in little-endian)
+2. Output index as `uint32`
+3. Block height the coin was spent, as `uint32`
+4. Value of the coin as `int64`
+5. If the coin is a coinbase as `bool`
+
+#### Tracepoint `utxocache:uncache`
+
+It is called when the UTXO with the given outpoint is removed from the cache.
+
+Arguments passed:
+1. Transaction ID (hash) as `pointer to unsigned chars` (i.e. 32 bytes in little-endian)
+2. Output index as `uint32`
+3. Block height the coin was uncached, as `uint32`
+4. Value of the coin as `int64`
+. If the coin is a coinbase as `bool`
+
## Adding tracepoints to Bitcoin Core
To add a new tracepoint, `#include <util/trace.h>` in the compilation unit where