event.event_core.proto Maven / Gradle / Ivy
The newest version!
/**
* # Core Event Data
* A message that describes the metadata for an event.
*
* The `EventCore` contains a list of the event's parents, as well as the software
* version, an identifier for the node that created this event, the birth round, and
* the creation timestamp for the event.
*
* ### 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).
*/
syntax = "proto3";
package com.hedera.hapi.platform.event;
/*
* Hedera Network Services Protobuf
*
* 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.
*/
import "basic_types.proto";
import "event/event_descriptor.proto";
import "timestamp.proto";
option java_package = "com.hedera.hapi.platform.event.legacy";
// <<>> This comment is special code for setting PBJ Compiler java package
option java_multiple_files = true;
/**
* Contains information about an event and its parents.
*/
message EventCore {
/**
* The creator node identifier.
* This SHALL be the unique identifier for the node that created the event.
* This SHALL match the ID of the node as it appears in the address book.
*/
int64 creator_node_id = 1;
/**
* The birth round of the event.
* The birth round SHALL be the pending consensus round at the time the event is created.
* The pending consensus round SHALL be **one greater** than the latest round to reach consensus.
*/
int64 birth_round = 2;
/**
* The wall clock time at which the event was created, according to the node creating the event.
* If the event has a self parent, this timestamp MUST be strictly greater than the `time_created` of the self parent.
*/
proto.Timestamp time_created = 3;
/**
* A list of EventDescriptors representing the parents of this event.
* The list of parents SHALL include zero or one self parents, and zero or more other parents.
* The first element of the list SHALL be the self parent, if one exists.
* The list of parents SHALL NOT include more than one parent from the same creator.
*/
repeated EventDescriptor parents = 4;
/**
* The event specification version.
* The specification described by this version SHALL encompass the format of the `GossipEvent` message, and also the
* format of all contained messages.
* This SHALL exactly match the specification version passed into the platform at construction.
*/
proto.SemanticVersion version = 17; // This field is temporary until birth_round migration is complete. Field number 17 chosen to avoid polluting cheaper 1 byte field numbers 1-16
}