Skip to content

Commit b1c00a7

Browse files
Nana-ECjsync-swirlds
authored andcommitted
Cleaned up and added protobuf assets
Signed-off-by: Nana Essilfie-Conduah <nana@swirldslabs.com>
1 parent ffc39c7 commit b1c00a7

File tree

2 files changed

+1013
-23
lines changed

2 files changed

+1013
-23
lines changed

HIP/hip-1081.md

Lines changed: 70 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
---
22
hip: 1081
33
title: Block Node
4-
author: Nana Essilfie-Conduah <@Nana-EC>, Jasper Potts <@jasperpotts>, Richard Bair <@rbair>,
4+
author: Jasper Potts <@jasperpotts>, Richard Bair <@rbair>, Nana Essilfie-Conduah <@Nana-EC>,
55
Joseph Sinclair<@jsync-swirlds>
6-
working-group: Richard Bair <@rbair>, Anurag Saksena, Mark Blackman <mark@swirldslabs.com>,
7-
Matt Peterson <@mattp-swirldslabs>, Alfredo Gutierrez <@AlfredoG87>, Georgi Lazarov <@georgi-l95>,
8-
Nick Poorman <@nickpoorman>
6+
working-group: Jasper Potts <@jasperpotts>, Richard Bair <@rbair>, Nana Essilfie-Conduah <@Nana-EC>,
7+
Anurag Saksena <@a-saksena>, Mark Blackman <mark@swirldslabs.com>, Matt Peterson <@mattp-swirldslabs>,
8+
Alfredo Gutierrez <@AlfredoG87>, Georgi Lazarov <@georgi-l95>, Nick Poorman <@nickpoorman>
99
requested-by: Hedera Consensus Node Operators, Cosmic Wire, Limechain
1010
type: Standards Track
11-
category: Service, Mirror, Block Node
11+
category: Service, Mirror, Block
1212
needs-council-approval: Yes
1313
status: Draft
1414
created: 2024-05-15
@@ -32,6 +32,11 @@ Block Nodes will have a rich API, allowing consumers to receive a subset of the
3232
can innovate on payment -- they can be commercial and have connectivity rules / rate limits / SLAs for customers.
3333
They can require payment for serving blocks, or they can serve blocks for free.
3434

35+
Block nodes will supersede the cloud storage buckets utilized today. Besides taking over storage duties, block nodes
36+
will also offer reconnection services to consensus nodes and provide cryptographic proofs to both users and mirror
37+
nodes, enhancing the system's security and decentralization.
38+
Mirror nodes will be updated to be able to retrieve block streams directly from block nodes.
39+
3540
## Motivation
3641

3742
In the current network architecture the consensus node outputs data representing snippets of consensus and transaction
@@ -62,6 +67,8 @@ As such consumers will utilzie gRPC clients to communicate.
6267
This matches the communication protocol with the CN but differs from other web3 nodes which often utilize JSON RPC APIs over HTTP.
6368
In the future it may be valuable to explore and add additonal protocol such as WS and HTTP (REST API, graphQL) based on community needs.
6469

70+
71+
6572
<aside>
6673
🚨 **Open Task:** Flesh out design decisions approach
6774
</aside>
@@ -71,6 +78,20 @@ In the future it may be valuable to explore and add additonal protocol such as W
7178
Highlight CN(s) -> BN -> MN + block stream clients
7279
</aside>
7380

81+
82+
### Upgradeability
83+
84+
It is a goal of a block node to be easy to run by users across differenat, languages, platform and cloud hosting
85+
resources. Today the netowrk requires that consensus nodes all run the same software to esnure integrity and optimal
86+
management of the network. Block nodes should not require this strict rule and instead should offer the ability to
87+
upgrade disconnected to the network consensus node version.
88+
89+
Retrictions may exist when it comes to block stream protobuf versions, however, the block node will be forward
90+
compatible ensuring that new information added to the block stream can still be parsed, verified, stored and served up
91+
even if the block node does not yet have full undertsanding of the byte contents.
92+
93+
The block node will support semantic version values and will make it's current version available via API requests.
94+
7495
## User stories
7596

7697
### Personas
@@ -148,9 +169,14 @@ in the [hedera-protobuf repository](https://github.com/hashgraph/hedera-protobuf
148169

149170
### Services
150171
To achieve the above the block node will offer multiple pluggable modular services which can be enabled by node operators.
172+
Note: protobuf summaries are noted in this HIP doc. The full protobuf specification can be found under
173+
[block node protobuf](./../assets/hip-1081/protobuf)
151174

152175
#### Block Node Service
153-
The block node service will provide ancillary services to inform users of node readiness and configuration
176+
The block node service will provide ancillary services to inform users of node readiness and configuration.
177+
178+
The `serverStatus` endpoint will provide consumers with details around block ranges, node version and if historical
179+
snapshots are supported.
154180

155181
```protobuf
156182
/**
@@ -174,10 +200,12 @@ There will be 2 types of stream services offered
174200
- Unverified block stream for low latency
175201
- Verified block stream for high confidence
176202

177-
Depending on a user of tools needs they can optimize for requesting Block Items as fast as possible for their own
203+
Depending on a user, consuming clients can optimize for requesting Block Items as fast as possible for their own
178204
optional verification or rely on confirmed blocks as confirmed by a Block Node following the Block Proof algorithm.
179205

180206
Both streams may also offer filtering capabilities based on user requests and Block Node functionality support.
207+
Filtering support is expanded upon in the Block Stream HIP 1056 and is charectorized buy the replacement of block items
208+
with hash values whiles maintian the ability to carry out block and state proofs on the block information.
181209

182210
Initially filtering will be at the Block Item level (e.g. a Mirror Node may want only Transaction input and outputs)
183211
but in the future block nodes could stream blockItems out based on the matching of state or transaction matches.
@@ -206,6 +234,7 @@ This approach can be used to increase the reliability and availability of networ
206234

207235
As the block stream is ongoing and items are sent out in real time, it is valuable to be able to request a historical
208236
block in its entirety.
237+
The `singleBlock` endpoint will allow a consumer to request a single verified block from the block node.
209238

210239
```protobuf
211240
/**
@@ -237,16 +266,23 @@ service StateService {
237266
```
238267

239268
<aside>
240-
🚨 **Open Task:** Flesh out 4 different state related query endpoints
241-
1. Live state querying i.e. what is the latest state
242-
2. Historical state snapshot e.g. what was state at block number x
243-
3. State changes e.g. what state changes occured in block x, this is a subset of the block query and avoid the transmission of extra block information beyond state
244-
4. Single entity state query e.g. return account 0.0.x
245-
269+
🚨 **Open Task:** Flesh out 3 different state related query endpoints
270+
1. State snapshot - covering latest state and hsitorical state. All cases represent verified state at the end of a block.
271+
2. State changes e.g. what state changes occured in block x, this is a subset of the block query and avoid the transmission of extra block information beyond state
272+
- Add new endpoint to proto
273+
3. Single entity state query e.g. return account 0.0.x
274+
- Add new endpoint to proto
246275
</aside>
247276

248277
#### Reconnect Service
249-
Support CN connecting to BN to be taught about latest stake instead of another CN
278+
279+
Today the network consensus node act as teachers to each other when a new node comes onlien and needs to ge the latest
280+
hashgraph information and state. To ensure future sclaability it's improtant to relive the consensus node of any
281+
unnecessary functionality that expens time and network resources that should be focused on transactions execution and
282+
hashgraph state management.
283+
284+
As such the block node will replace the teaching role of a consensus node today and serve as a reliable teacher to any
285+
consensus node or block node coming online and looking for latest network details.
250286

251287
<aside>
252288
🚨 **Open Task:** Expand
@@ -256,6 +292,11 @@ Support CN connecting to BN to be taught about latest stake instead of another C
256292
</aside>
257293

258294
#### Proof Service
295+
296+
Consensus nodes provided proof of state APIs has long been desired, however, this would put additional work on the
297+
consensus node that could be better provied elsewhere. By maintaining live state and streaming block stream information
298+
a block node can finally fill this gap and provide users with proofs including that of state.
299+
259300
<aside>
260301
🚨 **Open Task:** Flesh out repsonse components
261302
Noting the 3 different proof types
@@ -265,16 +306,23 @@ Noting the 3 different proof types
265306
</aside>
266307

267308
### Discovery
309+
310+
To ensure a robust decentralized network it is improtant for block nodes to be easily discovered by clients.
311+
268312
<aside>
269-
🚨 **Open Task:** Explain how block nodes are discovered
313+
🚨 **Open Task:** Explain how block nodes provide discovery details.
314+
Cosniderations
315+
- Are they self reported?
316+
- Are they onchain?
317+
- What requirements if any are there for a block node and operator?
318+
</aside>
270319

320+
<aside>
321+
🚨 **Open Task:** Explain how block nodes are discovered
271322
- by a client so they can query data
272323
- by a CN so they can push data e.g. by address book
273-
274324
</aside>
275325

276-
### Upgradeability
277-
278326

279327
### Monetization
280328

@@ -371,11 +419,10 @@ a Block.
371419

372420
## Open Issues
373421

374-
1. Q: “As a block node operator I should be able to attach custom plugins to the block node, which can utilize its
375-
functionality.” was previously listed as a user story. Is this an intent to be highlighted?
376-
1. [Ans]
377-
2. Q: Do we want to highlight anonymous node runners?
378-
3. Q: Does the block node require or rely on a transmission of full state from a CN? If so what’s the contract between
422+
- [ ] Q: “As a block node operator I should be able to attach custom plugins to the block node, which can utilize its
423+
functionality.” How should this intent be highlighted in specification. Are the detail more implementation and future
424+
expansions that should be captured in separate HIPs and product EPICs?
425+
- [ ] Q: Does the block node require or rely on a transmission of full state from a CN? If so what’s the contract between
379426
nodes here? Previously the CN output state every 15 mins
380427

381428
## References

0 commit comments

Comments
 (0)