2
2
hip : 1137
3
3
title : Block Node discoverabilty via the network address book
4
4
author : Joseph Sinclair <@jsync-swirlds>
5
- working-group : Joseph Sinclair <@jsync-swirlds>
6
- requested-by : Hedera Consensus Node Operators
5
+ working-group : Joseph Sinclair <@jsync-swirlds>, Jasper Potts <@jasperpotts>, Richard Bair <@rbair>, Nana Essilfie-Conduah <@Nana-EC>,
6
+ requested-by : Mirror Node Operators, Relay Node Operators, SDK developers
7
7
type : Standards Track
8
8
category : Core
9
9
needs-council-approval : Yes
10
10
discussions-to : https://github.com/hashgraph/Hiero-improvement-proposal/discussions/1132
11
11
status : Draft
12
12
created : 2025-03-07
13
- updated : 2025-03-07
13
+ updated : 2025-03-18
14
14
---
15
15
16
16
## Abstract
@@ -31,37 +31,66 @@ fees for providing both core and value-add services to clients. A service
31
31
is of no value, however, if the service provider cannot be found. Offering a
32
32
mechanism to find a Block Node by querying network state ensures a reliable
33
33
and trustworthy source of data that is dynamically managed and updated by the
34
- Block Node operators themselves. Including a mechanism for reputation to be
35
- recorded and managed, we enable the full community of network users to share
36
- assessment of block node reliability and quality.
34
+ Block Node operators themselves. Considering a future mechanism for reputation
35
+ to be recorded and managed, we enable the full community of network users to
36
+ share assessment of block node reliability and quality.
37
37
38
38
## Rationale
39
39
Discoverability of services is critical to a broadly useful network and
40
40
effective development of network applications. The addition of basic service
41
41
discovery functionality supports the current addition of block nodes to the
42
42
network, and lays groundwork for adding additional discovery mechanisms in
43
- future proposals.
43
+ future proposals. While the proximate motivation for this capability is to
44
+ enable discoverability of block nodes, it is also clear that block nodes are
45
+ not the only form of discoverable nodes that could, or should, be published
46
+ on the blockchain.
44
47
45
48
## Definitions
46
49
<dl >
47
50
<dt >Discoverable Node</dt >
48
- <dd >A node that participates in a Hiero Ledger network, is not a
49
- discoverable node, and may be discovered via the node discovery process.</dd >
51
+ <dd >A node that participates in a Hiero Ledger network, but is not a
52
+ consensus node, is a discoverable node, and may be discovered via the node
53
+ discovery process. Discoverable nodes do not require on-chain upgrade
54
+ coordination and are generally managed as fully independent individual
55
+ entities. Each type of discoverable node has its own mechanism for discovering
56
+ and using resources specific to that type of node. The address book only
57
+ provides the type of node and one or more service endpoints.</dd >
50
58
</dl >
51
59
52
60
## User stories
61
+ 1 . As a RPC Relay client, I wish to find an RPC relay using on-chain data.
62
+ 1 . As a Block Node, I need to connect to other block nodes found by inspecting
63
+ block stream data.
64
+ 1 . As a Mirror Node, I want to present discoverable nodes to clients using
65
+ on-chain data.
66
+ 1 . As a Hiero community member, I want to operate a discoverable node and
67
+ publish the type and endpoints on-chain so that others can find my service.
68
+ 1 . As the operator of a private Hiero ledger, I want to mange the discoverable
69
+ nodes relevant to my ledger using on-chain data.
70
+ 1 . As a discoverable node operator, I want to publish and manage my discoverable
71
+ node on a Hiero ledger so that clients can reliably find and connect to my
72
+ service.
53
73
54
74
## Specification
55
75
This HIP proposes the introduction of additional NodeService APIs that enable a
56
76
discoverable node operator to create, delete, and update discoverable nodes.
57
77
78
+ Several messages refer to a "Node ID". This is a single entity number that
79
+ is assigned on node creation by the network, and is unique within a particular
80
+ shard and realm. Discoverable nodes are specific to a shard and realm, although
81
+ nothing technically prevents a single system from being registered as a node in
82
+ multiple shards or multiple realms. The consensus network may assign any value
83
+ to a new node, except that a given Node ID must never be reused within a given
84
+ shard or realm. The Node ID values for Discoverable Nodes must not match the
85
+ Node ID value for any consensus node in the same network.
86
+
58
87
``` protobuf
59
88
service AddressBookService {
60
89
61
90
[...]
62
91
63
92
/**
64
- * A transaction to create a new discoverable node in the network.
93
+ * A transaction to create a new discoverable node in the network
65
94
* address book.
66
95
* <p>
67
96
* This transaction, once complete, SHALL add a new discoverable node to the
@@ -100,19 +129,18 @@ A new Hiero API element will be added, named DiscoverableServiceEndpoint.
100
129
* more endpoints which enable the nodes to communicate both with other
101
130
* nodes and with clients to receive requests.
102
131
*
103
- * This message supports IP (V4 or V6) with address and TCP port ,
104
- * and MAY include a FQDN instead of an IP address.<br/>
132
+ * This message supports a TCP port and IP address (V4 or V6) ,
133
+ * or MAY include a FQDN _instead of_ an IP address.<br/>
105
134
*/
106
135
message DiscoverableServiceEndpoint {
107
136
oneof address {
108
137
/**
109
138
* A 32-bit IPv4 address or 128-bit IPv6 address.<br/>
110
139
* This is the address of the endpoint, encoded in pure "big-endian"
111
140
* (i.e. left to right) order (e.g. `127.0.0.1` has hex bytes in the
112
- * order `7F`, `00`, `00`, `01` and ::1 is `00`, `00`, `00`, `00`,
141
+ * order `7F`, `00`, `00`, `01` and ` ::1` is `00`, `00`, `00`, `00`,
113
142
* `00`, `00`, `00`, `00`, `00`, `00`, `00`, `00`, `00`, `00`,
114
- * `00`, `01`).<br/>
115
- * IPv6 MAY NOT be accessible to all clients.
143
+ * `00`, `01`).
116
144
*/
117
145
bytes ip_address = 1;
118
146
@@ -134,7 +162,6 @@ message DiscoverableServiceEndpoint {
134
162
*/
135
163
uint32 tcp_port = 3;
136
164
}
137
-
138
165
```
139
166
140
167
A new Hiero API will be added called DiscoverableNodeCreate, which falls under
@@ -149,13 +176,17 @@ message DiscoverableNodeCreateTransactionBody {
149
176
* This key MUST sign this transaction.<br/>
150
177
* This key MUST sign each transaction to update this node.<br/>
151
178
* This field MUST contain a valid `Key` value.<br/>
152
- * This field is REQUIRED and MUST NOT be set to an empty `KeyList`.
179
+ * This field is REQUIRED and MUST NOT be set to an empty `KeyList`.<br/>
180
+ * It is RECOMMENDED that this key be composed of one or more unique public
181
+ * keys that are not associated with any network account.<br/>
182
+ * This key MAY be a complex key containing `KeyList` or `ThresholdKey`
183
+ * elements, but SHOULD NOT be a contract ID key.
153
184
*/
154
185
proto.Key admin_key = 1;
155
186
156
187
/**
157
188
* A node type.<br/>
158
- * This declares the type of discoverable node. Examples might include
189
+ * This declares the type of discoverable node. Examples might include
159
190
* a block node, an rpc relay, or a mirror node.
160
191
* <p>
161
192
* This field is REQUIRED.
@@ -190,7 +221,7 @@ message DiscoverableNodeCreateTransactionBody {
190
221
*/
191
222
enum DiscoverableNodeType {
192
223
/**
193
- * This value MUST NOT be used.
224
+ * This value indicates unset or missing data and MUST NOT be used.
194
225
*/
195
226
UNKNOWN = 0;
196
227
@@ -202,42 +233,60 @@ enum DiscoverableNodeType {
202
233
BLOCK_NODE = 1;
203
234
204
235
/**
205
- * An RPC Relay node.<br/>
206
- * An RPC Relay Node is a proxy and translator between EVM tooling and a
236
+ * A Hiero Mirror Node.<br/>
237
+ * A Mirror Node is an advanced indexing and query service that provides
238
+ * fast and flexible access to query the block chain and transaction
239
+ * history. A Mirror Node typically stores all recent blockchain data, and
240
+ * some store the entire history of the network.
241
+ */
242
+ MIRROR_NODE = 2;
243
+
244
+ /**
245
+ * A RPC Relay node.<br/>
246
+ * A RPC Relay Node is a proxy and translator between EVM tooling and a
207
247
* Hiero consensus network.
208
248
*/
209
- RPC_RELAY = 2 ;
249
+ RPC_RELAY = 3 ;
210
250
}
211
-
212
251
```
213
252
214
253
A new Hiero API called DiscoverableNodeDelete will be added under the Node
215
254
Service. This API function is used by the node operator to delete a node.
216
255
217
256
``` protobuf
218
- message NodeDeleteTransactionBody {
257
+ message DiscoverableNodeDeleteTransactionBody {
219
258
/**
220
259
* A discoverable node identifier in the network state.
221
260
* <p>
222
261
* The node identified MUST exist in the discoverable address book.<br/>
223
262
* The node identified MUST NOT be deleted.<br/>
224
263
* This value is REQUIRED.
264
+ * <p>
265
+ * A given value for `node_id` SHALL be unique within a given
266
+ * shard or realm.<br/>
267
+ * A given value for `node_id` SHALL NOT be reused, even if the
268
+ * corresponding entry is deleted.
225
269
*/
226
270
uint64 node_id = 1;
227
271
}
228
272
```
229
273
230
- A new Hiero API called NodeUpdate will be added under the Node Service.
231
- This function is used by the node operator to update a node.
274
+ A new Hiero API called DiscoverableNodeUpdate will be added under the Node
275
+ Service. This function is used by the node operator to update a node.
232
276
233
277
``` protobuf
234
- message NodeUpdateTransactionBody {
278
+ message DiscoverableNodeUpdateTransactionBody {
235
279
/**
236
280
* A discoverable node identifier in the network state.
237
281
* <p>
238
282
* The node identified MUST exist in the discoverable address book.<br/>
239
283
* The node identified MUST NOT be deleted.<br/>
240
284
* This value is REQUIRED.
285
+ * <p>
286
+ * A given value for `node_id` SHALL be unique within a given
287
+ * shard or realm.<br/>
288
+ * A given value for `node_id` SHALL NOT be reused, even if the
289
+ * corresponding entry is deleted.
241
290
*/
242
291
uint64 node_id = 1;
243
292
@@ -249,7 +298,11 @@ message NodeUpdateTransactionBody {
249
298
* If set, this key MUST sign each subsequent transaction to
250
299
* update this node.<br/>
251
300
* If set, this field MUST contain a valid `Key` value.<br/>
252
- * If set, this field MUST NOT be set to an empty `KeyList`.
301
+ * If set, this field MUST NOT be set to an empty `KeyList`.<br/>
302
+ * It is RECOMMENDED that this key be composed of one or more unique public
303
+ * keys that are not associated with any network account.<br/>
304
+ * This key MAY be a complex key containing `KeyList` or `ThresholdKey`
305
+ * elements, but SHOULD NOT be a contract ID key.
253
306
*/
254
307
proto.Key admin_key = 2;
255
308
@@ -278,6 +331,57 @@ message NodeUpdateTransactionBody {
278
331
}
279
332
```
280
333
334
+ The Hiero consensus network will store discoverable node information in state
335
+ with the following message structure.
336
+
337
+ ``` protobuf
338
+ message DiscoverableAddressBookNode {
339
+ /**
340
+ * A discoverable node identifier.
341
+ * <p>
342
+ * This value SHALL be set.<br/>
343
+ * This value SHALL be unique within a given network.<br/>
344
+ * This value SHALL NOT match any consensus node ID in the same network.
345
+ * <p>
346
+ * A given value for `node_id` MUST be unique within a given
347
+ * shard or realm.<br/>
348
+ * A given value for `node_id` MUST NOT be reused, even if the
349
+ * corresponding entry is later deleted.
350
+ */
351
+ uint64 node_id = 1;
352
+
353
+ /**
354
+ * An administrative key controlled by the node operator.
355
+ * <p>
356
+ * This key MUST sign each transaction to update this node.<br/>
357
+ * This field SHALL contain a valid `Key` value.<br/>
358
+ * This field SHALL NOT be set to an empty `KeyList`.<br/>
359
+ * It is RECOMMENDED that this key be composed of one or more unique public
360
+ * keys that are not associated with any network account.<br/>
361
+ * This key MAY be a complex key containing `KeyList` or `ThresholdKey`
362
+ * elements, but SHOULD NOT be a contract ID key.
363
+ */
364
+ proto.Key admin_key = 2;
365
+
366
+ /**
367
+ * A short description of the node.
368
+ * <p>
369
+ * This value SHALL NOT exceed 100 bytes when encoded as UTF-8.
370
+ */
371
+ string description = 3;
372
+
373
+ /**
374
+ * A list of service endpoints for client calls.
375
+ * <p>
376
+ * These endpoints SHALL represent the published endpoints to which
377
+ * clients may submit requests.<br/>
378
+ * This list SHALL NOT be empty.<br/>
379
+ * This list SHALL NOT contain more than `10` entries.
380
+ */
381
+ repeated DiscoverableServiceEndpoint service_endpoint = 4;
382
+ }
383
+ ```
384
+
281
385
The following are some changes to the existing API.
282
386
283
387
Added three HieroFunctionalities:
@@ -312,12 +416,14 @@ message TransactionReceipt {
312
416
[...]
313
417
314
418
/**
315
- * The identifier of a newly created Node or DiscoverableNode.
316
- * <p>
317
- * This value SHALL be set following a `createNode` transaction.<br/>
318
- * This value SHALL be set following a `createDiscoverableNode`
319
- * transaction.<br/>
320
- * This value SHALL NOT be set following any other transaction.
419
+ * The identifier of a newly created Node or DiscoverableNode.
420
+ * <p>
421
+ * This value SHALL be set following a `createNode` transaction.<br/>
422
+ * This value SHALL be set following a `createDiscoverableNode`
423
+ * transaction.<br/>
424
+ * This value SHALL NOT be set following any other transaction.<br/>
425
+ * This value SHALL be unique within a given network.<br/>
426
+ * This value SHALL NOT match any consensus node ID in the same network.
321
427
*/
322
428
uint64 node_id = 15;
323
429
@@ -327,22 +433,48 @@ message TransactionReceipt {
327
433
### Mirror node update
328
434
The mirror node will process the new Discoverable Node transactions and
329
435
discoverable_service_endpoint information, then return that information through
330
- extensions to its existing APIs.
436
+ extensions to its existing APIs or new APIs, as needed.
437
+ One _ possible_ extension would be to add a ` /api/v1/network/discoverableNodes `
438
+ resource which accepts a ` nodeType ` query parameter and returns a list of nodes
439
+ with that type, or a list of all discoverable nodes if the parameter is not
440
+ supplied.
441
+
442
+ ### SDK Considerations
443
+ Each SDK will need to implement the following _ new_ transactions.
444
+ - ` createDiscoverableNode `
445
+ - ` updateDiscoverableNode `
446
+ - ` deleteDiscoverableNode `
447
+ There is no change to existing transactions. The create transaction sets the
448
+ same ` node_id ` field in the transaction receipt used by the existing
449
+ non-discoverable nodeCreate transaction.
331
450
332
451
## Backwards Compatibility
333
452
All changes for this HIP are net-new functionality. There is no predicted
334
453
impact or change for existing functionality.
335
454
336
455
## Security Implications
337
- TBD
456
+ The signatory for all discoverable node transactions (create, update, delete)
457
+ is the assigned ` admin_key ` value for that node. This maintains management of
458
+ each discoverable node firmly with the creator/operator. Discoverable nodes do
459
+ not participate in any form of consensus network rewards, so no account
460
+ identifier is required for a discoverable node. It is RECOMMENDED that the
461
+ ` admin_key ` be composed of one or more unique public keys that are not
462
+ associated with any network account.
463
+
464
+ The network throttles will need to be updated to place appropriate limits on
465
+ the number of discoverable node transactions. Such transactions should not be
466
+ frequent, and relevant throttles should have corresponding limits.
467
+
468
+ We do not expect to place any restriction on who can create a discoverable node,
469
+ and the only limitation to who can update or delete a discoverable node is that
470
+ the transaction must be signed by the ` admin_key ` for that node.
338
471
339
472
## How to Teach This
340
473
TBD
341
474
342
475
## Reference Implementation
343
476
344
477
## Rejected Ideas
345
-
346
478
1 . Use of the existing consensus node address book and transactions was
347
479
considered.
348
480
* This was rejected for three reasons.
@@ -355,10 +487,14 @@ TBD
355
487
requirements.
356
488
357
489
## Open Issues
358
-
359
490
1 . We intend to store a uint64 "reputation" value for each discoverable node,
360
491
but have not determined an appropriate and workable mechanism for allowing
361
492
network entities to "vote" on that reputation.
493
+ * One concept discussed is to use something similar to a
494
+ "proof of space-time" and a "proof of streaming" for block nodes
495
+ (as one example) as an automated "reputation" modifier. How this would
496
+ be integrated with community sentiment remains an open question.
497
+ * This concept should be the subject of a future HIP.
362
498
363
499
## References
364
500
0 commit comments