Documentation ¶
Index ¶
- Variables
- type GossipMessage
- func (*GossipMessage) Descriptor() ([]byte, []int)deprecated
- func (m *GossipMessage) GetMessage() isGossipMessage_Message
- func (x *GossipMessage) GetSignedHeartbeat() *SignedHeartbeat
- func (x *GossipMessage) GetSignedObservation() *SignedObservation
- func (x *GossipMessage) GetSignedObservationRequest() *SignedObservationRequest
- func (x *GossipMessage) GetSignedVaaWithQuorum() *SignedVAAWithQuorum
- func (*GossipMessage) ProtoMessage()
- func (x *GossipMessage) ProtoReflect() protoreflect.Message
- func (x *GossipMessage) Reset()
- func (x *GossipMessage) String() string
- type GossipMessage_SignedHeartbeat
- type GossipMessage_SignedObservation
- type GossipMessage_SignedObservationRequest
- type GossipMessage_SignedVaaWithQuorum
- type Heartbeat
- func (*Heartbeat) Descriptor() ([]byte, []int)deprecated
- func (x *Heartbeat) GetBootTimestamp() int64
- func (x *Heartbeat) GetCounter() int64
- func (x *Heartbeat) GetGuardianAddr() string
- func (x *Heartbeat) GetNetworks() []*Heartbeat_Network
- func (x *Heartbeat) GetNodeName() string
- func (x *Heartbeat) GetTimestamp() int64
- func (x *Heartbeat) GetVersion() string
- func (*Heartbeat) ProtoMessage()
- func (x *Heartbeat) ProtoReflect() protoreflect.Message
- func (x *Heartbeat) Reset()
- func (x *Heartbeat) String() string
- type Heartbeat_Network
- func (*Heartbeat_Network) Descriptor() ([]byte, []int)deprecated
- func (x *Heartbeat_Network) GetContractAddress() string
- func (x *Heartbeat_Network) GetErrorCount() uint64
- func (x *Heartbeat_Network) GetHeight() int64
- func (x *Heartbeat_Network) GetId() uint32
- func (*Heartbeat_Network) ProtoMessage()
- func (x *Heartbeat_Network) ProtoReflect() protoreflect.Message
- func (x *Heartbeat_Network) Reset()
- func (x *Heartbeat_Network) String() string
- type ObservationRequest
- func (*ObservationRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ObservationRequest) GetChainId() uint32
- func (x *ObservationRequest) GetTxHash() []byte
- func (*ObservationRequest) ProtoMessage()
- func (x *ObservationRequest) ProtoReflect() protoreflect.Message
- func (x *ObservationRequest) Reset()
- func (x *ObservationRequest) String() string
- type SignedHeartbeat
- func (*SignedHeartbeat) Descriptor() ([]byte, []int)deprecated
- func (x *SignedHeartbeat) GetGuardianAddr() []byte
- func (x *SignedHeartbeat) GetHeartbeat() []byte
- func (x *SignedHeartbeat) GetSignature() []byte
- func (*SignedHeartbeat) ProtoMessage()
- func (x *SignedHeartbeat) ProtoReflect() protoreflect.Message
- func (x *SignedHeartbeat) Reset()
- func (x *SignedHeartbeat) String() string
- type SignedObservation
- func (*SignedObservation) Descriptor() ([]byte, []int)deprecated
- func (x *SignedObservation) GetAddr() []byte
- func (x *SignedObservation) GetHash() []byte
- func (x *SignedObservation) GetMessageId() string
- func (x *SignedObservation) GetSignature() []byte
- func (x *SignedObservation) GetTxHash() []byte
- func (*SignedObservation) ProtoMessage()
- func (x *SignedObservation) ProtoReflect() protoreflect.Message
- func (x *SignedObservation) Reset()
- func (x *SignedObservation) String() string
- type SignedObservationRequest
- func (*SignedObservationRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SignedObservationRequest) GetGuardianAddr() []byte
- func (x *SignedObservationRequest) GetObservationRequest() []byte
- func (x *SignedObservationRequest) GetSignature() []byte
- func (*SignedObservationRequest) ProtoMessage()
- func (x *SignedObservationRequest) ProtoReflect() protoreflect.Message
- func (x *SignedObservationRequest) Reset()
- func (x *SignedObservationRequest) String() string
- type SignedVAAWithQuorum
- func (*SignedVAAWithQuorum) Descriptor() ([]byte, []int)deprecated
- func (x *SignedVAAWithQuorum) GetVaa() []byte
- func (*SignedVAAWithQuorum) ProtoMessage()
- func (x *SignedVAAWithQuorum) ProtoReflect() protoreflect.Message
- func (x *SignedVAAWithQuorum) Reset()
- func (x *SignedVAAWithQuorum) String() string
Constants ¶
This section is empty.
Variables ¶
var File_gossip_v1_gossip_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type GossipMessage ¶
type GossipMessage struct { // Types that are assignable to Message: // // *GossipMessage_SignedObservation // *GossipMessage_SignedHeartbeat // *GossipMessage_SignedVaaWithQuorum // *GossipMessage_SignedObservationRequest Message isGossipMessage_Message `protobuf_oneof:"message"` // contains filtered or unexported fields }
func (*GossipMessage) Descriptor
deprecated
func (*GossipMessage) Descriptor() ([]byte, []int)
Deprecated: Use GossipMessage.ProtoReflect.Descriptor instead.
func (*GossipMessage) GetMessage ¶
func (m *GossipMessage) GetMessage() isGossipMessage_Message
func (*GossipMessage) GetSignedHeartbeat ¶
func (x *GossipMessage) GetSignedHeartbeat() *SignedHeartbeat
func (*GossipMessage) GetSignedObservation ¶
func (x *GossipMessage) GetSignedObservation() *SignedObservation
func (*GossipMessage) GetSignedObservationRequest ¶
func (x *GossipMessage) GetSignedObservationRequest() *SignedObservationRequest
func (*GossipMessage) GetSignedVaaWithQuorum ¶
func (x *GossipMessage) GetSignedVaaWithQuorum() *SignedVAAWithQuorum
func (*GossipMessage) ProtoMessage ¶
func (*GossipMessage) ProtoMessage()
func (*GossipMessage) ProtoReflect ¶
func (x *GossipMessage) ProtoReflect() protoreflect.Message
func (*GossipMessage) Reset ¶
func (x *GossipMessage) Reset()
func (*GossipMessage) String ¶
func (x *GossipMessage) String() string
type GossipMessage_SignedHeartbeat ¶
type GossipMessage_SignedHeartbeat struct {
SignedHeartbeat *SignedHeartbeat `protobuf:"bytes,3,opt,name=signed_heartbeat,json=signedHeartbeat,proto3,oneof"`
}
type GossipMessage_SignedObservation ¶
type GossipMessage_SignedObservation struct {
SignedObservation *SignedObservation `protobuf:"bytes,2,opt,name=signed_observation,json=signedObservation,proto3,oneof"`
}
type GossipMessage_SignedObservationRequest ¶
type GossipMessage_SignedObservationRequest struct {
SignedObservationRequest *SignedObservationRequest `protobuf:"bytes,5,opt,name=signed_observation_request,json=signedObservationRequest,proto3,oneof"`
}
type GossipMessage_SignedVaaWithQuorum ¶
type GossipMessage_SignedVaaWithQuorum struct {
SignedVaaWithQuorum *SignedVAAWithQuorum `protobuf:"bytes,4,opt,name=signed_vaa_with_quorum,json=signedVaaWithQuorum,proto3,oneof"`
}
type Heartbeat ¶
type Heartbeat struct { // The node's arbitrarily chosen, untrusted nodeName. NodeName string `protobuf:"bytes,1,opt,name=node_name,json=nodeName,proto3" json:"node_name,omitempty"` // A monotonic counter that resets to zero on startup. Counter int64 `protobuf:"varint,2,opt,name=counter,proto3" json:"counter,omitempty"` // UNIX wall time. Timestamp int64 `protobuf:"varint,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` Networks []*Heartbeat_Network `protobuf:"bytes,4,rep,name=networks,proto3" json:"networks,omitempty"` // Human-readable representation of the current bridge node release. Version string `protobuf:"bytes,5,opt,name=version,proto3" json:"version,omitempty"` // Human-readable representation of the guardian key's address. GuardianAddr string `protobuf:"bytes,6,opt,name=guardian_addr,json=guardianAddr,proto3" json:"guardian_addr,omitempty"` // UNIX boot timestamp. BootTimestamp int64 `protobuf:"varint,7,opt,name=boot_timestamp,json=bootTimestamp,proto3" json:"boot_timestamp,omitempty"` // contains filtered or unexported fields }
P2P gossip heartbeats for network introspection purposes.
func (*Heartbeat) Descriptor
deprecated
func (*Heartbeat) GetBootTimestamp ¶
func (*Heartbeat) GetCounter ¶
func (*Heartbeat) GetGuardianAddr ¶
func (*Heartbeat) GetNetworks ¶
func (x *Heartbeat) GetNetworks() []*Heartbeat_Network
func (*Heartbeat) GetNodeName ¶
func (*Heartbeat) GetTimestamp ¶
func (*Heartbeat) GetVersion ¶
func (*Heartbeat) ProtoMessage ¶
func (*Heartbeat) ProtoMessage()
func (*Heartbeat) ProtoReflect ¶
func (x *Heartbeat) ProtoReflect() protoreflect.Message
type Heartbeat_Network ¶
type Heartbeat_Network struct { // Canonical chain ID. Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // Consensus height of the node. Height int64 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"` // Chain-specific human-readable representation of the bridge contract address. ContractAddress string `protobuf:"bytes,3,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty"` // Connection error count ErrorCount uint64 `protobuf:"varint,4,opt,name=error_count,json=errorCount,proto3" json:"error_count,omitempty"` // contains filtered or unexported fields }
func (*Heartbeat_Network) Descriptor
deprecated
func (*Heartbeat_Network) Descriptor() ([]byte, []int)
Deprecated: Use Heartbeat_Network.ProtoReflect.Descriptor instead.
func (*Heartbeat_Network) GetContractAddress ¶
func (x *Heartbeat_Network) GetContractAddress() string
func (*Heartbeat_Network) GetErrorCount ¶
func (x *Heartbeat_Network) GetErrorCount() uint64
func (*Heartbeat_Network) GetHeight ¶
func (x *Heartbeat_Network) GetHeight() int64
func (*Heartbeat_Network) GetId ¶
func (x *Heartbeat_Network) GetId() uint32
func (*Heartbeat_Network) ProtoMessage ¶
func (*Heartbeat_Network) ProtoMessage()
func (*Heartbeat_Network) ProtoReflect ¶
func (x *Heartbeat_Network) ProtoReflect() protoreflect.Message
func (*Heartbeat_Network) Reset ¶
func (x *Heartbeat_Network) Reset()
func (*Heartbeat_Network) String ¶
func (x *Heartbeat_Network) String() string
type ObservationRequest ¶
type ObservationRequest struct { ChainId uint32 `protobuf:"varint,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` TxHash []byte `protobuf:"bytes,2,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` // contains filtered or unexported fields }
func (*ObservationRequest) Descriptor
deprecated
func (*ObservationRequest) Descriptor() ([]byte, []int)
Deprecated: Use ObservationRequest.ProtoReflect.Descriptor instead.
func (*ObservationRequest) GetChainId ¶
func (x *ObservationRequest) GetChainId() uint32
func (*ObservationRequest) GetTxHash ¶
func (x *ObservationRequest) GetTxHash() []byte
func (*ObservationRequest) ProtoMessage ¶
func (*ObservationRequest) ProtoMessage()
func (*ObservationRequest) ProtoReflect ¶
func (x *ObservationRequest) ProtoReflect() protoreflect.Message
func (*ObservationRequest) Reset ¶
func (x *ObservationRequest) Reset()
func (*ObservationRequest) String ¶
func (x *ObservationRequest) String() string
type SignedHeartbeat ¶
type SignedHeartbeat struct { // Serialized Heartbeat message. Heartbeat []byte `protobuf:"bytes,1,opt,name=heartbeat,proto3" json:"heartbeat,omitempty"` // ECDSA signature using the node's guardian public key. Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` // Guardian address that signed this payload (truncated Eth address). // This is already contained in Heartbeat, however, we want to verify // the payload before we deserialize it. GuardianAddr []byte `protobuf:"bytes,3,opt,name=guardian_addr,json=guardianAddr,proto3" json:"guardian_addr,omitempty"` // contains filtered or unexported fields }
func (*SignedHeartbeat) Descriptor
deprecated
func (*SignedHeartbeat) Descriptor() ([]byte, []int)
Deprecated: Use SignedHeartbeat.ProtoReflect.Descriptor instead.
func (*SignedHeartbeat) GetGuardianAddr ¶
func (x *SignedHeartbeat) GetGuardianAddr() []byte
func (*SignedHeartbeat) GetHeartbeat ¶
func (x *SignedHeartbeat) GetHeartbeat() []byte
func (*SignedHeartbeat) GetSignature ¶
func (x *SignedHeartbeat) GetSignature() []byte
func (*SignedHeartbeat) ProtoMessage ¶
func (*SignedHeartbeat) ProtoMessage()
func (*SignedHeartbeat) ProtoReflect ¶
func (x *SignedHeartbeat) ProtoReflect() protoreflect.Message
func (*SignedHeartbeat) Reset ¶
func (x *SignedHeartbeat) Reset()
func (*SignedHeartbeat) String ¶
func (x *SignedHeartbeat) String() string
type SignedObservation ¶
type SignedObservation struct { // Guardian pubkey as truncated eth address. Addr []byte `protobuf:"bytes,1,opt,name=addr,proto3" json:"addr,omitempty"` // The observation's deterministic, unique hash. Hash []byte `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"` // ECSDA signature of the hash using the node's guardian key. Signature []byte `protobuf:"bytes,3,opt,name=signature,proto3" json:"signature,omitempty"` // Transaction hash this observation was made from. // Optional, included for observability. TxHash []byte `protobuf:"bytes,4,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` // Message ID (emitter_chain/emitter/target_chain/seq) for this observation. // Optional, included for observability. MessageId string `protobuf:"bytes,5,opt,name=message_id,json=messageId,proto3" json:"message_id,omitempty"` // contains filtered or unexported fields }
A SignedObservation is a signed statement by a given guardian node that they observed a given event.
Observations always result from an external, final event being observed. Examples are emitted messages in finalized blocks on a block or guardian set changes injected by node operators after reaching off-chain consensus.
The event 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.
func (*SignedObservation) Descriptor
deprecated
func (*SignedObservation) Descriptor() ([]byte, []int)
Deprecated: Use SignedObservation.ProtoReflect.Descriptor instead.
func (*SignedObservation) GetAddr ¶
func (x *SignedObservation) GetAddr() []byte
func (*SignedObservation) GetHash ¶
func (x *SignedObservation) GetHash() []byte
func (*SignedObservation) GetMessageId ¶
func (x *SignedObservation) GetMessageId() string
func (*SignedObservation) GetSignature ¶
func (x *SignedObservation) GetSignature() []byte
func (*SignedObservation) GetTxHash ¶
func (x *SignedObservation) GetTxHash() []byte
func (*SignedObservation) ProtoMessage ¶
func (*SignedObservation) ProtoMessage()
func (*SignedObservation) ProtoReflect ¶
func (x *SignedObservation) ProtoReflect() protoreflect.Message
func (*SignedObservation) Reset ¶
func (x *SignedObservation) Reset()
func (*SignedObservation) String ¶
func (x *SignedObservation) String() string
type SignedObservationRequest ¶
type SignedObservationRequest struct { // Serialized observation request. ObservationRequest []byte `protobuf:"bytes,1,opt,name=observation_request,json=observationRequest,proto3" json:"observation_request,omitempty"` // Signature Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` GuardianAddr []byte `protobuf:"bytes,3,opt,name=guardian_addr,json=guardianAddr,proto3" json:"guardian_addr,omitempty"` // contains filtered or unexported fields }
Any guardian can send a SignedObservationRequest to the network to request all guardians to re-observe a given transaction. This is rate-limited to one request per second per guardian to prevent abuse.
In the current implementation, this is only implemented for Solana. For Solana, the tx_hash is the account address of the transaction's message account.
func (*SignedObservationRequest) Descriptor
deprecated
func (*SignedObservationRequest) Descriptor() ([]byte, []int)
Deprecated: Use SignedObservationRequest.ProtoReflect.Descriptor instead.
func (*SignedObservationRequest) GetGuardianAddr ¶
func (x *SignedObservationRequest) GetGuardianAddr() []byte
func (*SignedObservationRequest) GetObservationRequest ¶
func (x *SignedObservationRequest) GetObservationRequest() []byte
func (*SignedObservationRequest) GetSignature ¶
func (x *SignedObservationRequest) GetSignature() []byte
func (*SignedObservationRequest) ProtoMessage ¶
func (*SignedObservationRequest) ProtoMessage()
func (*SignedObservationRequest) ProtoReflect ¶
func (x *SignedObservationRequest) ProtoReflect() protoreflect.Message
func (*SignedObservationRequest) Reset ¶
func (x *SignedObservationRequest) Reset()
func (*SignedObservationRequest) String ¶
func (x *SignedObservationRequest) String() string
type SignedVAAWithQuorum ¶
type SignedVAAWithQuorum struct { Vaa []byte `protobuf:"bytes,1,opt,name=vaa,proto3" json:"vaa,omitempty"` // contains filtered or unexported fields }
A SignedVAAWithQuorum message is sent by nodes whenever one of the VAAs they observed reached a 2/3+ quorum to be considered valid. Signed VAAs are broadcasted to the gossip network to allow nodes to persist them even if they failed to observe the signature.
func (*SignedVAAWithQuorum) Descriptor
deprecated
func (*SignedVAAWithQuorum) Descriptor() ([]byte, []int)
Deprecated: Use SignedVAAWithQuorum.ProtoReflect.Descriptor instead.
func (*SignedVAAWithQuorum) GetVaa ¶
func (x *SignedVAAWithQuorum) GetVaa() []byte
func (*SignedVAAWithQuorum) ProtoMessage ¶
func (*SignedVAAWithQuorum) ProtoMessage()
func (*SignedVAAWithQuorum) ProtoReflect ¶
func (x *SignedVAAWithQuorum) ProtoReflect() protoreflect.Message
func (*SignedVAAWithQuorum) Reset ¶
func (x *SignedVAAWithQuorum) Reset()
func (*SignedVAAWithQuorum) String ¶
func (x *SignedVAAWithQuorum) String() string