wormhole/proto/gossip/v1/gossip.proto

53 lines
1.5 KiB
Protocol Buffer
Raw Normal View History

syntax = "proto3";
package gossip.v1;
option go_package = "proto/gossip/v1;gossipv1";
message GossipMessage {
oneof message {
Heartbeat heartbeat = 1;
2020-08-21 04:00:40 -07:00
LockupObservation lockup_observation = 2;
}
}
// P2P gossip heartbeats for network introspection purposes.
message Heartbeat {
// The node's arbitrarily chosen, untrusted nodeName.
string node_name = 1;
// A monotonic counter that resets to zero on startup.
int64 counter = 2;
// UNIX wall time.
2020-08-21 01:36:08 -07:00
int64 timestamp = 3; // TODO: use this
// Consensus heights on connected networks
message Network {// TODO: use this
uint32 id = 1;
int64 height = 2;
}
repeated Network networks = 4;
// TODO: include statement of gk public key?
// TODO: software version/release
}
2020-08-21 04:00:40 -07:00
// A LockupObservation is a signed statement by a given guardian node
// that they observed a finalized lockup on a chain.
//
// The lockup is uniquely identified by its hashed (tx_hash, nonce, values...) tuple.
//
// Other nodes will verify the signature. Once any node has observed a quorum of
// guardians submitting valid signatures for a given hash, they can be assembled into a VAA.
//
// Messages without valid signature are dropped unceremoniously.
//
// TODO: rename? we also use it for governance VAAs
2020-08-21 04:00:40 -07:00
message LockupObservation {
// Guardian pubkey as truncated eth address.
bytes addr = 1;
2020-08-21 04:00:40 -07:00
// The lockup's deterministic, unique hash.
bytes hash = 2;
// ECSDA signature of the hash using the node's guardian key.
bytes signature = 3;
}