@@ -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
2929Container_Boundary (subtree_validation , "Subtree Validation Service" ) {
3030
3131Component (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
6157Container (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
6765ContainerQueue (kafka , "Kafka" , "Message Queue" , "Message broker" )
6866
@@ -86,69 +84,47 @@ Rel(legacy_service, grpc_server, "Validate subtrees during sync", "gRPC")
8684
8785Rel (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
9391Rel (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
9795Rel (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
153129SHOW_LEGEND ()
154130
0 commit comments