-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Joseph Sinclair <121976561+jsync-swirlds@users.noreply.github.com>
- Loading branch information
1 parent
75049c9
commit 899555f
Showing
1 changed file
with
168 additions
and
126 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,151 +1,193 @@ | ||
/** | ||
* # Platform Data | ||
* A message that describes the current state of the platform entity. | ||
* | ||
* DESCRIPTION NEEDED | ||
* | ||
* ### Keywords | ||
* The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", | ||
* "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this | ||
* document are to be interpreted as described in [RFC2119](https://www.ietf.org/rfc/rfc2119) | ||
* and clarified in [RFC8174](https://www.ietf.org/rfc/rfc8174). | ||
*/ | ||
syntax = "proto3"; | ||
|
||
package proto; | ||
package com.hedera.hapi.platform.state; | ||
|
||
/* | ||
* Copyright (C) 2024 Hedera Hashgraph, LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
option java_package = "com.hedera.hashgraph.sdk.proto"; | ||
option java_package = "com.hedera.hapi.platform.state.legacy"; | ||
// <<<pbj.java_package = "com.hedera.hapi.platform.state">>> This comment is special code for setting PBJ Compiler java package | ||
option java_multiple_files = true; | ||
|
||
import "basic_types.proto"; | ||
import "timestamp.proto"; | ||
|
||
/** | ||
* State managed and used by the platform. | ||
* SPECIFICATION REQUIRED | ||
*/ | ||
message PlatformState { | ||
/** | ||
* The address book for this round. | ||
*/ | ||
NodeAddressBook addressBook = 1; | ||
|
||
/** | ||
* The previous address book. A temporary workaround until dynamic address books are supported. | ||
*/ | ||
NodeAddressBook previousAddressBook = 2; | ||
|
||
/** | ||
* The round of this state. This state represents the handling of all transactions that have reached consensus in | ||
* all previous rounds. All transactions from this round will eventually be applied to this state. The first state | ||
* (genesis state) has a round of 0 because the first round is defined as round 1, and the genesis state is before | ||
* any transactions are handled. | ||
*/ | ||
int64 round = 3; | ||
|
||
/** | ||
* The running event hash computed by the consensus event stream. This should be deleted once the consensus event | ||
* stream is retired. | ||
*/ | ||
bytes legacyRunningEventHash = 4; | ||
|
||
/** | ||
* the consensus timestamp for this signed state | ||
*/ | ||
Timestamp consensusTimestamp = 5; | ||
/** | ||
* The version of the application software that was responsible for creating this state. | ||
*/ | ||
SoftwareVersion creationSoftwareVersion = 6; | ||
|
||
/** | ||
* The epoch hash of this state. Updated every time emergency recovery is performed. | ||
*/ | ||
bytes epochHash = 7; | ||
/** | ||
* The next epoch hash, used to update the epoch hash at the next round boundary. This field is not part of the hash | ||
* and is not serialized. | ||
*/ | ||
bytes nextEpochHash = 8; | ||
|
||
/** | ||
* The number of non-ancient rounds. | ||
*/ | ||
int32 roundsNonAncient = 9; | ||
|
||
/** | ||
* A snapshot of the consensus state at the end of the round, used for restart/reconnect | ||
*/ | ||
ConsensusSnapshot consensusSnapshot = 10; | ||
|
||
/** | ||
* the time when the freeze starts | ||
*/ | ||
Timestamp freezeTime = 11; | ||
|
||
/** | ||
* the last time when a freeze was performed | ||
*/ | ||
Timestamp lastFrozenTime = 12; | ||
|
||
/** | ||
* Null if birth round migration has not yet happened, otherwise the software version that was first used when the | ||
* birth round migration was performed. | ||
*/ | ||
SoftwareVersion firstVersionInBirthRoundMode = 13; | ||
|
||
/** | ||
* The last round before the birth round mode was enabled, or -1 if birth round mode has not yet been enabled. | ||
*/ | ||
int64 lastRoundBeforeBirthRoundMode = 14; | ||
|
||
/** | ||
* The lowest judge generation before the birth round mode was enabled, or -1 if birth round mode has not yet been | ||
* enabled. | ||
*/ | ||
int64 lowestJudgeGenerationBeforeBirthRoundMode = 15; | ||
/** | ||
* The address book for this round. | ||
*/ | ||
proto.NodeAddressBook address_book = 1; | ||
|
||
/** | ||
* The previous address book. A temporary workaround until dynamic address books are supported. | ||
*/ | ||
proto.NodeAddressBook previous_address_book = 2; | ||
|
||
/** | ||
* The round of this state. This state represents the handling of all transactions that have reached consensus in | ||
* all previous rounds. All transactions from this round will eventually be applied to this state. The first state | ||
* (genesis state) has a round of 0 because the first round is defined as round 1, and the genesis state is before | ||
* any transactions are handled. | ||
*/ | ||
uint64 round = 3; | ||
|
||
/** | ||
* The running event hash computed by the consensus event stream. This should be deleted once the consensus event | ||
* stream is retired. | ||
*/ | ||
bytes legacy_running_event_hash = 4; | ||
|
||
/** | ||
* the consensus timestamp for this signed state | ||
*/ | ||
proto.Timestamp consensus_timestamp = 5; | ||
|
||
/** | ||
* The version of the application software that was responsible for creating this state. | ||
*/ | ||
SoftwareVersion creation_software_version = 6; | ||
|
||
/** | ||
* The epoch hash of this state. Updated every time emergency recovery is performed. | ||
*/ | ||
bytes epoch_hash = 7; | ||
|
||
/** | ||
* The next epoch hash, used to update the epoch hash at the next round boundary. This field is not part of the hash | ||
* and is not serialized. | ||
*/ | ||
bytes next_epoch_hash = 8; | ||
|
||
/** | ||
* The number of non-ancient rounds. | ||
*/ | ||
uint32 rounds_non_ancient = 9; | ||
|
||
/** | ||
* A snapshot of the consensus state at the end of the round, used for restart/reconnect | ||
*/ | ||
ConsensusSnapshot consensus_snapshot = 10; | ||
|
||
/** | ||
* the time when the freeze starts | ||
*/ | ||
proto.Timestamp freeze_time = 11; | ||
|
||
/** | ||
* the last time when a freeze was performed | ||
*/ | ||
proto.Timestamp last_frozen_time = 12; | ||
|
||
/** | ||
* Null if birth round migration has not yet happened, otherwise the software version that was first used when the | ||
* birth round migration was performed. | ||
*/ | ||
SoftwareVersion first_version_in_birth_round_mode = 13; | ||
|
||
/** | ||
* The last round before the birth round mode was enabled, or -1 if birth round mode has not yet been enabled. | ||
*/ | ||
uint64 last_round_before_birth_round_mode = 14; | ||
|
||
/** | ||
* The lowest judge generation before the birth round mode was enabled, or -1 if birth round mode has not yet been | ||
* enabled. | ||
*/ | ||
uint64 lowest_judge_generation_before_birth_round_mode = 15; | ||
} | ||
|
||
|
||
/** | ||
* SPECIFICATION REQUIRED | ||
*/ | ||
message SoftwareVersion { | ||
/** | ||
* The config version | ||
*/ | ||
int32 configVersion = 1; | ||
|
||
/** | ||
* The version of the HAPI module (Hedera API) | ||
*/ | ||
SemanticVersion hapiVersion = 2; | ||
|
||
/** | ||
* The version of the services module | ||
*/ | ||
SemanticVersion servicesVersion = 3; | ||
/** | ||
* The config version | ||
*/ | ||
uint32 config_version = 1; | ||
|
||
/** | ||
* The version of the HAPI module (Hedera API) | ||
*/ | ||
proto.SemanticVersion hapi_version = 2; | ||
|
||
/** | ||
* The version of the services module | ||
*/ | ||
proto.SemanticVersion services_version = 3; | ||
} | ||
|
||
/** | ||
* SPECIFICATION REQUIRED | ||
*/ | ||
message ConsensusSnapshot { | ||
/** | ||
* the round number of this snapshot | ||
*/ | ||
int64 round = 1; | ||
/** | ||
* the hashes of all the judges for this round, ordered by their creator ID | ||
*/ | ||
repeated bytes judgeHashes = 2; | ||
/** | ||
* for each non-ancient round, the minimum ancient indicator of the round's judges | ||
*/ | ||
repeated MinimumJudgeInfo minimumJudgeInfoList = 3; | ||
/** | ||
* the consensus order of the next event that will reach consensus | ||
*/ | ||
int64 nextConsensusNumber = 4; | ||
/** | ||
* the consensus time of this snapshot | ||
*/ | ||
Timestamp consensusTimestamp = 5; | ||
/** | ||
* the round number of this snapshot | ||
*/ | ||
uint64 round = 1; | ||
|
||
/** | ||
* the hashes of all the judges for this round, ordered by their creator ID | ||
*/ | ||
repeated bytes judge_hashes = 2; | ||
|
||
/** | ||
* for each non-ancient round, the minimum ancient indicator of the round's judges | ||
*/ | ||
repeated MinimumJudgeInfo minimum_judge_info_list = 3; | ||
|
||
/** | ||
* the consensus order of the next event that will reach consensus | ||
*/ | ||
uint64 next_consensus_number = 4; | ||
|
||
/** | ||
* the consensus time of this snapshot | ||
*/ | ||
proto.Timestamp consensus_timestamp = 5; | ||
} | ||
|
||
/** | ||
* Records the minimum ancient indicator for all judges in a particular round. | ||
*/ | ||
message MinimumJudgeInfo { | ||
/** | ||
* The round number | ||
*/ | ||
int64 round = 1; | ||
/** | ||
* the minimum ancient threshold for all judges for a given round. | ||
* Will be a generation if the birth round migration has not yet happened, | ||
* will be a birth round otherwise. | ||
*/ | ||
int64 minimumJudgeAncientThreshold = 2; | ||
/** | ||
* The round number | ||
*/ | ||
uint64 round = 1; | ||
|
||
/** | ||
* the minimum ancient threshold for all judges for a given round. | ||
* Will be a generation if the birth round migration has not yet happened, | ||
* will be a birth round otherwise. | ||
*/ | ||
uint64 minimum_judge_ancient_threshold = 2; | ||
} |