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 all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
422397b
Add initial block node HIP draft doc
Nana-EC Nov 17, 2024
2ecf87b
Expanded on rational and spec section tasks. Next up missing protos a…
Nana-EC Nov 17, 2024
d24f5b1
Assigning HIP 1081 and renaming file to hip-1081.md
actions-user Nov 17, 2024
6e3e82f
Cleaned up and added protobuf assets
Nana-EC Nov 18, 2024
1635171
Fix spelling errors
Nana-EC Dec 3, 2024
3105d90
Add communication protocol descriptions
Nana-EC Dec 3, 2024
bb46f10
Cleaned up and expanded based on comments, thanks jsync-swirlds
Nana-EC Dec 11, 2024
207c2df
Add API response codes
Nana-EC Dec 11, 2024
479c3c2
feat: Add messages for skip and resend block to block service
jsync-swirlds Feb 22, 2025
0923feb
Update Hedera reference and cleaned up a bit
Nana-EC Apr 14, 2025
f1eb60a
Cleaned up some user stories
Nana-EC Apr 15, 2025
305d024
Cleaned up layout, added layout image and updated proto
Nana-EC May 8, 2025
85628c0
Revised wordings and tries to fix tone for items above Specification …
Nana-EC May 8, 2025
bd0e8e2
Convert png to svg
Nana-EC May 8, 2025
25d1214
Further improve wording of section above spec and update proto with l…
Nana-EC May 15, 2025
1a85103
Fix working group YAML rendering
Nana-EC May 15, 2025
1b40109
Addressed items from jsync-swirlds
Nana-EC May 21, 2025
a882fb2
Added refinements of defintions suggested by mark@swirldslabs.com
Nana-EC May 21, 2025
c1b75dd
Significant restructuring of Specification section to make it easier…
Nana-EC May 23, 2025
91f9f4b
Update to latest proto
Nana-EC May 23, 2025
3a920d2
Added improvements around Abstract and Motivation based on suggestion…
Nana-EC May 24, 2025
d0457d9
Set last call
Nana-EC May 28, 2025
1480bc3
Cleaned up some code and addressed some of jsync-swirlds comments
Nana-EC May 29, 2025
d667b32
Made a few improvements based on atul-hedera feedback
Nana-EC May 29, 2025
6390207
another pass and address feedback form jsync and-swirlds atul-hedera
Nana-EC May 30, 2025
6d268ff
Added some more user stories based on suggestion fromatul-hedera
Nana-EC May 30, 2025
e2ae169
Further touch ups based on questions from atul-hedera
Nana-EC May 31, 2025
cea2890
Reorganized for easier reading flow
Nana-EC May 31, 2025
745ba5a
Cleaned up grammar a bit more
Nana-EC May 31, 2025
e83c9bf
Updates to HIP-1081
jsync-swirlds Jun 2, 2025
6918646
Proto file specifciation updates
jsync-swirlds Jun 10, 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
839 changes: 839 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