// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.36.6
// 	protoc        v5.29.3
// source: bft.proto

package bft

import (
	lib "github.com/canopy-network/canopy/lib"
	crypto "github.com/canopy-network/canopy/lib/crypto"
	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
	reflect "reflect"
	sync "sync"
	unsafe "unsafe"
)

const (
	// Verify that this generated code is sufficiently up-to-date.
	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
	// Verify that runtime/protoimpl is sufficiently up-to-date.
	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)

// *****************************************************************************************************
// This file is auto-generated from source files in `/lib/.proto/*` using Protocol Buffers (protobuf)
//
// Protobuf is a language-neutral, platform-neutral serialization format. It allows users
// to define objects in a way that’s both efficient to store and fast to transmit over the network.
// These definitions are compiled into code that *enables different systems and programming languages
// to communicate in a byte-perfect manner*
//
// To update these structures, make changes to the source .proto files, then recompile
// to regenerate this file.
// These auto-generated files are easily recognized by checking for a `.pb.go` ending
// *****************************************************************************************************
// _
// _
// _
// (Consensus) Message
//
// This structure defines the wire message used in the BFT consensus process. Validators use these messages to propose,
// vote on, and confirm blocks, allowing the network agree on a single version of the blockchain, even in there
// exists faulty or malicious actors.
type Message struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// header: the current view of the consensus process according to the sender
	Header *lib.View `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
	// vrf: the output of the vrf allowing participants to trust the leader was chosen fairly and securely.
	Vrf *lib.Signature `protobuf:"bytes,2,opt,name=vrf,proto3" json:"vrf,omitempty"`
	// qc: proof that a minimum number of validators have agreed on a proposal, typically represented by their collective
	// signatures (aggregated by the leader), which confirms consensus and allows the network to move forward
	Qc *lib.QuorumCertificate `protobuf:"bytes,3,opt,name=qc,proto3" json:"qc,omitempty"`
	// high_qc: the latest 'round' quorum certificate where a +2/3rds of validators reached quorum for the PRECOMMIT phase
	// This serves as a secure proof to protect those who may have committed in a type II asynchronous network
	HighQc *lib.QuorumCertificate `protobuf:"bytes,4,opt,name=high_qc,json=highQc,proto3" json:"highQC"` // @gotags: json:"highQC"
	// double_sign_evidence: proof that a validator has signed two conflicting proposals at the same View
	LastDoubleSignEvidence []*DoubleSignEvidence `protobuf:"bytes,5,rep,name=last_double_sign_evidence,json=lastDoubleSignEvidence,proto3" json:"lastDoubleSignEvidence"` // @gotags: json:"lastDoubleSignEvidence"
	// vdf: a Verifiable Delay Function is a cryptographic function that takes a fixed time to compute
	// but is fast to verify, deterring historical fork attacks like the long-range-attack
	Vdf *crypto.VDF `protobuf:"bytes,6,opt,name=vdf,proto3" json:"vdf,omitempty"`
	// signature: the digital signature of the sender of the consensus message
	Signature *lib.Signature `protobuf:"bytes,7,opt,name=signature,proto3" json:"signature,omitempty"`
	// timestamp: allow the leader to coordinate the new height (within reason)
	Timestamp uint64 `protobuf:"varint,8,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// rcBuildHeight: the root height when the block was built
	RcBuildHeight uint64 `protobuf:"varint,9,opt,name=rcBuildHeight,proto3" json:"rcBuildHeight,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *Message) Reset() {
	*x = Message{}
	mi := &file_bft_proto_msgTypes[0]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *Message) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*Message) ProtoMessage() {}

func (x *Message) ProtoReflect() protoreflect.Message {
	mi := &file_bft_proto_msgTypes[0]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use Message.ProtoReflect.Descriptor instead.
func (*Message) Descriptor() ([]byte, []int) {
	return file_bft_proto_rawDescGZIP(), []int{0}
}

func (x *Message) GetHeader() *lib.View {
	if x != nil {
		return x.Header
	}
	return nil
}

func (x *Message) GetVrf() *lib.Signature {
	if x != nil {
		return x.Vrf
	}
	return nil
}

func (x *Message) GetQc() *lib.QuorumCertificate {
	if x != nil {
		return x.Qc
	}
	return nil
}

func (x *Message) GetHighQc() *lib.QuorumCertificate {
	if x != nil {
		return x.HighQc
	}
	return nil
}

func (x *Message) GetLastDoubleSignEvidence() []*DoubleSignEvidence {
	if x != nil {
		return x.LastDoubleSignEvidence
	}
	return nil
}

func (x *Message) GetVdf() *crypto.VDF {
	if x != nil {
		return x.Vdf
	}
	return nil
}

func (x *Message) GetSignature() *lib.Signature {
	if x != nil {
		return x.Signature
	}
	return nil
}

func (x *Message) GetTimestamp() uint64 {
	if x != nil {
		return x.Timestamp
	}
	return 0
}

func (x *Message) GetRcBuildHeight() uint64 {
	if x != nil {
		return x.RcBuildHeight
	}
	return 0
}

// double_sign_evidence is proof that a validator has signed two conflicting proposals at the same block height and round
// showing dishonest or faulty behavior and triggering slashes to protect the network’s integrity
type DoubleSignEvidence struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// vote_a: one of two quorum certificates that are of the same View that have conflicting payloads both that are
	// signed by one or more validators
	VoteA *lib.QuorumCertificate `protobuf:"bytes,1,opt,name=vote_a,json=voteA,proto3" json:"voteA"` // @gotags: json:"voteA"
	// vote_b: one of two quorum certificates that are of the same View that have conflicting payloads both that are
	// signed by one or more validators
	VoteB         *lib.QuorumCertificate `protobuf:"bytes,2,opt,name=vote_b,json=voteB,proto3" json:"voteB"` // @gotags: json:"voteB"
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *DoubleSignEvidence) Reset() {
	*x = DoubleSignEvidence{}
	mi := &file_bft_proto_msgTypes[1]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *DoubleSignEvidence) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*DoubleSignEvidence) ProtoMessage() {}

func (x *DoubleSignEvidence) ProtoReflect() protoreflect.Message {
	mi := &file_bft_proto_msgTypes[1]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use DoubleSignEvidence.ProtoReflect.Descriptor instead.
func (*DoubleSignEvidence) Descriptor() ([]byte, []int) {
	return file_bft_proto_rawDescGZIP(), []int{1}
}

func (x *DoubleSignEvidence) GetVoteA() *lib.QuorumCertificate {
	if x != nil {
		return x.VoteA
	}
	return nil
}

func (x *DoubleSignEvidence) GetVoteB() *lib.QuorumCertificate {
	if x != nil {
		return x.VoteB
	}
	return nil
}

// double_sign_evidences is a de-duplicated list of double sign evidence
type DoubleSignEvidences struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// evidence: a list of double sign evidence
	Evidence []*DoubleSignEvidence `protobuf:"bytes,1,rep,name=Evidence,proto3" json:"evidence"` // @gotags: json:"evidence"
	// de-duplicator: a map structure that prevents accidental collision of evidence in the list
	DeDuplicator  map[string]bool `protobuf:"bytes,2,rep,name=DeDuplicator,proto3" json:"deduplicator" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` // @gotags: json:"deduplicator"
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *DoubleSignEvidences) Reset() {
	*x = DoubleSignEvidences{}
	mi := &file_bft_proto_msgTypes[2]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *DoubleSignEvidences) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*DoubleSignEvidences) ProtoMessage() {}

func (x *DoubleSignEvidences) ProtoReflect() protoreflect.Message {
	mi := &file_bft_proto_msgTypes[2]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use DoubleSignEvidences.ProtoReflect.Descriptor instead.
func (*DoubleSignEvidences) Descriptor() ([]byte, []int) {
	return file_bft_proto_rawDescGZIP(), []int{2}
}

func (x *DoubleSignEvidences) GetEvidence() []*DoubleSignEvidence {
	if x != nil {
		return x.Evidence
	}
	return nil
}

func (x *DoubleSignEvidences) GetDeDuplicator() map[string]bool {
	if x != nil {
		return x.DeDuplicator
	}
	return nil
}

var File_bft_proto protoreflect.FileDescriptor

const file_bft_proto_rawDesc = "" +
	"\n" +
	"\tbft.proto\x12\x05types\x1a\x0fconsensus.proto\x1a\fcrypto.proto\x1a\x11certificate.proto\x1a\btx.proto\"\x97\x03\n" +
	"\aMessage\x12#\n" +
	"\x06header\x18\x01 \x01(\v2\v.types.ViewR\x06header\x12\"\n" +
	"\x03vrf\x18\x02 \x01(\v2\x10.types.SignatureR\x03vrf\x12(\n" +
	"\x02qc\x18\x03 \x01(\v2\x18.types.QuorumCertificateR\x02qc\x121\n" +
	"\ahigh_qc\x18\x04 \x01(\v2\x18.types.QuorumCertificateR\x06highQc\x12T\n" +
	"\x19last_double_sign_evidence\x18\x05 \x03(\v2\x19.types.DoubleSignEvidenceR\x16lastDoubleSignEvidence\x12\x1c\n" +
	"\x03vdf\x18\x06 \x01(\v2\n" +
	".types.VDFR\x03vdf\x12.\n" +
	"\tsignature\x18\a \x01(\v2\x10.types.SignatureR\tsignature\x12\x1c\n" +
	"\ttimestamp\x18\b \x01(\x04R\ttimestamp\x12$\n" +
	"\rrcBuildHeight\x18\t \x01(\x04R\rrcBuildHeight\"v\n" +
	"\x12DoubleSignEvidence\x12/\n" +
	"\x06vote_a\x18\x01 \x01(\v2\x18.types.QuorumCertificateR\x05voteA\x12/\n" +
	"\x06vote_b\x18\x02 \x01(\v2\x18.types.QuorumCertificateR\x05voteB\"\xdf\x01\n" +
	"\x13DoubleSignEvidences\x125\n" +
	"\bEvidence\x18\x01 \x03(\v2\x19.types.DoubleSignEvidenceR\bEvidence\x12P\n" +
	"\fDeDuplicator\x18\x02 \x03(\v2,.types.DoubleSignEvidences.DeDuplicatorEntryR\fDeDuplicator\x1a?\n" +
	"\x11DeDuplicatorEntry\x12\x10\n" +
	"\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
	"\x05value\x18\x02 \x01(\bR\x05value:\x028\x01B&Z$github.com/canopy-network/canopy/bftb\x06proto3"

var (
	file_bft_proto_rawDescOnce sync.Once
	file_bft_proto_rawDescData []byte
)

func file_bft_proto_rawDescGZIP() []byte {
	file_bft_proto_rawDescOnce.Do(func() {
		file_bft_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_bft_proto_rawDesc), len(file_bft_proto_rawDesc)))
	})
	return file_bft_proto_rawDescData
}

var file_bft_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_bft_proto_goTypes = []any{
	(*Message)(nil),               // 0: types.Message
	(*DoubleSignEvidence)(nil),    // 1: types.DoubleSignEvidence
	(*DoubleSignEvidences)(nil),   // 2: types.DoubleSignEvidences
	nil,                           // 3: types.DoubleSignEvidences.DeDuplicatorEntry
	(*lib.View)(nil),              // 4: types.View
	(*lib.Signature)(nil),         // 5: types.Signature
	(*lib.QuorumCertificate)(nil), // 6: types.QuorumCertificate
	(*crypto.VDF)(nil),            // 7: types.VDF
}
var file_bft_proto_depIdxs = []int32{
	4,  // 0: types.Message.header:type_name -> types.View
	5,  // 1: types.Message.vrf:type_name -> types.Signature
	6,  // 2: types.Message.qc:type_name -> types.QuorumCertificate
	6,  // 3: types.Message.high_qc:type_name -> types.QuorumCertificate
	1,  // 4: types.Message.last_double_sign_evidence:type_name -> types.DoubleSignEvidence
	7,  // 5: types.Message.vdf:type_name -> types.VDF
	5,  // 6: types.Message.signature:type_name -> types.Signature
	6,  // 7: types.DoubleSignEvidence.vote_a:type_name -> types.QuorumCertificate
	6,  // 8: types.DoubleSignEvidence.vote_b:type_name -> types.QuorumCertificate
	1,  // 9: types.DoubleSignEvidences.Evidence:type_name -> types.DoubleSignEvidence
	3,  // 10: types.DoubleSignEvidences.DeDuplicator:type_name -> types.DoubleSignEvidences.DeDuplicatorEntry
	11, // [11:11] is the sub-list for method output_type
	11, // [11:11] is the sub-list for method input_type
	11, // [11:11] is the sub-list for extension type_name
	11, // [11:11] is the sub-list for extension extendee
	0,  // [0:11] is the sub-list for field type_name
}

func init() { file_bft_proto_init() }
func file_bft_proto_init() {
	if File_bft_proto != nil {
		return
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_bft_proto_rawDesc), len(file_bft_proto_rawDesc)),
			NumEnums:      0,
			NumMessages:   4,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_bft_proto_goTypes,
		DependencyIndexes: file_bft_proto_depIdxs,
		MessageInfos:      file_bft_proto_msgTypes,
	}.Build()
	File_bft_proto = out.File
	file_bft_proto_goTypes = nil
	file_bft_proto_depIdxs = nil
}
