Skip to content

Commit 8e800a8

Browse files
authored
Docs/service documentation corrections (#117)
1 parent 581eb08 commit 8e800a8

19 files changed

+160
-331
lines changed

.markdownlint.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ MD032: true # Lists should be surrounded by blank lines
2929
MD003:
3030
style: "atx" # Use # for headers
3131

32+
# Allow duplicate headings in different sections
33+
MD024:
34+
siblings_only: true # Only flag duplicate headings that are siblings
35+
3236
# Trailing whitespace
3337
MD009: true
3438

docs/topics/services/img/plantuml/rpc/RPC_Component.svg

Lines changed: 1 addition & 1 deletion
Loading

docs/topics/services/img/plantuml/rpc/rpc_detailed_component.puml

Lines changed: 11 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -28,29 +28,7 @@ title RPC Service - Component Diagram (Code-Verified Connections)
2828

2929
Container_Boundary(rpc_service, "RPC Service") {
3030

31-
Component(http_server, "HTTP Server", "Go HTTP", "JSON-RPC over HTTP endpoint")
32-
33-
Component(json_rpc_handler, "JSON-RPC Handler", "Go", "Processes JSON-RPC requests and responses")
34-
35-
Component(command_router, "Command Router", "Go", "Routes RPC commands to appropriate handlers")
36-
37-
Component(blockchain_handlers, "Blockchain Handlers", "Go", "Block and chain operation handlers")
38-
39-
Component(mining_handlers, "Mining Handlers", "Go", "Mining and block template handlers")
40-
41-
Component(peer_handlers, "Peer Handlers", "Go", "Peer management handlers")
42-
43-
Component(utxo_handlers, "UTXO Handlers", "Go", "UTXO query and management handlers")
44-
45-
Component(admin_handlers, "Admin Handlers", "Go", "Administrative operation handlers")
46-
47-
Component(transaction_handlers, "Transaction Handlers", "Go", "Transaction submission handlers")
48-
49-
Component(help_cacher, "Help Cacher", "Go", "Caches RPC command help text")
50-
51-
Component(metrics_collector, "Metrics Collector", "Prometheus", "Collects RPC performance metrics")
52-
53-
Component(health_monitor, "Health Monitor", "Go", "Monitors service and dependency health")
31+
Component(rpc_server, "RPC Server", "Go", "HTTP server with JSON-RPC handler routing commands to handler functions")
5432

5533
Component(blockchain_client, "Blockchain Client", "Go gRPC", "Interface to Blockchain service")
5634

@@ -92,45 +70,25 @@ Person(admin, "Administrator", "Node operator")
9270

9371
' External API interactions
9472

95-
Rel(external_user, http_server, "JSON-RPC requests", "HTTP")
96-
97-
Rel(admin, http_server, "Administrative requests", "HTTP")
98-
99-
' Request processing flow
100-
101-
Rel(http_server, json_rpc_handler, "Parse JSON-RPC")
102-
103-
Rel(json_rpc_handler, command_router, "Route commands")
104-
105-
Rel(command_router, blockchain_handlers, "Blockchain commands")
73+
Rel(external_user, rpc_server, "JSON-RPC requests", "HTTP")
10674

107-
Rel(command_router, mining_handlers, "Mining commands")
75+
Rel(admin, rpc_server, "Administrative requests", "HTTP")
10876

109-
Rel(command_router, peer_handlers, "Peer commands")
77+
' RPC Server to service client interactions
11078

111-
Rel(command_router, utxo_handlers, "UTXO commands")
79+
Rel(rpc_server, blockchain_client, "Blockchain and admin operations")
11280

113-
Rel(command_router, admin_handlers, "Admin commands")
81+
Rel(rpc_server, block_assembly_client, "Mining operations")
11482

115-
Rel(command_router, transaction_handlers, "Transaction commands")
83+
Rel(rpc_server, propagation_client, "Submit transactions")
11684

117-
' Handler to client interactions
85+
Rel(rpc_server, p2p_client, "P2P operations")
11886

119-
Rel(blockchain_handlers, blockchain_client, "Blockchain operations")
87+
Rel(rpc_server, legacy_peer_client, "Legacy peer operations")
12088

121-
Rel(mining_handlers, block_assembly_client, "Mining operations")
89+
Rel(rpc_server, utxo_store_client, "UTXO queries and operations")
12290

123-
Rel(transaction_handlers, propagation_client, "Submit transactions")
124-
125-
Rel(peer_handlers, p2p_client, "P2P operations")
126-
127-
Rel(peer_handlers, legacy_peer_client, "Legacy peer operations")
128-
129-
Rel(utxo_handlers, utxo_store_client, "UTXO queries and operations")
130-
131-
Rel(admin_handlers, blockchain_client, "Administrative operations")
132-
133-
Rel(blockchain_handlers, asset_http_client, "Transaction hex data")
91+
Rel(rpc_server, asset_http_client, "Transaction hex data")
13492

13593
' Service client connections (CODE-VERIFIED)
13694

@@ -148,27 +106,6 @@ Rel(utxo_store_client, utxo_store, "Database queries", "Direct")
148106

149107
Rel(asset_http_client, asset_server, "HTTP requests", "HTTP")
150108

151-
' Support components
152-
153-
Rel(command_router, help_cacher, "Get command help")
154-
155-
Rel(json_rpc_handler, metrics_collector, "Request metrics")
156-
157-
Rel(health_monitor, blockchain_client, "Health checks")
158-
159-
Rel(health_monitor, block_assembly_client, "Health checks")
160-
161-
Rel(health_monitor, p2p_client, "Health checks")
162-
163-
Rel(health_monitor, utxo_store_client, "Health checks")
164-
165-
Rel(health_monitor, propagation_client, "Health checks")
166-
167-
Rel(health_monitor, asset_http_client, "Health checks")
168-
169-
' Administrative access
170-
171-
Rel(admin, http_server, "Administrative operations", "HTTP")
172109

173110
SHOW_LEGEND()
174111

docs/topics/services/img/plantuml/subtreevalidation/Subtree_Validation_Component.svg

Lines changed: 1 addition & 1 deletion
Loading

docs/topics/services/img/plantuml/subtreevalidation/subtree_validation_detailed_component.puml

Lines changed: 32 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -24,33 +24,29 @@ skinparam ArrowColor #666666
2424

2525
!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Component.puml
2626

27-
title Subtree Validation Service - Component Diagram (Code-Verified Connections)
27+
title Subtree Validation Service - Component Diagram
2828

2929
Container_Boundary(subtree_validation, "Subtree Validation Service") {
3030

3131
Component(grpc_server, "gRPC Server", "Go gRPC", "Handles external subtree validation API requests")
3232

33-
Component(kafka_consumer_subtrees, "Subtree Consumer", "Go Kafka", "Consumes subtree notifications from P2P service")
34-
35-
Component(kafka_consumer_txmeta, "TxMeta Consumer", "Go Kafka", "Consumes transaction metadata updates")
33+
Component(subtree_handler, "Subtree Handler", "Go", "Handles subtree validation requests with file-based locking and transaction fetching")
3634

37-
Component(kafka_producer_txmeta, "TxMeta Producer", "Go Kafka", "Publishes validated transaction metadata")
35+
Component(txmeta_handler, "TxMeta Handler", "Go", "Handles transaction metadata cache updates")
3836

39-
Component(subtree_validator, "Subtree Validator", "Go", "Core subtree validation logic")
40-
41-
Component(transaction_fetcher, "Transaction Fetcher", "Go", "Fetches missing transactions from remote sources")
37+
Component(kafka_consumer_subtrees, "Subtree Consumer", "Go Kafka", "Consumes subtree notifications from P2P service")
4238

43-
Component(metadata_processor, "Metadata Processor", "Go", "Processes and caches transaction metadata")
39+
Component(kafka_consumer_txmeta, "TxMeta Consumer", "Go Kafka", "Consumes transaction metadata updates")
4440

45-
Component(quorum_manager, "Quorum Manager", "Go", "Distributed locking for concurrent validation")
41+
Component(kafka_producer_invalid, "Invalid Subtree Producer", "Go Kafka", "Publishes invalid subtree notifications")
4642

47-
Component(http_client, "HTTP Client", "Go HTTP", "HTTP client for asset server communication")
43+
Component(validator_client, "Validator Client", "Go", "Interface to Validator service for transaction validation")
4844

49-
Component(validator_interface, "Validator Interface", "Go", "Local/remote validator integration")
45+
Component(blockchain_client, "Blockchain Client", "Go gRPC", "Interface to Blockchain service")
5046

51-
Component(metrics_collector, "Metrics Collector", "Prometheus", "Collects validation performance metrics")
47+
Component(utxo_store_client, "UTXO Store Client", "Go", "Interface to UTXO store for metadata operations")
5248

53-
Component(health_monitor, "Health Monitor", "Go", "Monitors service and dependency health")
49+
Component(blob_stores, "Blob Store Clients", "Go", "Subtree and transaction blob storage interfaces")
5450

5551
}
5652

@@ -60,9 +56,11 @@ Container(validator, "Validator Service", "Go", "Transaction validation")
6056

6157
Container(blockchain, "Blockchain Service", "Go", "Blockchain state management")
6258

63-
Container(subtree_store, "Subtree Store", "Blob Store", "Validated subtree storage")
59+
ContainerDb(subtree_store, "Subtree Store", "Blob Store", "Validated subtree storage")
60+
61+
ContainerDb(tx_store, "Transaction Store", "Blob Store", "Transaction data storage")
6462

65-
Container(utxo_store, "UTXO Store", "Database", "UTXO and transaction metadata")
63+
ContainerDb(utxo_store, "UTXO Store", "Database", "UTXO and transaction metadata")
6664

6765
ContainerQueue(kafka, "Kafka", "Message Queue", "Message broker")
6866

@@ -86,69 +84,47 @@ Rel(legacy_service, grpc_server, "Validate subtrees during sync", "gRPC")
8684

8785
Rel(rpc_service, grpc_server, "External subtree validation requests", "gRPC")
8886

89-
Rel(grpc_server, subtree_validator, "Process validation requests")
87+
Rel(grpc_server, subtree_handler, "Route validation requests")
9088

91-
' CODE-VERIFIED Kafka message flow from P2P
89+
' Kafka message flow
9290

9391
Rel(p2p_service, kafka, "Publish subtree notifications", "Kafka")
9492

95-
Rel(kafka, kafka_consumer_subtrees, "Subtree notifications from P2P", "Kafka")
93+
Rel(kafka, kafka_consumer_subtrees, "Subtree notifications", "Kafka")
9694

9795
Rel(kafka, kafka_consumer_txmeta, "Metadata updates", "Kafka")
9896

99-
Rel(kafka_producer_txmeta, kafka, "Publish metadata", "Kafka")
97+
Rel(kafka_producer_invalid, kafka, "Publish invalid subtrees", "Kafka")
10098

10199
' Internal processing flow
102100

103-
Rel(kafka_consumer_subtrees, quorum_manager, "Check/acquire locks")
104-
105-
Rel(kafka_consumer_subtrees, subtree_validator, "Validate subtrees")
106-
107-
Rel(subtree_validator, transaction_fetcher, "Fetch missing transactions")
108-
109-
Rel(transaction_fetcher, http_client, "HTTP requests")
110-
111-
Rel(subtree_validator, validator_interface, "Validate transactions")
112-
113-
Rel(subtree_validator, metadata_processor, "Process metadata")
114-
115-
' Metadata handling
116-
117-
Rel(kafka_consumer_txmeta, metadata_processor, "Update metadata")
118-
119-
Rel(metadata_processor, kafka_producer_txmeta, "Publish updates")
120-
121-
' External service interactions
122-
123-
Rel(http_client, asset_servers, "Fetch transactions", "HTTP")
124-
125-
Rel(validator_interface, validator, "Transaction validation", "Interface/gRPC")
101+
Rel(kafka_consumer_subtrees, subtree_handler, "Process subtrees")
126102

127-
Rel(subtree_validator, subtree_store, "Store validated subtrees", "gRPC")
103+
Rel(kafka_consumer_txmeta, txmeta_handler, "Process metadata")
128104

129-
Rel(metadata_processor, utxo_store, "Cache metadata", "gRPC")
105+
Rel(subtree_handler, validator_client, "Validate transactions")
130106

131-
Rel(quorum_manager, subtree_store, "Check existence", "gRPC")
107+
Rel(subtree_handler, blockchain_client, "Get block information")
132108

133-
' State and health monitoring
109+
Rel(subtree_handler, blob_stores, "Read/write subtrees and transactions")
134110

135-
Rel(blockchain, kafka_consumer_subtrees, "Block notifications", "Subscription")
111+
Rel(subtree_handler, asset_servers, "Fetch missing transactions", "HTTP")
136112

137-
Rel(health_monitor, blockchain, "Health checks")
113+
Rel(subtree_handler, kafka_producer_invalid, "Report invalid subtrees")
138114

139-
Rel(health_monitor, validator, "Health checks")
115+
Rel(txmeta_handler, utxo_store_client, "Cache metadata")
140116

141-
Rel(health_monitor, subtree_store, "Health checks")
117+
' External service connections
142118

143-
Rel(health_monitor, utxo_store, "Health checks")
119+
Rel(validator_client, validator, "Transaction validation", "gRPC/Interface")
144120

145-
' Metrics collection
121+
Rel(blockchain_client, blockchain, "Blockchain queries", "gRPC")
146122

147-
Rel(subtree_validator, metrics_collector, "Validation metrics")
123+
Rel(blob_stores, subtree_store, "Subtree operations", "Direct")
148124

149-
Rel(transaction_fetcher, metrics_collector, "Fetch metrics")
125+
Rel(blob_stores, tx_store, "Transaction operations", "Direct")
150126

151-
Rel(metadata_processor, metrics_collector, "Metadata metrics")
127+
Rel(utxo_store_client, utxo_store, "Metadata operations", "Direct")
152128

153129
SHOW_LEGEND()
154130

docs/topics/services/img/plantuml/subtreevalidation/subtree_validation_distributed_pause.puml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,6 @@ activate PodB
6161
PodB -> PodB: Check isPauseActive()
6262
activate PodB
6363

64-
PodB -> PodB: Check local atomic flag (fast path)
65-
note right: Local flag = false
66-
6764
PodB -> Storage: IsPauseActive() (distributed check)
6865
activate Storage
6966
Storage -> PauseLock: Check if lock exists and is fresh

docs/topics/services/img/plantuml/subtreevalidation/subtree_validation_distributed_pause.svg

Lines changed: 1 addition & 1 deletion
Loading

docs/topics/services/img/plantuml/utxo/UTXO_Store_Component.svg

Lines changed: 1 addition & 0 deletions
Loading

0 commit comments

Comments
 (0)