Skip to content

Commit e109dc8

Browse files
committed
Updates following review
* Added missing "discoverable" for node update transaction message name. * Added missing detail in the "Discoverable Node" definition. * Clarified that account ID is not relevant to discoverable nodes. * Added a specification for the value in state used to store the discoverable node information. * Added detail for admin key usage, network throttles, and related information to the security implications section. * Added an SDK Considerations section. * Added Mirror Node as a node type. * Cleaned up some specification wording. * Added some detail to the "reputation" open issue. * Added some initial use cases, community ideas and revision are encouraged. Signed-off-by: Joseph Sinclair <121976561+jsync-swirlds@users.noreply.github.com>
1 parent bc886b2 commit e109dc8

File tree

1 file changed

+174
-38
lines changed

1 file changed

+174
-38
lines changed

HIP/hip-1137.md

Lines changed: 174 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
hip: 1137
33
title: Block Node discoverabilty via the network address book
44
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
77
type: Standards Track
88
category: Core
99
needs-council-approval: Yes
1010
discussions-to: https://github.com/hashgraph/Hiero-improvement-proposal/discussions/1132
1111
status: Draft
1212
created: 2025-03-07
13-
updated: 2025-03-07
13+
updated: 2025-04-09
1414
---
1515

1616
## Abstract
@@ -31,37 +31,66 @@ fees for providing both core and value-add services to clients. A service
3131
is of no value, however, if the service provider cannot be found. Offering a
3232
mechanism to find a Block Node by querying network state ensures a reliable
3333
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.
3737

3838
## Rationale
3939
Discoverability of services is critical to a broadly useful network and
4040
effective development of network applications. The addition of basic service
4141
discovery functionality supports the current addition of block nodes to the
4242
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.
4447

4548
## Definitions
4649
<dl>
4750
<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>
5058
</dl>
5159

5260
## 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.
5373

5474
## Specification
5575
This HIP proposes the introduction of additional NodeService APIs that enable a
5676
discoverable node operator to create, delete, and update discoverable nodes.
5777

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+
5887
```protobuf
5988
service AddressBookService {
6089
6190
[...]
6291
6392
/**
64-
* A transaction to create a new discoverable node in the network.
93+
* A transaction to create a new discoverable node in the network
6594
* address book.
6695
* <p>
6796
* 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.
100129
* more endpoints which enable the nodes to communicate both with other
101130
* nodes and with clients to receive requests.
102131
*
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/>
105134
*/
106135
message DiscoverableServiceEndpoint {
107136
oneof address {
108137
/**
109138
* A 32-bit IPv4 address or 128-bit IPv6 address.<br/>
110139
* This is the address of the endpoint, encoded in pure "big-endian"
111140
* (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`,
113142
* `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`).
116144
*/
117145
bytes ip_address = 1;
118146
@@ -134,7 +162,6 @@ message DiscoverableServiceEndpoint {
134162
*/
135163
uint32 tcp_port = 3;
136164
}
137-
138165
```
139166

140167
A new Hiero API will be added called DiscoverableNodeCreate, which falls under
@@ -149,13 +176,17 @@ message DiscoverableNodeCreateTransactionBody {
149176
* This key MUST sign this transaction.<br/>
150177
* This key MUST sign each transaction to update this node.<br/>
151178
* 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.
153184
*/
154185
proto.Key admin_key = 1;
155186
156187
/**
157188
* 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
159190
* a block node, an rpc relay, or a mirror node.
160191
* <p>
161192
* This field is REQUIRED.
@@ -190,7 +221,7 @@ message DiscoverableNodeCreateTransactionBody {
190221
*/
191222
enum DiscoverableNodeType {
192223
/**
193-
* This value MUST NOT be used.
224+
* This value indicates unset or missing data and MUST NOT be used.
194225
*/
195226
UNKNOWN = 0;
196227
@@ -202,42 +233,60 @@ enum DiscoverableNodeType {
202233
BLOCK_NODE = 1;
203234
204235
/**
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
207247
* Hiero consensus network.
208248
*/
209-
RPC_RELAY = 2;
249+
RPC_RELAY = 3;
210250
}
211-
212251
```
213252

214253
A new Hiero API called DiscoverableNodeDelete will be added under the Node
215254
Service. This API function is used by the node operator to delete a node.
216255

217256
```protobuf
218-
message NodeDeleteTransactionBody {
257+
message DiscoverableNodeDeleteTransactionBody {
219258
/**
220259
* A discoverable node identifier in the network state.
221260
* <p>
222261
* The node identified MUST exist in the discoverable address book.<br/>
223262
* The node identified MUST NOT be deleted.<br/>
224263
* 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.
225269
*/
226270
uint64 node_id = 1;
227271
}
228272
```
229273

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.
232276

233277
```protobuf
234-
message NodeUpdateTransactionBody {
278+
message DiscoverableNodeUpdateTransactionBody {
235279
/**
236280
* A discoverable node identifier in the network state.
237281
* <p>
238282
* The node identified MUST exist in the discoverable address book.<br/>
239283
* The node identified MUST NOT be deleted.<br/>
240284
* 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.
241290
*/
242291
uint64 node_id = 1;
243292
@@ -249,7 +298,11 @@ message NodeUpdateTransactionBody {
249298
* If set, this key MUST sign each subsequent transaction to
250299
* update this node.<br/>
251300
* 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.
253306
*/
254307
proto.Key admin_key = 2;
255308
@@ -278,6 +331,57 @@ message NodeUpdateTransactionBody {
278331
}
279332
```
280333

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+
281385
The following are some changes to the existing API.
282386

283387
Added three HieroFunctionalities:
@@ -312,12 +416,14 @@ message TransactionReceipt {
312416
[...]
313417
314418
/**
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.
321427
*/
322428
uint64 node_id = 15;
323429
@@ -327,22 +433,48 @@ message TransactionReceipt {
327433
### Mirror node update
328434
The mirror node will process the new Discoverable Node transactions and
329435
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.
331450

332451
## Backwards Compatibility
333452
All changes for this HIP are net-new functionality. There is no predicted
334453
impact or change for existing functionality.
335454

336455
## 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.
338471

339472
## How to Teach This
340473
TBD
341474

342475
## Reference Implementation
343476

344477
## Rejected Ideas
345-
346478
1. Use of the existing consensus node address book and transactions was
347479
considered.
348480
* This was rejected for three reasons.
@@ -355,10 +487,14 @@ TBD
355487
requirements.
356488

357489
## Open Issues
358-
359490
1. We intend to store a uint64 "reputation" value for each discoverable node,
360491
but have not determined an appropriate and workable mechanism for allowing
361492
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.
362498

363499
## References
364500

0 commit comments

Comments
 (0)