Skip to content
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

Update FreezeTransactionBody Message #89

Open
nathanklick opened this issue Sep 10, 2021 · 1 comment
Open

Update FreezeTransactionBody Message #89

nathanklick opened this issue Sep 10, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@nathanklick
Copy link
Member

nathanklick commented Sep 10, 2021

Problem

In order to support network upgrade features within the context of a docker based deployment, we need to update the HAPI FreezeTransactionBody message and introduce the associated FreezeType enumeration. See current definition and proposed changes below.

Solution

Current Freeze Transaction

syntax = "proto3";

package proto;

option java_package = "com.hederahashgraph.api.proto.java";
option java_multiple_files = true;

import "Duration.proto";
import "Timestamp.proto";
import "BasicTypes.proto";

/* At consensus, sets the consensus time at which the platform should stop creating events and accepting transactions, and enter a maintenance window. */
message FreezeTransactionBody {
    int32 startHour = 1 [deprecated=true]; // The start hour (in UTC time), a value between 0 and 23
    int32 startMin = 2 [deprecated=true]; // The start minute (in UTC time), a value between 0 and 59
    int32 endHour = 3 [deprecated=true]; // The end hour (in UTC time), a value between 0 and 23
    int32 endMin = 4 [deprecated=true]; // The end minute (in UTC time), a value between 0 and 59
    FileID update_file = 5; // If set, the file whose contents should be used for a network software update during the maintenance window
    bytes file_hash = 6; // If set, the expected hash of the contents of the update file (used to verify the update)
    Timestamp start_time = 7; // The consensus time at which the maintenance window should begin
}

Proposed Freeze Transaction Changes

FreezeType Enumeration

syntax = "proto3";

package proto;

option java_package = "com.hederahashgraph.api.proto.java";
option java_multiple_files = true;

/* The type of network freeze or upgrade operation to be performed. This type dictates which fields are required. */
enum FreezeType {
    FREEZE_ONLY = 0; // Freezes the network at the specified time. The start_time field must be provided and must reference a future time. Any values specified for the update_file and file_hash fields will be ignored. This transaction does not perform any network changes or upgrades and requires manual intervention to restart the network. 
    PREPARE_UPGRADE = 1; // A non-freezing operation that initiates network wide preparation in advance of a scheduled freeze upgrade. The update_file and file_hash fields must be provided and valid. The start_time field may be omitted and any value present will be ignored.
    FREEZE_UPGRADE = 2; // Freezes the network at the specified time and performs the previously prepared automatic upgrade across the entire network. 
    FREEZE_ABORT = 3; // Aborts a pending network freeze operation.
    TELEMETRY_UPGRADE = 4; // Performs an immediate upgrade on auxilary services and containers providing telemetry/metrics. Does not impact network operations.
}

FreezeTransactionBody Message

syntax = "proto3";

package proto;

option java_package = "com.hederahashgraph.api.proto.java";
option java_multiple_files = true;

import "Duration.proto";
import "Timestamp.proto";
import "BasicTypes.proto";
import "FreezeType.proto";

/* At consensus, sets the consensus time at which the platform should stop creating events and accepting transactions, and enter a maintenance window. */
message FreezeTransactionBody {
    FileID update_file = 5; // If set, the file whose contents should be used for a network software update during the maintenance window
    bytes file_hash = 6; // If set, the expected hash of the contents of the update file (used to verify the update)
    Timestamp start_time = 7; // The consensus time at which the maintenance window should begin
    FreezeType freeze_type = 8; 
    
    reserved 1, 2, 3, 4; // Reserve deleted field identifiers to prevent reuse
    reserved "startHour", "startMin", "endHour", "endMin"; // Reserve deleted field names to prevent reuse
}

Alternatives

None available.

@nathanklick nathanklick added the enhancement New feature or request label Sep 10, 2021
@nathanklick
Copy link
Member Author

Resolved via PR #90

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant