Skip to content

Commit

Permalink
Adjusting the state Schedule message to improve implementation.
Browse files Browse the repository at this point in the history
 * Changed body_bytes to original_create_transaction
   * Changed type to TransactionBody
 * Updated comments to clarify several items and correct language

Signed-off-by: Joseph Sinclair <joseph.sinclair@swirldslabs.com>
  • Loading branch information
jsync-swirlds committed Jun 27, 2023
1 parent 70ca376 commit f7180fd
Showing 1 changed file with 25 additions and 12 deletions.
37 changes: 25 additions & 12 deletions services/state/schedule/schedule.proto
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,14 @@ package proto;
import "basic_types.proto";
import "timestamp.proto";
import "schedulable_transaction_body.proto";
import "transaction_body.proto";

option java_package = "com.hederahashgraph.api.proto.java";
// <<<pbj.java_package = "com.hedera.hapi.node.state.schedule">>> This comment is special code for setting PBJ Compiler java package
option java_multiple_files = true;

/**
* First-draft representation of a Hedera Schedule Service in the network Merkle tree.
* Representation of a Hedera Schedule entry in the network Merkle tree.
*
* As with all network entities, a schedule has a unique entity number, which is usually given along
* with the network's shard and realm in the form of a shard.realm.number id.
Expand All @@ -40,11 +41,13 @@ message Schedule {

/**
* The schedule deleted flag
* A schedule will either be executed or deleted, but never both.
*/
bool deleted = 1;

/**
* The schedule executed flag
* A schedule will either be executed or deleted, but never both.
*/
bool executed = 2;

Expand All @@ -54,54 +57,64 @@ message Schedule {
string memo = 3;

/**
* This schedule's unique ID within the network state.
* This schedule's unique ID within the global network state.
*/
ScheduleID id = 4;

/**
* The schedule account for this schedule.
* The schedule account for this schedule. This is the account that submitted the original
* ScheduleCreate transaction.
*/
AccountID scheduler_account = 5;

/**
* The payer account for this schedule.
* The explicit payer account for the scheduled transaction.
* This account is added to the accounts that must sign the schedule before it will execute.
*/
AccountID payer_account = 6;

/**
* The admin key for this schedule.
* The admin key for this schedule.
* If this is not set, then the schedule cannot be deleted.
*/
Key admin_key = 7;

/**
* The start time of the schedule.
* The transaction valid start value from the transaction that created this schedule.
*/
Timestamp schedule_valid_start = 8;

/**
* The expiration time of the schedule as provided by the user.
* The requested expiration time of the schedule as provided by the user.
* The actual calculated expiration time may be "earlier" than this, but will not be later.
*/
Timestamp expiration_time_provided = 9;

/**
* The calculated expiration time of the schedule.
* The calculated expiration time of the schedule. This is calculated based on the requested
* expiration time from the create transaction, and the maximum expiration permitted by the
* network.
* The schedule will be removed from global network state after the network reaches a consensus
* time greater than or equal to this value.
*/
Timestamp calculated_expiration_time = 10;

/**
* The consensus timestamp of the transaction that executed, deleted, or expired this schedule.
* The consensus timestamp of the transaction that executed or deleted this schedule.
*/
Timestamp resolution_time = 11;

/**
* The scheduled transaction
* The scheduled transaction to execute.
*/
SchedulableTransactionBody scheduled_transaction = 12;

/**
* The transaction body bytes
* The full transaction that created this schedule. This is primarily used for duplicate
* schedule create detection. This is also the source of the parent transaction ID, from
* which the child transaction ID is derived.
*/
bytes body_bytes = 13;
TransactionBody original_create_transaction = 13;

/**
* All the primitive keys that have already signed this schedule.
Expand Down

0 comments on commit f7180fd

Please sign in to comment.