Skip to content

Block Node #1081

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 31 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
897dc40
Add initial block node HIP draft doc
Nana-EC Nov 17, 2024
518313b
Expanded on rational and spec section tasks. Next up missing protos a…
Nana-EC Nov 17, 2024
ffc39c7
Assigning HIP 1081 and renaming file to hip-1081.md
actions-user Nov 17, 2024
b1c00a7
Cleaned up and added protobuf assets
Nana-EC Nov 18, 2024
4ec87c0
Fix spelling errors
Nana-EC Dec 3, 2024
3b48ce1
Add communication protocol descriptions
Nana-EC Dec 3, 2024
90baa7a
Cleaned up and expanded based on comments, thanks jsync-swirlds
Nana-EC Dec 11, 2024
bb028b3
Add API response codes
Nana-EC Dec 11, 2024
b8f0062
feat: Add messages for skip and resend block to block service
jsync-swirlds Feb 22, 2025
cc62608
Merge branch 'main' into block-node
mgarbs Mar 18, 2025
819da7b
Update Hedera reference and cleaned up a bit
Nana-EC Apr 14, 2025
f2b3a35
Cleaned up some user stories
Nana-EC Apr 15, 2025
c9f1682
Cleaned up layout, added layout image and updated proto
Nana-EC May 8, 2025
12c7ef1
Revised wordings and tries to fix tone for items above Specification …
Nana-EC May 8, 2025
8ecf437
Convert png to svg
Nana-EC May 8, 2025
2fe1957
Further improve wording of section above spec and update proto with l…
Nana-EC May 15, 2025
0afa246
Fix working group YAML rendering
Nana-EC May 15, 2025
d3df7a3
Addressed items from jsync-swirlds
Nana-EC May 21, 2025
60666d5
Added refinements of defintions suggested by mark@swirldslabs.com
Nana-EC May 21, 2025
0125c32
Significant restructuring of Specification section to make it easier…
Nana-EC May 23, 2025
86e9d17
Update to latest proto
Nana-EC May 23, 2025
72b1c9d
Added improvements around Abstract and Motivation based on suggestion…
Nana-EC May 24, 2025
8c25e70
Set last call
Nana-EC May 28, 2025
2cf4692
Cleaned up some code and addressed some of jsync-swirlds comments
Nana-EC May 29, 2025
f6ccfc4
Made a few improvements based on atul-hedera feedback
Nana-EC May 29, 2025
2aaab26
another pass and address feedback form jsync and-swirlds atul-hedera
Nana-EC May 30, 2025
1708f00
Added some more user stories based on suggestion fromatul-hedera
Nana-EC May 30, 2025
28fa6ec
Further touch ups based on questions from atul-hedera
Nana-EC May 31, 2025
e951f34
Reorganized for easier reading flow
Nana-EC May 31, 2025
125e67f
Cleaned up grammar a bit more
Nana-EC May 31, 2025
b915c57
Updates to HIP-1081
jsync-swirlds Jun 2, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
838 changes: 838 additions & 0 deletions HIP/hip-1081.md

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
128 changes: 128 additions & 0 deletions assets/hip-1081/protobuf/block_access_service.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
// SPDX-License-Identifier: Apache-2.0
syntax = "proto3";

package org.hiero.block.api;

option java_package = "org.hiero.block.api.protoc";
// <<<pbj.java_package = "org.hiero.block.api">>> This comment is special code for setting PBJ Compiler java package
option java_multiple_files = true;

import "block/stream/block.proto";

/**
* A request to read a single block.
*
* A client system SHALL send this message to request a single block,
* including the block state proof.
*/
message BlockRequest {
oneof block_specifier {
/**
* The block number of a block to retrieve.
* <p>
* The requested block MUST exist on the block node.<br/>
* A request MAY specify `uint64_max` to signal that the last possible
* block should be returned (which is subtly different from setting
* `retrieve_latest` instead of setting a `block_number`, though the
* result will always be the same, in most implementations).
*/
uint64 block_number = 1;

/**
* A flag to request the latest available block.
* <p>
* This value SHOULD be set `true`, instead of setting `block_number`
* if the intent is to request the latest block available.
*/
bool retrieve_latest = 2;
}
}

/**
* A response to a `singleBlock` request.
*
* This message SHALL be sent in response to a request, and SHALL contain at
* least a valid `status`.<br/>
* If `status` is `READ_BLOCK_SUCCESS`, the response SHALL contain the
* requested block in the `block` field.
*
* > Note
* >> A block can become quite large. A client MUST be prepared to receive the
* >> full content of the block, perhaps many megabytes of data.
*/
message BlockResponse {
/**
* An enumeration indicating the status of this request.
*/
enum Code {
/**
* An "unset value" flag, this value SHALL NOT be used.<br/>
* This status indicates the server software failed to set a status,
* and SHALL be considered a software defect.
*/
UNKNOWN = 0;

/**
* The request succeeded.<br/>
* The requested block SHALL be returned in the `block` field.
*/
SUCCESS = 1;

/**
* The request cannot be fulfilled.<br/>
* The client sent a malformed or structurally incorrect request.
* <p>
* The client MAY retry the request after correcting the form and
* structure.
*/
INVALID_REQUEST = 2;

/**
* The requested block was not found.<br/>
* Something failed and a block that SHOULD be available was
* not found.<br/>
* The client MAY retry the request; if this result is repeated the
* request SHOULD be directed to a different block node server.
*/
NOT_FOUND = 3;

/**
* The requested block is not available on this block node server.<br/>
* The client SHOULD send a `serverStatus` request to determine the
* lowest and highest block numbers available at this block node server.
*/
NOT_AVAILABLE = 4;
}

/**
* A response status.
* <p>
* The reported status SHALL reflect the success of the request, or
* a detailed reason the request failed.
*/
Code status = 1;

/**
* The requested block.
* <p>
* This container object SHALL hold the entire sequence of block items
* for the requested block.<br/>
* The block items in this message SHALL be in the same order
* as received.<br/>
* The items in this message SHALL begin with a `BlockHeader` and end with
* a `BlockStateProof` applicable to this block.
*/
com.hedera.hapi.block.stream.Block block = 2;
}

/**
* Remote procedure calls (RPCs) for the Block Node block services.
*/
service BlockAccessService {
/**
* Read a single block from the block node.
* <p>
* The request SHALL describe the block number of the block to retrieve.
*/
rpc getBlock(BlockRequest) returns (BlockResponse);
}
Loading
Loading