From 5e38564922f81466a2c7a55a9892cb41e14138b8 Mon Sep 17 00:00:00 2001 From: Vicente Torrejon Date: Thu, 27 Nov 2025 21:14:07 +0100 Subject: [PATCH] Fix technical inaccuracies in alert.md documentation - Correct 'go run' command syntax by adding missing '.' argument - Update block invalidation flow to accurately reflect database operations - Remove unsupported '+ 1' claim from UTXO freezing description All changes verified against actual implementation in services/alert/node.go, services/blockchain/Server.go, and stores/blockchain/sql/InvalidateBlock.go --- docs/topics/services/alert.md | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/docs/topics/services/alert.md b/docs/topics/services/alert.md index 43be41e3f6..933307d8e7 100644 --- a/docs/topics/services/alert.md +++ b/docs/topics/services/alert.md @@ -23,7 +23,7 @@ The Service features are: ### UTXO Freezing -- Ability to freeze a set of UTXOs at a specific block height + 1. +- Ability to freeze a set of UTXOs at a specified block height. - Frozen UTXOs are classified as such and attempts to spend them are rejected. ### UTXO Unfreezing @@ -173,22 +173,13 @@ The Alert Service initializes the necessary components and services to start pro 3. The Blockchain Client interacts with the Blockchain Store to: - - Mark the specified block as invalid. - - Retrieve all transactions from the invalidated block. + - Mark the specified block and all child blocks as invalid in the database. + - Set the mined status to false for these blocks. + - Return the list of invalidated block hashes. -4. For each transaction in the invalidated block: +4. The Blockchain Client confirms the invalidation process to the Alert Service. - - The Blockchain Client re-validates the transaction. - - If the transaction is still valid, it's added back to the Block Assembly service, for re-inclusion in the next mined block. - -5. The Blockchain Client then: - - - Retrieves the block immediately preceding the invalidated block. - - Sets the chain tip to this previous block, effectively removing the invalidated block from the main chain. - -6. The Blockchain Client confirms the invalidation process to the Alert Service. - -7. Finally, the Alert Service returns the invalidation result to the P2P network. +5. Finally, the Alert Service returns the invalidation result to the P2P network. ## 3. Technology @@ -266,7 +257,7 @@ The Alert Service initializes the necessary components and services to start pro To run the Alert Service locally, you can execute the following command: ```shell -SETTINGS_CONTEXT=dev.[YOUR_USERNAME] go run -Alert=1 +SETTINGS_CONTEXT=dev.[YOUR_USERNAME] go run . -Alert=1 ``` Please refer to the [Locally Running Services Documentation](../../howto/locallyRunningServices.md) document for more information on running the Alert Service locally.