From 38d6e1282872b14476750b31beeb0a2d57e99cf2 Mon Sep 17 00:00:00 2001 From: Alejandro Ranchal-Pedrosa Date: Fri, 28 Jul 2023 16:38:19 +0200 Subject: [PATCH 01/14] Implement new protos --- pkg/net/grpc/grpctransport.pb.go | 4 +- pkg/net/grpc/grpctransport_grpc.pb.go | 4 + pkg/pb/apppb/apppb.pb.go | 4 +- pkg/pb/availabilitypb/availabilitypb.pb.go | 4 +- .../availabilitypb/batchdbpb/batchdbpb.pb.go | 4 +- pkg/pb/availabilitypb/mscpb/mscpb.pb.go | 4 +- pkg/pb/batchfetcherpb/batchfetcherpb.pb.go | 4 +- pkg/pb/bcbpb/bcbpb.pb.go | 4 +- pkg/pb/checkpointpb/checkpointpb.pb.go | 4 +- .../chkpvalidatorpb/chkpvalidatorpb.pb.go | 4 +- pkg/pb/contextstorepb/contextstorepb.pb.go | 4 +- pkg/pb/cryptopb/cryptopb.pb.go | 4 +- pkg/pb/dslpb/dslpb.pb.go | 4 +- pkg/pb/eventpb/eventpb.pb.go | 337 ++++++++++-------- pkg/pb/eventpb/eventpb.pb.mir.go | 1 + pkg/pb/eventpb/oneof_interfaces.mir.go | 5 + pkg/pb/eventpb/types/types.mir.go | 77 ++-- pkg/pb/factorypb/factorypb.pb.go | 175 +++++---- pkg/pb/factorypb/factorypb.pb.mir.go | 1 + pkg/pb/factorypb/oneof_interfaces.mir.go | 5 + pkg/pb/factorypb/types/types.mir.go | 27 ++ pkg/pb/hasherpb/hasherpb.pb.go | 4 +- pkg/pb/isspb/isspb.pb.go | 4 +- pkg/pb/mempoolpb/mempoolpb.pb.go | 4 +- pkg/pb/messagepb/messagepb.pb.go | 123 ++++--- pkg/pb/messagepb/messagepb.pb.mir.go | 1 + pkg/pb/messagepb/oneof_interfaces.mir.go | 5 + pkg/pb/messagepb/types/types.mir.go | 27 ++ pkg/pb/mir/codegen_extensions.pb.go | 40 +-- pkg/pb/net/codegen_extensions.pb.go | 22 +- pkg/pb/ordererpb/ordererpb.pb.go | 4 +- .../pprepvalidatorpb/pprepvalidatorpb.pb.go | 4 +- pkg/pb/pbftpb/pbftpb.pb.go | 4 +- pkg/pb/pingpongpb/pingpongpb.pb.go | 4 +- pkg/pb/recordingpb/recordingpb.pb.go | 4 +- pkg/pb/testerpb/testerpb.pb.go | 4 +- pkg/pb/threshcryptopb/threshcryptopb.pb.go | 4 +- pkg/pb/transportpb/transportpb.pb.go | 4 +- pkg/pb/trantorpb/trantorpb.pb.go | 4 +- .../transactionreceiver.pb.go | 4 +- .../transactionreceiver_grpc.pb.go | 4 + pkg/util/maputil/maputil.go | 10 + .../accountabilitypb/accountabilitypb.proto | 89 +++++ .../availabilitypb/batchdbpb/batchdbpb.proto | 12 +- protos/eventpb/eventpb.proto | 2 + protos/factorypb/factorypb.proto | 3 +- protos/generate.go | 2 + protos/messagepb/messagepb.proto | 15 +- 48 files changed, 688 insertions(+), 399 deletions(-) create mode 100644 protos/accountabilitypb/accountabilitypb.proto diff --git a/pkg/net/grpc/grpctransport.pb.go b/pkg/net/grpc/grpctransport.pb.go index 4d1221563..c23082f41 100644 --- a/pkg/net/grpc/grpctransport.pb.go +++ b/pkg/net/grpc/grpctransport.pb.go @@ -5,8 +5,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0-devel -// protoc v3.14.0 +// protoc-gen-go v1.28.1 +// protoc v3.12.4 // source: net/grpc/grpctransport.proto package grpc diff --git a/pkg/net/grpc/grpctransport_grpc.pb.go b/pkg/net/grpc/grpctransport_grpc.pb.go index ba59dbbbe..57d61cd29 100644 --- a/pkg/net/grpc/grpctransport_grpc.pb.go +++ b/pkg/net/grpc/grpctransport_grpc.pb.go @@ -1,4 +1,8 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.2.0 +// - protoc v3.12.4 +// source: net/grpc/grpctransport.proto package grpc diff --git a/pkg/pb/apppb/apppb.pb.go b/pkg/pb/apppb/apppb.pb.go index e06601992..6b6db8d4b 100644 --- a/pkg/pb/apppb/apppb.pb.go +++ b/pkg/pb/apppb/apppb.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0-devel -// protoc v3.14.0 +// protoc-gen-go v1.28.1 +// protoc v3.12.4 // source: apppb/apppb.proto package apppb diff --git a/pkg/pb/availabilitypb/availabilitypb.pb.go b/pkg/pb/availabilitypb/availabilitypb.pb.go index 28985f452..455dc3cd4 100644 --- a/pkg/pb/availabilitypb/availabilitypb.pb.go +++ b/pkg/pb/availabilitypb/availabilitypb.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0-devel -// protoc v3.14.0 +// protoc-gen-go v1.28.1 +// protoc v3.12.4 // source: availabilitypb/availabilitypb.proto package availabilitypb diff --git a/pkg/pb/availabilitypb/batchdbpb/batchdbpb.pb.go b/pkg/pb/availabilitypb/batchdbpb/batchdbpb.pb.go index 1aeb34ad7..f28106019 100644 --- a/pkg/pb/availabilitypb/batchdbpb/batchdbpb.pb.go +++ b/pkg/pb/availabilitypb/batchdbpb/batchdbpb.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0-devel -// protoc v3.14.0 +// protoc-gen-go v1.28.1 +// protoc v3.12.4 // source: availabilitypb/batchdbpb/batchdbpb.proto package batchdbpb diff --git a/pkg/pb/availabilitypb/mscpb/mscpb.pb.go b/pkg/pb/availabilitypb/mscpb/mscpb.pb.go index b12d59ada..a3885ce80 100644 --- a/pkg/pb/availabilitypb/mscpb/mscpb.pb.go +++ b/pkg/pb/availabilitypb/mscpb/mscpb.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0-devel -// protoc v3.14.0 +// protoc-gen-go v1.28.1 +// protoc v3.12.4 // source: availabilitypb/mscpb/mscpb.proto package mscpb diff --git a/pkg/pb/batchfetcherpb/batchfetcherpb.pb.go b/pkg/pb/batchfetcherpb/batchfetcherpb.pb.go index f67eaeecf..8a598b960 100644 --- a/pkg/pb/batchfetcherpb/batchfetcherpb.pb.go +++ b/pkg/pb/batchfetcherpb/batchfetcherpb.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0-devel -// protoc v3.14.0 +// protoc-gen-go v1.28.1 +// protoc v3.12.4 // source: batchfetcherpb/batchfetcherpb.proto package batchfetcherpb diff --git a/pkg/pb/bcbpb/bcbpb.pb.go b/pkg/pb/bcbpb/bcbpb.pb.go index 67620e1e8..d1ee4d968 100644 --- a/pkg/pb/bcbpb/bcbpb.pb.go +++ b/pkg/pb/bcbpb/bcbpb.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0-devel -// protoc v3.14.0 +// protoc-gen-go v1.28.1 +// protoc v3.12.4 // source: bcbpb/bcbpb.proto package bcbpb diff --git a/pkg/pb/checkpointpb/checkpointpb.pb.go b/pkg/pb/checkpointpb/checkpointpb.pb.go index c3e6da9de..1ce54771c 100644 --- a/pkg/pb/checkpointpb/checkpointpb.pb.go +++ b/pkg/pb/checkpointpb/checkpointpb.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0-devel -// protoc v3.14.0 +// protoc-gen-go v1.28.1 +// protoc v3.12.4 // source: checkpointpb/checkpointpb.proto package checkpointpb diff --git a/pkg/pb/checkpointpb/chkpvalidatorpb/chkpvalidatorpb.pb.go b/pkg/pb/checkpointpb/chkpvalidatorpb/chkpvalidatorpb.pb.go index a3347588f..9db35822d 100644 --- a/pkg/pb/checkpointpb/chkpvalidatorpb/chkpvalidatorpb.pb.go +++ b/pkg/pb/checkpointpb/chkpvalidatorpb/chkpvalidatorpb.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0-devel -// protoc v3.14.0 +// protoc-gen-go v1.28.1 +// protoc v3.12.4 // source: checkpointpb/chkpvalidatorpb/chkpvalidatorpb.proto package chkpvalidatorpb diff --git a/pkg/pb/contextstorepb/contextstorepb.pb.go b/pkg/pb/contextstorepb/contextstorepb.pb.go index 91d4deb90..c52e50a4f 100644 --- a/pkg/pb/contextstorepb/contextstorepb.pb.go +++ b/pkg/pb/contextstorepb/contextstorepb.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0-devel -// protoc v3.14.0 +// protoc-gen-go v1.28.1 +// protoc v3.12.4 // source: contextstorepb/contextstorepb.proto package contextstorepb diff --git a/pkg/pb/cryptopb/cryptopb.pb.go b/pkg/pb/cryptopb/cryptopb.pb.go index 8c1406f2f..6fe78da38 100644 --- a/pkg/pb/cryptopb/cryptopb.pb.go +++ b/pkg/pb/cryptopb/cryptopb.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0-devel -// protoc v3.14.0 +// protoc-gen-go v1.28.1 +// protoc v3.12.4 // source: cryptopb/cryptopb.proto package cryptopb diff --git a/pkg/pb/dslpb/dslpb.pb.go b/pkg/pb/dslpb/dslpb.pb.go index 9080eddbb..198ed330e 100644 --- a/pkg/pb/dslpb/dslpb.pb.go +++ b/pkg/pb/dslpb/dslpb.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0-devel -// protoc v3.14.0 +// protoc-gen-go v1.28.1 +// protoc v3.12.4 // source: dslpb/dslpb.proto package dslpb diff --git a/pkg/pb/eventpb/eventpb.pb.go b/pkg/pb/eventpb/eventpb.pb.go index 4fbd16948..82ce1470a 100644 --- a/pkg/pb/eventpb/eventpb.pb.go +++ b/pkg/pb/eventpb/eventpb.pb.go @@ -1,12 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0-devel -// protoc v3.14.0 +// protoc-gen-go v1.28.1 +// protoc v3.12.4 // source: eventpb/eventpb.proto package eventpb import ( + accountabilitypb "github.com/filecoin-project/mir/pkg/pb/accountabilitypb" apppb "github.com/filecoin-project/mir/pkg/pb/apppb" availabilitypb "github.com/filecoin-project/mir/pkg/pb/availabilitypb" batchdbpb "github.com/filecoin-project/mir/pkg/pb/availabilitypb/batchdbpb" @@ -26,9 +27,9 @@ import ( testerpb "github.com/filecoin-project/mir/pkg/pb/testerpb" threshcryptopb "github.com/filecoin-project/mir/pkg/pb/threshcryptopb" transportpb "github.com/filecoin-project/mir/pkg/pb/transportpb" + wrappers "github.com/golang/protobuf/ptypes/wrappers" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" reflect "reflect" sync "sync" ) @@ -66,6 +67,7 @@ type Event struct { // *Event_Transport // *Event_ChkpValidator // *Event_PprepValiadtor + // *Event_Accountability // *Event_PingPong // *Event_TestingString // *Event_TestingUint @@ -253,6 +255,13 @@ func (x *Event) GetPprepValiadtor() *pprepvalidatorpb.Event { return nil } +func (x *Event) GetAccountability() *accountabilitypb.Event { + if x, ok := x.GetType().(*Event_Accountability); ok { + return x.Accountability + } + return nil +} + func (x *Event) GetPingPong() *pingpongpb.Event { if x, ok := x.GetType().(*Event_PingPong); ok { return x.PingPong @@ -260,14 +269,14 @@ func (x *Event) GetPingPong() *pingpongpb.Event { return nil } -func (x *Event) GetTestingString() *wrapperspb.StringValue { +func (x *Event) GetTestingString() *wrappers.StringValue { if x, ok := x.GetType().(*Event_TestingString); ok { return x.TestingString } return nil } -func (x *Event) GetTestingUint() *wrapperspb.UInt64Value { +func (x *Event) GetTestingUint() *wrappers.UInt64Value { if x, ok := x.GetType().(*Event_TestingUint); ok { return x.TestingUint } @@ -367,6 +376,10 @@ type Event_PprepValiadtor struct { PprepValiadtor *pprepvalidatorpb.Event `protobuf:"bytes,25,opt,name=pprep_valiadtor,json=pprepValiadtor,proto3,oneof"` } +type Event_Accountability struct { + Accountability *accountabilitypb.Event `protobuf:"bytes,26,opt,name=accountability,proto3,oneof"` +} + type Event_PingPong struct { // Events for code samples PingPong *pingpongpb.Event `protobuf:"bytes,200,opt,name=ping_pong,json=pingPong,proto3,oneof"` @@ -374,11 +387,11 @@ type Event_PingPong struct { type Event_TestingString struct { // for unit-tests - TestingString *wrapperspb.StringValue `protobuf:"bytes,301,opt,name=testingString,proto3,oneof"` + TestingString *wrappers.StringValue `protobuf:"bytes,301,opt,name=testingString,proto3,oneof"` } type Event_TestingUint struct { - TestingUint *wrapperspb.UInt64Value `protobuf:"bytes,302,opt,name=testingUint,proto3,oneof"` + TestingUint *wrappers.UInt64Value `protobuf:"bytes,302,opt,name=testingUint,proto3,oneof"` } type Event_Tester struct { @@ -421,6 +434,8 @@ func (*Event_ChkpValidator) isEvent_Type() {} func (*Event_PprepValiadtor) isEvent_Type() {} +func (*Event_Accountability) isEvent_Type() {} + func (*Event_PingPong) isEvent_Type() {} func (*Event_TestingString) isEvent_Type() {} @@ -770,141 +785,148 @@ var file_eventpb_eventpb_proto_rawDesc = []byte{ 0x73, 0x70, 0x6f, 0x72, 0x74, 0x70, 0x62, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x70, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, 0x70, 0x62, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, 0x70, 0x62, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x1c, 0x6d, 0x69, 0x72, 0x2f, 0x63, 0x6f, 0x64, 0x65, 0x67, 0x65, 0x6e, 0x5f, - 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x22, 0xf9, 0x09, 0x0a, 0x05, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x57, 0x0a, 0x0b, 0x64, 0x65, - 0x73, 0x74, 0x5f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x36, 0x82, 0xa6, 0x1d, 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x66, 0x69, 0x6c, 0x65, 0x63, 0x6f, 0x69, 0x6e, 0x2d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, - 0x2f, 0x6d, 0x69, 0x72, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x4d, - 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x49, 0x44, 0x52, 0x0a, 0x64, 0x65, 0x73, 0x74, 0x4d, 0x6f, 0x64, - 0x75, 0x6c, 0x65, 0x12, 0x23, 0x0a, 0x04, 0x69, 0x6e, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x0d, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x49, 0x6e, 0x69, 0x74, - 0x48, 0x00, 0x52, 0x04, 0x69, 0x6e, 0x69, 0x74, 0x12, 0x2b, 0x0a, 0x05, 0x74, 0x69, 0x6d, 0x65, - 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x70, - 0x62, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x05, - 0x74, 0x69, 0x6d, 0x65, 0x72, 0x12, 0x29, 0x0a, 0x06, 0x68, 0x61, 0x73, 0x68, 0x65, 0x72, 0x18, - 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x65, 0x72, 0x70, 0x62, - 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x06, 0x68, 0x61, 0x73, 0x68, 0x65, 0x72, - 0x12, 0x20, 0x0a, 0x03, 0x62, 0x63, 0x62, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, - 0x62, 0x63, 0x62, 0x70, 0x62, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x03, 0x62, - 0x63, 0x62, 0x12, 0x2c, 0x0a, 0x07, 0x6d, 0x65, 0x6d, 0x70, 0x6f, 0x6f, 0x6c, 0x18, 0x0c, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6d, 0x65, 0x6d, 0x70, 0x6f, 0x6f, 0x6c, 0x70, 0x62, 0x2e, - 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x07, 0x6d, 0x65, 0x6d, 0x70, 0x6f, 0x6f, 0x6c, - 0x12, 0x3b, 0x0a, 0x0c, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, - 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, + 0x74, 0x6f, 0x1a, 0x27, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x62, 0x69, 0x6c, 0x69, + 0x74, 0x79, 0x70, 0x62, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x62, 0x69, 0x6c, + 0x69, 0x74, 0x79, 0x70, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x6d, 0x69, 0x72, + 0x2f, 0x63, 0x6f, 0x64, 0x65, 0x67, 0x65, 0x6e, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xbc, 0x0a, 0x0a, 0x05, 0x45, 0x76, + 0x65, 0x6e, 0x74, 0x12, 0x57, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x6f, 0x64, 0x75, + 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x36, 0x82, 0xa6, 0x1d, 0x32, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x63, 0x6f, 0x69, + 0x6e, 0x2d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x6d, 0x69, 0x72, 0x2f, 0x70, 0x6b, + 0x67, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x49, 0x44, + 0x52, 0x0a, 0x64, 0x65, 0x73, 0x74, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x23, 0x0a, 0x04, + 0x69, 0x6e, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x65, 0x76, 0x65, + 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x49, 0x6e, 0x69, 0x74, 0x48, 0x00, 0x52, 0x04, 0x69, 0x6e, 0x69, + 0x74, 0x12, 0x2b, 0x0a, 0x05, 0x74, 0x69, 0x6d, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x13, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x72, + 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x05, 0x74, 0x69, 0x6d, 0x65, 0x72, 0x12, 0x29, + 0x0a, 0x06, 0x68, 0x61, 0x73, 0x68, 0x65, 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, + 0x2e, 0x68, 0x61, 0x73, 0x68, 0x65, 0x72, 0x70, 0x62, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, + 0x00, 0x52, 0x06, 0x68, 0x61, 0x73, 0x68, 0x65, 0x72, 0x12, 0x20, 0x0a, 0x03, 0x62, 0x63, 0x62, + 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x62, 0x63, 0x62, 0x70, 0x62, 0x2e, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x03, 0x62, 0x63, 0x62, 0x12, 0x2c, 0x0a, 0x07, 0x6d, + 0x65, 0x6d, 0x70, 0x6f, 0x6f, 0x6c, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6d, + 0x65, 0x6d, 0x70, 0x6f, 0x6f, 0x6c, 0x70, 0x62, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, + 0x52, 0x07, 0x6d, 0x65, 0x6d, 0x70, 0x6f, 0x6f, 0x6c, 0x12, 0x3b, 0x0a, 0x0c, 0x61, 0x76, 0x61, + 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x15, 0x2e, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x70, 0x62, + 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0c, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, + 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x2d, 0x0a, 0x08, 0x62, 0x61, 0x74, 0x63, 0x68, 0x5f, + 0x64, 0x62, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x62, 0x61, 0x74, 0x63, 0x68, + 0x64, 0x62, 0x70, 0x62, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x07, 0x62, 0x61, + 0x74, 0x63, 0x68, 0x44, 0x62, 0x12, 0x3c, 0x0a, 0x0d, 0x62, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x66, + 0x65, 0x74, 0x63, 0x68, 0x65, 0x72, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x62, + 0x61, 0x74, 0x63, 0x68, 0x66, 0x65, 0x74, 0x63, 0x68, 0x65, 0x72, 0x70, 0x62, 0x2e, 0x45, 0x76, + 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0c, 0x62, 0x61, 0x74, 0x63, 0x68, 0x46, 0x65, 0x74, 0x63, + 0x68, 0x65, 0x72, 0x12, 0x3c, 0x0a, 0x0d, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x5f, 0x63, 0x72, + 0x79, 0x70, 0x74, 0x6f, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x68, 0x72, + 0x65, 0x73, 0x68, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x70, 0x62, 0x2e, 0x45, 0x76, 0x65, 0x6e, + 0x74, 0x48, 0x00, 0x52, 0x0c, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x43, 0x72, 0x79, 0x70, 0x74, + 0x6f, 0x12, 0x35, 0x0a, 0x0a, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, + 0x11, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, + 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0a, 0x63, 0x68, + 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x2c, 0x0a, 0x07, 0x66, 0x61, 0x63, 0x74, + 0x6f, 0x72, 0x79, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x66, 0x61, 0x63, 0x74, + 0x6f, 0x72, 0x79, 0x70, 0x62, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x07, 0x66, + 0x61, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x20, 0x0a, 0x03, 0x69, 0x73, 0x73, 0x18, 0x13, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x69, 0x73, 0x73, 0x70, 0x62, 0x2e, 0x45, 0x76, 0x65, 0x6e, + 0x74, 0x48, 0x00, 0x52, 0x03, 0x69, 0x73, 0x73, 0x12, 0x2c, 0x0a, 0x07, 0x6f, 0x72, 0x64, 0x65, + 0x72, 0x65, 0x72, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6f, 0x72, 0x64, 0x65, + 0x72, 0x65, 0x72, 0x70, 0x62, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x07, 0x6f, + 0x72, 0x64, 0x65, 0x72, 0x65, 0x72, 0x12, 0x29, 0x0a, 0x06, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, + 0x18, 0x15, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x70, + 0x62, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x06, 0x63, 0x72, 0x79, 0x70, 0x74, + 0x6f, 0x12, 0x20, 0x0a, 0x03, 0x61, 0x70, 0x70, 0x18, 0x16, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, + 0x2e, 0x61, 0x70, 0x70, 0x70, 0x62, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x03, + 0x61, 0x70, 0x70, 0x12, 0x32, 0x0a, 0x09, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, + 0x18, 0x17, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, + 0x72, 0x74, 0x70, 0x62, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x09, 0x74, 0x72, + 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x3f, 0x0a, 0x0e, 0x63, 0x68, 0x6b, 0x70, 0x5f, + 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x18, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x16, 0x2e, 0x63, 0x68, 0x6b, 0x70, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x70, + 0x62, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0d, 0x63, 0x68, 0x6b, 0x70, 0x56, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x42, 0x0a, 0x0f, 0x70, 0x70, 0x72, 0x65, + 0x70, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x61, 0x64, 0x74, 0x6f, 0x72, 0x18, 0x19, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x17, 0x2e, 0x70, 0x70, 0x72, 0x65, 0x70, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x6f, 0x72, 0x70, 0x62, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0e, 0x70, 0x70, + 0x72, 0x65, 0x70, 0x56, 0x61, 0x6c, 0x69, 0x61, 0x64, 0x74, 0x6f, 0x72, 0x12, 0x41, 0x0a, 0x0e, + 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x1a, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x70, 0x62, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, - 0x0c, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x2d, 0x0a, - 0x08, 0x62, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x64, 0x62, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x10, 0x2e, 0x62, 0x61, 0x74, 0x63, 0x68, 0x64, 0x62, 0x70, 0x62, 0x2e, 0x45, 0x76, 0x65, 0x6e, - 0x74, 0x48, 0x00, 0x52, 0x07, 0x62, 0x61, 0x74, 0x63, 0x68, 0x44, 0x62, 0x12, 0x3c, 0x0a, 0x0d, - 0x62, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x66, 0x65, 0x74, 0x63, 0x68, 0x65, 0x72, 0x18, 0x0f, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x62, 0x61, 0x74, 0x63, 0x68, 0x66, 0x65, 0x74, 0x63, 0x68, - 0x65, 0x72, 0x70, 0x62, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0c, 0x62, 0x61, - 0x74, 0x63, 0x68, 0x46, 0x65, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x3c, 0x0a, 0x0d, 0x74, 0x68, - 0x72, 0x65, 0x73, 0x68, 0x5f, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x18, 0x10, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, - 0x70, 0x62, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0c, 0x74, 0x68, 0x72, 0x65, - 0x73, 0x68, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x12, 0x35, 0x0a, 0x0a, 0x63, 0x68, 0x65, 0x63, - 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x63, - 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x45, 0x76, 0x65, 0x6e, - 0x74, 0x48, 0x00, 0x52, 0x0a, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, - 0x2c, 0x0a, 0x07, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x10, 0x2e, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x70, 0x62, 0x2e, 0x45, 0x76, 0x65, - 0x6e, 0x74, 0x48, 0x00, 0x52, 0x07, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x20, 0x0a, - 0x03, 0x69, 0x73, 0x73, 0x18, 0x13, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x69, 0x73, 0x73, - 0x70, 0x62, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x03, 0x69, 0x73, 0x73, 0x12, - 0x2c, 0x0a, 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x65, 0x72, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x10, 0x2e, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x65, 0x72, 0x70, 0x62, 0x2e, 0x45, 0x76, 0x65, - 0x6e, 0x74, 0x48, 0x00, 0x52, 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x65, 0x72, 0x12, 0x29, 0x0a, - 0x06, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x18, 0x15, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, - 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x70, 0x62, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, - 0x52, 0x06, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x12, 0x20, 0x0a, 0x03, 0x61, 0x70, 0x70, 0x18, - 0x16, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x61, 0x70, 0x70, 0x70, 0x62, 0x2e, 0x45, 0x76, - 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x03, 0x61, 0x70, 0x70, 0x12, 0x32, 0x0a, 0x09, 0x74, 0x72, - 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x17, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, - 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x70, 0x62, 0x2e, 0x45, 0x76, 0x65, 0x6e, - 0x74, 0x48, 0x00, 0x52, 0x09, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x3f, - 0x0a, 0x0e, 0x63, 0x68, 0x6b, 0x70, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x18, 0x18, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x63, 0x68, 0x6b, 0x70, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x70, 0x62, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, - 0x52, 0x0d, 0x63, 0x68, 0x6b, 0x70, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, - 0x42, 0x0a, 0x0f, 0x70, 0x70, 0x72, 0x65, 0x70, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x61, 0x64, 0x74, - 0x6f, 0x72, 0x18, 0x19, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x70, 0x70, 0x72, 0x65, 0x70, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x70, 0x62, 0x2e, 0x45, 0x76, 0x65, 0x6e, - 0x74, 0x48, 0x00, 0x52, 0x0e, 0x70, 0x70, 0x72, 0x65, 0x70, 0x56, 0x61, 0x6c, 0x69, 0x61, 0x64, - 0x74, 0x6f, 0x72, 0x12, 0x31, 0x0a, 0x09, 0x70, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x6f, 0x6e, 0x67, - 0x18, 0xc8, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x70, 0x69, 0x6e, 0x67, 0x70, 0x6f, - 0x6e, 0x67, 0x70, 0x62, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x08, 0x70, 0x69, - 0x6e, 0x67, 0x50, 0x6f, 0x6e, 0x67, 0x12, 0x45, 0x0a, 0x0d, 0x74, 0x65, 0x73, 0x74, 0x69, 0x6e, - 0x67, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x18, 0xad, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x48, 0x00, 0x52, 0x0d, - 0x74, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x41, 0x0a, - 0x0b, 0x74, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x55, 0x69, 0x6e, 0x74, 0x18, 0xae, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x48, 0x00, 0x52, 0x0b, 0x74, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x55, 0x69, 0x6e, 0x74, - 0x12, 0x2b, 0x0a, 0x06, 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, 0x18, 0xaf, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x10, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, 0x70, 0x62, 0x2e, 0x54, 0x65, 0x73, - 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x06, 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, 0x12, 0x29, 0x0a, - 0x04, 0x6e, 0x65, 0x78, 0x74, 0x18, 0x90, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x65, - 0x76, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x42, 0x04, 0x90, 0xa6, - 0x1d, 0x01, 0x52, 0x04, 0x6e, 0x65, 0x78, 0x74, 0x3a, 0x04, 0x88, 0xa6, 0x1d, 0x01, 0x42, 0x0c, - 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x04, 0x80, 0xa6, 0x1d, 0x01, 0x22, 0x0c, 0x0a, 0x04, - 0x49, 0x6e, 0x69, 0x74, 0x3a, 0x04, 0x98, 0xa6, 0x1d, 0x01, 0x22, 0xc6, 0x01, 0x0a, 0x0a, 0x54, - 0x69, 0x6d, 0x65, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x2b, 0x0a, 0x05, 0x64, 0x65, 0x6c, - 0x61, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, - 0x70, 0x62, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x72, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x48, 0x00, 0x52, - 0x05, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x12, 0x2e, 0x0a, 0x06, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x70, 0x62, - 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x72, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x48, 0x00, 0x52, 0x06, - 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x12, 0x47, 0x0a, 0x0f, 0x67, 0x61, 0x72, 0x62, 0x61, 0x67, - 0x65, 0x5f, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1c, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x72, 0x47, - 0x61, 0x72, 0x62, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x48, 0x00, 0x52, - 0x0e, 0x67, 0x61, 0x72, 0x62, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x3a, - 0x04, 0x90, 0xa6, 0x1d, 0x01, 0x42, 0x0c, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x04, 0x80, - 0xa6, 0x1d, 0x01, 0x22, 0x9e, 0x01, 0x0a, 0x0a, 0x54, 0x69, 0x6d, 0x65, 0x72, 0x44, 0x65, 0x6c, - 0x61, 0x79, 0x12, 0x36, 0x0a, 0x0f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x5f, 0x74, 0x6f, 0x5f, - 0x64, 0x65, 0x6c, 0x61, 0x79, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x65, 0x76, - 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x0d, 0x65, 0x76, 0x65, - 0x6e, 0x74, 0x73, 0x54, 0x6f, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x12, 0x52, 0x0a, 0x05, 0x64, 0x65, + 0x0e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, + 0x31, 0x0a, 0x09, 0x70, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x6f, 0x6e, 0x67, 0x18, 0xc8, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x70, 0x69, 0x6e, 0x67, 0x70, 0x6f, 0x6e, 0x67, 0x70, 0x62, + 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x08, 0x70, 0x69, 0x6e, 0x67, 0x50, 0x6f, + 0x6e, 0x67, 0x12, 0x45, 0x0a, 0x0d, 0x74, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x72, + 0x69, 0x6e, 0x67, 0x18, 0xad, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, + 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x48, 0x00, 0x52, 0x0d, 0x74, 0x65, 0x73, 0x74, + 0x69, 0x6e, 0x67, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x41, 0x0a, 0x0b, 0x74, 0x65, 0x73, + 0x74, 0x69, 0x6e, 0x67, 0x55, 0x69, 0x6e, 0x74, 0x18, 0xae, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x48, 0x00, 0x52, + 0x0b, 0x74, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x55, 0x69, 0x6e, 0x74, 0x12, 0x2b, 0x0a, 0x06, + 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, 0x18, 0xaf, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, + 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, 0x70, 0x62, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x65, 0x72, 0x48, + 0x00, 0x52, 0x06, 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, 0x12, 0x29, 0x0a, 0x04, 0x6e, 0x65, 0x78, + 0x74, 0x18, 0x90, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, + 0x70, 0x62, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x42, 0x04, 0x90, 0xa6, 0x1d, 0x01, 0x52, 0x04, + 0x6e, 0x65, 0x78, 0x74, 0x3a, 0x04, 0x88, 0xa6, 0x1d, 0x01, 0x42, 0x0c, 0x0a, 0x04, 0x74, 0x79, + 0x70, 0x65, 0x12, 0x04, 0x80, 0xa6, 0x1d, 0x01, 0x22, 0x0c, 0x0a, 0x04, 0x49, 0x6e, 0x69, 0x74, + 0x3a, 0x04, 0x98, 0xa6, 0x1d, 0x01, 0x22, 0xc6, 0x01, 0x0a, 0x0a, 0x54, 0x69, 0x6d, 0x65, 0x72, + 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x2b, 0x0a, 0x05, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x54, + 0x69, 0x6d, 0x65, 0x72, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x48, 0x00, 0x52, 0x05, 0x64, 0x65, 0x6c, + 0x61, 0x79, 0x12, 0x2e, 0x0a, 0x06, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x54, 0x69, 0x6d, + 0x65, 0x72, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x48, 0x00, 0x52, 0x06, 0x72, 0x65, 0x70, 0x65, + 0x61, 0x74, 0x12, 0x47, 0x0a, 0x0f, 0x67, 0x61, 0x72, 0x62, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, + 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x65, 0x76, + 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x72, 0x47, 0x61, 0x72, 0x62, 0x61, + 0x67, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x48, 0x00, 0x52, 0x0e, 0x67, 0x61, 0x72, + 0x62, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x3a, 0x04, 0x90, 0xa6, 0x1d, + 0x01, 0x42, 0x0c, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x04, 0x80, 0xa6, 0x1d, 0x01, 0x22, + 0x9e, 0x01, 0x0a, 0x0a, 0x54, 0x69, 0x6d, 0x65, 0x72, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x12, 0x36, + 0x0a, 0x0f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x64, 0x65, 0x6c, 0x61, + 0x79, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x70, + 0x62, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x0d, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x54, + 0x6f, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x12, 0x52, 0x0a, 0x05, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, 0x3c, 0x82, 0xa6, 0x1d, 0x38, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x63, 0x6f, 0x69, 0x6e, 0x2d, 0x70, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x6d, 0x69, 0x72, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x74, + 0x69, 0x6d, 0x65, 0x72, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x05, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x3a, 0x04, 0x98, 0xa6, 0x1d, 0x01, + 0x22, 0x90, 0x02, 0x0a, 0x0b, 0x54, 0x69, 0x6d, 0x65, 0x72, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, + 0x12, 0x38, 0x0a, 0x10, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x72, 0x65, + 0x70, 0x65, 0x61, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x65, 0x76, 0x65, + 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x0e, 0x65, 0x76, 0x65, 0x6e, + 0x74, 0x73, 0x54, 0x6f, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x12, 0x52, 0x0a, 0x05, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, 0x3c, 0x82, 0xa6, 0x1d, 0x38, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x63, 0x6f, 0x69, 0x6e, 0x2d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x6d, 0x69, 0x72, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x72, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x44, - 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x05, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x3a, 0x04, - 0x98, 0xa6, 0x1d, 0x01, 0x22, 0x90, 0x02, 0x0a, 0x0b, 0x54, 0x69, 0x6d, 0x65, 0x72, 0x52, 0x65, - 0x70, 0x65, 0x61, 0x74, 0x12, 0x38, 0x0a, 0x10, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x5f, 0x74, - 0x6f, 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, - 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x0e, - 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x54, 0x6f, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x12, 0x52, - 0x0a, 0x05, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, 0x3c, 0x82, - 0xa6, 0x1d, 0x38, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x66, 0x69, - 0x6c, 0x65, 0x63, 0x6f, 0x69, 0x6e, 0x2d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x6d, - 0x69, 0x72, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x72, 0x2f, 0x74, 0x79, 0x70, - 0x65, 0x73, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x05, 0x64, 0x65, 0x6c, - 0x61, 0x79, 0x12, 0x6d, 0x0a, 0x0f, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x42, 0x44, 0x82, 0xa6, 0x1d, - 0x40, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x66, 0x69, 0x6c, 0x65, - 0x63, 0x6f, 0x69, 0x6e, 0x2d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x6d, 0x69, 0x72, - 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x74, 0x6f, 0x72, 0x2f, 0x74, 0x79, 0x70, - 0x65, 0x73, 0x2e, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x64, 0x65, - 0x78, 0x52, 0x0e, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x64, 0x65, - 0x78, 0x3a, 0x04, 0x98, 0xa6, 0x1d, 0x01, 0x22, 0x8a, 0x01, 0x0a, 0x13, 0x54, 0x69, 0x6d, 0x65, - 0x72, 0x47, 0x61, 0x72, 0x62, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x12, - 0x6d, 0x0a, 0x0f, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x64, - 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x44, 0x82, 0xa6, 0x1d, 0x40, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x63, 0x6f, 0x69, - 0x6e, 0x2d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x6d, 0x69, 0x72, 0x2f, 0x70, 0x6b, - 0x67, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x74, 0x6f, 0x72, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, - 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x0e, - 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x3a, 0x04, - 0x98, 0xa6, 0x1d, 0x01, 0x42, 0x30, 0x5a, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x63, 0x6f, 0x69, 0x6e, 0x2d, 0x70, 0x72, 0x6f, 0x6a, - 0x65, 0x63, 0x74, 0x2f, 0x6d, 0x69, 0x72, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x62, 0x2f, 0x65, - 0x76, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x05, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x12, 0x6d, + 0x0a, 0x0f, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x64, 0x65, + 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x42, 0x44, 0x82, 0xa6, 0x1d, 0x40, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x63, 0x6f, 0x69, 0x6e, + 0x2d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x6d, 0x69, 0x72, 0x2f, 0x70, 0x6b, 0x67, + 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x74, 0x6f, 0x72, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x52, + 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x0e, 0x72, + 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x3a, 0x04, 0x98, + 0xa6, 0x1d, 0x01, 0x22, 0x8a, 0x01, 0x0a, 0x13, 0x54, 0x69, 0x6d, 0x65, 0x72, 0x47, 0x61, 0x72, + 0x62, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x12, 0x6d, 0x0a, 0x0f, 0x72, + 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x04, 0x42, 0x44, 0x82, 0xa6, 0x1d, 0x40, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x63, 0x6f, 0x69, 0x6e, 0x2d, 0x70, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x6d, 0x69, 0x72, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x74, 0x72, + 0x61, 0x6e, 0x74, 0x6f, 0x72, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x52, 0x65, 0x74, 0x65, + 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x0e, 0x72, 0x65, 0x74, 0x65, + 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x3a, 0x04, 0x98, 0xa6, 0x1d, 0x01, + 0x42, 0x30, 0x5a, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x66, + 0x69, 0x6c, 0x65, 0x63, 0x6f, 0x69, 0x6e, 0x2d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, + 0x6d, 0x69, 0x72, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x62, 0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74, + 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -943,10 +965,11 @@ var file_eventpb_eventpb_proto_goTypes = []interface{}{ (*transportpb.Event)(nil), // 19: transportpb.Event (*chkpvalidatorpb.Event)(nil), // 20: chkpvalidatorpb.Event (*pprepvalidatorpb.Event)(nil), // 21: pprepvalidatorpb.Event - (*pingpongpb.Event)(nil), // 22: pingpongpb.Event - (*wrapperspb.StringValue)(nil), // 23: google.protobuf.StringValue - (*wrapperspb.UInt64Value)(nil), // 24: google.protobuf.UInt64Value - (*testerpb.Tester)(nil), // 25: testerpb.Tester + (*accountabilitypb.Event)(nil), // 22: accountabilitypb.Event + (*pingpongpb.Event)(nil), // 23: pingpongpb.Event + (*wrappers.StringValue)(nil), // 24: google.protobuf.StringValue + (*wrappers.UInt64Value)(nil), // 25: google.protobuf.UInt64Value + (*testerpb.Tester)(nil), // 26: testerpb.Tester } var file_eventpb_eventpb_proto_depIdxs = []int32{ 1, // 0: eventpb.Event.init:type_name -> eventpb.Init @@ -967,21 +990,22 @@ var file_eventpb_eventpb_proto_depIdxs = []int32{ 19, // 15: eventpb.Event.transport:type_name -> transportpb.Event 20, // 16: eventpb.Event.chkp_validator:type_name -> chkpvalidatorpb.Event 21, // 17: eventpb.Event.pprep_valiadtor:type_name -> pprepvalidatorpb.Event - 22, // 18: eventpb.Event.ping_pong:type_name -> pingpongpb.Event - 23, // 19: eventpb.Event.testingString:type_name -> google.protobuf.StringValue - 24, // 20: eventpb.Event.testingUint:type_name -> google.protobuf.UInt64Value - 25, // 21: eventpb.Event.tester:type_name -> testerpb.Tester - 0, // 22: eventpb.Event.next:type_name -> eventpb.Event - 3, // 23: eventpb.TimerEvent.delay:type_name -> eventpb.TimerDelay - 4, // 24: eventpb.TimerEvent.repeat:type_name -> eventpb.TimerRepeat - 5, // 25: eventpb.TimerEvent.garbage_collect:type_name -> eventpb.TimerGarbageCollect - 0, // 26: eventpb.TimerDelay.events_to_delay:type_name -> eventpb.Event - 0, // 27: eventpb.TimerRepeat.events_to_repeat:type_name -> eventpb.Event - 28, // [28:28] is the sub-list for method output_type - 28, // [28:28] is the sub-list for method input_type - 28, // [28:28] is the sub-list for extension type_name - 28, // [28:28] is the sub-list for extension extendee - 0, // [0:28] is the sub-list for field type_name + 22, // 18: eventpb.Event.accountability:type_name -> accountabilitypb.Event + 23, // 19: eventpb.Event.ping_pong:type_name -> pingpongpb.Event + 24, // 20: eventpb.Event.testingString:type_name -> google.protobuf.StringValue + 25, // 21: eventpb.Event.testingUint:type_name -> google.protobuf.UInt64Value + 26, // 22: eventpb.Event.tester:type_name -> testerpb.Tester + 0, // 23: eventpb.Event.next:type_name -> eventpb.Event + 3, // 24: eventpb.TimerEvent.delay:type_name -> eventpb.TimerDelay + 4, // 25: eventpb.TimerEvent.repeat:type_name -> eventpb.TimerRepeat + 5, // 26: eventpb.TimerEvent.garbage_collect:type_name -> eventpb.TimerGarbageCollect + 0, // 27: eventpb.TimerDelay.events_to_delay:type_name -> eventpb.Event + 0, // 28: eventpb.TimerRepeat.events_to_repeat:type_name -> eventpb.Event + 29, // [29:29] is the sub-list for method output_type + 29, // [29:29] is the sub-list for method input_type + 29, // [29:29] is the sub-list for extension type_name + 29, // [29:29] is the sub-list for extension extendee + 0, // [0:29] is the sub-list for field type_name } func init() { file_eventpb_eventpb_proto_init() } @@ -1082,6 +1106,7 @@ func file_eventpb_eventpb_proto_init() { (*Event_Transport)(nil), (*Event_ChkpValidator)(nil), (*Event_PprepValiadtor)(nil), + (*Event_Accountability)(nil), (*Event_PingPong)(nil), (*Event_TestingString)(nil), (*Event_TestingUint)(nil), diff --git a/pkg/pb/eventpb/eventpb.pb.mir.go b/pkg/pb/eventpb/eventpb.pb.mir.go index 8808e7d1a..8f0efe432 100644 --- a/pkg/pb/eventpb/eventpb.pb.mir.go +++ b/pkg/pb/eventpb/eventpb.pb.mir.go @@ -26,6 +26,7 @@ func (*Event) ReflectTypeOptions() []reflect.Type { reflect.TypeOf((*Event_Transport)(nil)), reflect.TypeOf((*Event_ChkpValidator)(nil)), reflect.TypeOf((*Event_PprepValiadtor)(nil)), + reflect.TypeOf((*Event_Accountability)(nil)), reflect.TypeOf((*Event_PingPong)(nil)), reflect.TypeOf((*Event_TestingString)(nil)), reflect.TypeOf((*Event_TestingUint)(nil)), diff --git a/pkg/pb/eventpb/oneof_interfaces.mir.go b/pkg/pb/eventpb/oneof_interfaces.mir.go index 2baab82b9..5a127369b 100644 --- a/pkg/pb/eventpb/oneof_interfaces.mir.go +++ b/pkg/pb/eventpb/oneof_interfaces.mir.go @@ -3,6 +3,7 @@ package eventpb import ( + accountabilitypb "github.com/filecoin-project/mir/pkg/pb/accountabilitypb" apppb "github.com/filecoin-project/mir/pkg/pb/apppb" availabilitypb "github.com/filecoin-project/mir/pkg/pb/availabilitypb" batchdbpb "github.com/filecoin-project/mir/pkg/pb/availabilitypb/batchdbpb" @@ -103,6 +104,10 @@ func (w *Event_PprepValiadtor) Unwrap() *pprepvalidatorpb.Event { return w.PprepValiadtor } +func (w *Event_Accountability) Unwrap() *accountabilitypb.Event { + return w.Accountability +} + func (w *Event_PingPong) Unwrap() *pingpongpb.Event { return w.PingPong } diff --git a/pkg/pb/eventpb/types/types.mir.go b/pkg/pb/eventpb/types/types.mir.go index 119300d27..39770ade7 100644 --- a/pkg/pb/eventpb/types/types.mir.go +++ b/pkg/pb/eventpb/types/types.mir.go @@ -4,7 +4,8 @@ package eventpbtypes import ( mirreflect "github.com/filecoin-project/mir/codegen/mirreflect" - types19 "github.com/filecoin-project/mir/codegen/model/types" + types20 "github.com/filecoin-project/mir/codegen/model/types" + types17 "github.com/filecoin-project/mir/pkg/pb/accountabilitypb/types" types13 "github.com/filecoin-project/mir/pkg/pb/apppb/types" types5 "github.com/filecoin-project/mir/pkg/pb/availabilitypb/batchdbpb/types" types4 "github.com/filecoin-project/mir/pkg/pb/availabilitypb/types" @@ -20,12 +21,12 @@ import ( types3 "github.com/filecoin-project/mir/pkg/pb/mempoolpb/types" types16 "github.com/filecoin-project/mir/pkg/pb/ordererpb/pprepvalidatorpb/types" types11 "github.com/filecoin-project/mir/pkg/pb/ordererpb/types" - types17 "github.com/filecoin-project/mir/pkg/pb/pingpongpb/types" - types18 "github.com/filecoin-project/mir/pkg/pb/testerpb/types" + types18 "github.com/filecoin-project/mir/pkg/pb/pingpongpb/types" + types19 "github.com/filecoin-project/mir/pkg/pb/testerpb/types" types7 "github.com/filecoin-project/mir/pkg/pb/threshcryptopb/types" types14 "github.com/filecoin-project/mir/pkg/pb/transportpb/types" - types20 "github.com/filecoin-project/mir/pkg/timer/types" - types21 "github.com/filecoin-project/mir/pkg/trantor/types" + types21 "github.com/filecoin-project/mir/pkg/timer/types" + types22 "github.com/filecoin-project/mir/pkg/trantor/types" types "github.com/filecoin-project/mir/pkg/types" reflectutil "github.com/filecoin-project/mir/pkg/util/reflectutil" wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" @@ -89,14 +90,16 @@ func Event_TypeFromPb(pb eventpb.Event_Type) Event_Type { return &Event_ChkpValidator{ChkpValidator: types15.EventFromPb(pb.ChkpValidator)} case *eventpb.Event_PprepValiadtor: return &Event_PprepValiadtor{PprepValiadtor: types16.EventFromPb(pb.PprepValiadtor)} + case *eventpb.Event_Accountability: + return &Event_Accountability{Accountability: types17.EventFromPb(pb.Accountability)} case *eventpb.Event_PingPong: - return &Event_PingPong{PingPong: types17.EventFromPb(pb.PingPong)} + return &Event_PingPong{PingPong: types18.EventFromPb(pb.PingPong)} case *eventpb.Event_TestingString: return &Event_TestingString{TestingString: pb.TestingString} case *eventpb.Event_TestingUint: return &Event_TestingUint{TestingUint: pb.TestingUint} case *eventpb.Event_Tester: - return &Event_Tester{Tester: types18.TesterFromPb(pb.Tester)} + return &Event_Tester{Tester: types19.TesterFromPb(pb.Tester)} } return nil } @@ -533,13 +536,37 @@ func (*Event_PprepValiadtor) MirReflect() mirreflect.Type { return mirreflect.TypeImpl{PbType_: reflectutil.TypeOf[*eventpb.Event_PprepValiadtor]()} } +type Event_Accountability struct { + Accountability *types17.Event +} + +func (*Event_Accountability) isEvent_Type() {} + +func (w *Event_Accountability) Unwrap() *types17.Event { + return w.Accountability +} + +func (w *Event_Accountability) Pb() eventpb.Event_Type { + if w == nil { + return nil + } + if w.Accountability == nil { + return &eventpb.Event_Accountability{} + } + return &eventpb.Event_Accountability{Accountability: (w.Accountability).Pb()} +} + +func (*Event_Accountability) MirReflect() mirreflect.Type { + return mirreflect.TypeImpl{PbType_: reflectutil.TypeOf[*eventpb.Event_Accountability]()} +} + type Event_PingPong struct { - PingPong *types17.Event + PingPong *types18.Event } func (*Event_PingPong) isEvent_Type() {} -func (w *Event_PingPong) Unwrap() *types17.Event { +func (w *Event_PingPong) Unwrap() *types18.Event { return w.PingPong } @@ -606,12 +633,12 @@ func (*Event_TestingUint) MirReflect() mirreflect.Type { } type Event_Tester struct { - Tester *types18.Tester + Tester *types19.Tester } func (*Event_Tester) isEvent_Type() {} -func (w *Event_Tester) Unwrap() *types18.Tester { +func (w *Event_Tester) Unwrap() *types19.Tester { return w.Tester } @@ -636,7 +663,7 @@ func EventFromPb(pb *eventpb.Event) *Event { return &Event{ DestModule: (types.ModuleID)(pb.DestModule), Type: Event_TypeFromPb(pb.Type), - Next: types19.ConvertSlice(pb.Next, func(t *eventpb.Event) *Event { + Next: types20.ConvertSlice(pb.Next, func(t *eventpb.Event) *Event { return EventFromPb(t) }), } @@ -652,7 +679,7 @@ func (m *Event) Pb() *eventpb.Event { if m.Type != nil { pbMessage.Type = (m.Type).Pb() } - pbMessage.Next = types19.ConvertSlice(m.Next, func(t *Event) *eventpb.Event { + pbMessage.Next = types20.ConvertSlice(m.Next, func(t *Event) *eventpb.Event { return (t).Pb() }) } @@ -819,7 +846,7 @@ func (*TimerEvent) MirReflect() mirreflect.Type { type TimerDelay struct { EventsToDelay []*Event - Delay types20.Duration + Delay types21.Duration } func TimerDelayFromPb(pb *eventpb.TimerDelay) *TimerDelay { @@ -827,10 +854,10 @@ func TimerDelayFromPb(pb *eventpb.TimerDelay) *TimerDelay { return nil } return &TimerDelay{ - EventsToDelay: types19.ConvertSlice(pb.EventsToDelay, func(t *eventpb.Event) *Event { + EventsToDelay: types20.ConvertSlice(pb.EventsToDelay, func(t *eventpb.Event) *Event { return EventFromPb(t) }), - Delay: (types20.Duration)(pb.Delay), + Delay: (types21.Duration)(pb.Delay), } } @@ -840,7 +867,7 @@ func (m *TimerDelay) Pb() *eventpb.TimerDelay { } pbMessage := &eventpb.TimerDelay{} { - pbMessage.EventsToDelay = types19.ConvertSlice(m.EventsToDelay, func(t *Event) *eventpb.Event { + pbMessage.EventsToDelay = types20.ConvertSlice(m.EventsToDelay, func(t *Event) *eventpb.Event { return (t).Pb() }) pbMessage.Delay = (uint64)(m.Delay) @@ -855,8 +882,8 @@ func (*TimerDelay) MirReflect() mirreflect.Type { type TimerRepeat struct { EventsToRepeat []*Event - Delay types20.Duration - RetentionIndex types21.RetentionIndex + Delay types21.Duration + RetentionIndex types22.RetentionIndex } func TimerRepeatFromPb(pb *eventpb.TimerRepeat) *TimerRepeat { @@ -864,11 +891,11 @@ func TimerRepeatFromPb(pb *eventpb.TimerRepeat) *TimerRepeat { return nil } return &TimerRepeat{ - EventsToRepeat: types19.ConvertSlice(pb.EventsToRepeat, func(t *eventpb.Event) *Event { + EventsToRepeat: types20.ConvertSlice(pb.EventsToRepeat, func(t *eventpb.Event) *Event { return EventFromPb(t) }), - Delay: (types20.Duration)(pb.Delay), - RetentionIndex: (types21.RetentionIndex)(pb.RetentionIndex), + Delay: (types21.Duration)(pb.Delay), + RetentionIndex: (types22.RetentionIndex)(pb.RetentionIndex), } } @@ -878,7 +905,7 @@ func (m *TimerRepeat) Pb() *eventpb.TimerRepeat { } pbMessage := &eventpb.TimerRepeat{} { - pbMessage.EventsToRepeat = types19.ConvertSlice(m.EventsToRepeat, func(t *Event) *eventpb.Event { + pbMessage.EventsToRepeat = types20.ConvertSlice(m.EventsToRepeat, func(t *Event) *eventpb.Event { return (t).Pb() }) pbMessage.Delay = (uint64)(m.Delay) @@ -893,7 +920,7 @@ func (*TimerRepeat) MirReflect() mirreflect.Type { } type TimerGarbageCollect struct { - RetentionIndex types21.RetentionIndex + RetentionIndex types22.RetentionIndex } func TimerGarbageCollectFromPb(pb *eventpb.TimerGarbageCollect) *TimerGarbageCollect { @@ -901,7 +928,7 @@ func TimerGarbageCollectFromPb(pb *eventpb.TimerGarbageCollect) *TimerGarbageCol return nil } return &TimerGarbageCollect{ - RetentionIndex: (types21.RetentionIndex)(pb.RetentionIndex), + RetentionIndex: (types22.RetentionIndex)(pb.RetentionIndex), } } diff --git a/pkg/pb/factorypb/factorypb.pb.go b/pkg/pb/factorypb/factorypb.pb.go index a0bed354d..06d2dec39 100644 --- a/pkg/pb/factorypb/factorypb.pb.go +++ b/pkg/pb/factorypb/factorypb.pb.go @@ -1,12 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0-devel -// protoc v3.14.0 +// protoc-gen-go v1.28.1 +// protoc v3.12.4 // source: factorypb/factorypb.proto package factorypb import ( + accountabilitypb "github.com/filecoin-project/mir/pkg/pb/accountabilitypb" mscpb "github.com/filecoin-project/mir/pkg/pb/availabilitypb/mscpb" checkpointpb "github.com/filecoin-project/mir/pkg/pb/checkpointpb" _ "github.com/filecoin-project/mir/pkg/pb/mir" @@ -232,6 +233,7 @@ type GeneratorParams struct { // *GeneratorParams_EchoTestModule // *GeneratorParams_PbftModule // *GeneratorParams_PpvModule + // *GeneratorParams_AccModule Type isGeneratorParams_Type `protobuf_oneof:"type"` } @@ -309,6 +311,13 @@ func (x *GeneratorParams) GetPpvModule() *pprepvalidatorpb.PPrepValidatorChkp { return nil } +func (x *GeneratorParams) GetAccModule() *accountabilitypb.InstanceParams { + if x, ok := x.GetType().(*GeneratorParams_AccModule); ok { + return x.AccModule + } + return nil +} + type isGeneratorParams_Type interface { isGeneratorParams_Type() } @@ -333,6 +342,10 @@ type GeneratorParams_PpvModule struct { PpvModule *pprepvalidatorpb.PPrepValidatorChkp `protobuf:"bytes,5,opt,name=ppv_module,json=ppvModule,proto3,oneof"` } +type GeneratorParams_AccModule struct { + AccModule *accountabilitypb.InstanceParams `protobuf:"bytes,6,opt,name=acc_module,json=accModule,proto3,oneof"` +} + func (*GeneratorParams_MultisigCollector) isGeneratorParams_Type() {} func (*GeneratorParams_Checkpoint) isGeneratorParams_Type() {} @@ -343,6 +356,8 @@ func (*GeneratorParams_PbftModule) isGeneratorParams_Type() {} func (*GeneratorParams_PpvModule) isGeneratorParams_Type() {} +func (*GeneratorParams_AccModule) isGeneratorParams_Type() {} + // Used only for unit tests. type EchoModuleParams struct { state protoimpl.MessageState @@ -405,75 +420,82 @@ var file_factorypb_factorypb_proto_rawDesc = []byte{ 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x31, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x65, 0x72, 0x70, 0x62, 0x2f, 0x70, 0x70, 0x72, 0x65, 0x70, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x70, 0x62, 0x2f, 0x70, 0x70, 0x72, 0x65, 0x70, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x70, - 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x6d, 0x69, 0x72, 0x2f, 0x63, 0x6f, 0x64, - 0x65, 0x67, 0x65, 0x6e, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x98, 0x01, 0x0a, 0x05, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, - 0x35, 0x0a, 0x0a, 0x6e, 0x65, 0x77, 0x5f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x70, 0x62, 0x2e, - 0x4e, 0x65, 0x77, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x48, 0x00, 0x52, 0x09, 0x6e, 0x65, 0x77, - 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x44, 0x0a, 0x0f, 0x67, 0x61, 0x72, 0x62, 0x61, 0x67, - 0x65, 0x5f, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x19, 0x2e, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x70, 0x62, 0x2e, 0x47, 0x61, 0x72, 0x62, - 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x48, 0x00, 0x52, 0x0e, 0x67, 0x61, - 0x72, 0x62, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x3a, 0x04, 0x90, 0xa6, - 0x1d, 0x01, 0x42, 0x0c, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x04, 0x80, 0xa6, 0x1d, 0x01, - 0x22, 0x89, 0x02, 0x0a, 0x09, 0x4e, 0x65, 0x77, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x53, - 0x0a, 0x09, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x36, 0x82, 0xa6, 0x1d, 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x27, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x70, 0x62, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x70, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x1c, 0x6d, 0x69, 0x72, 0x2f, 0x63, 0x6f, 0x64, 0x65, 0x67, 0x65, 0x6e, 0x5f, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x98, + 0x01, 0x0a, 0x05, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x35, 0x0a, 0x0a, 0x6e, 0x65, 0x77, 0x5f, + 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x66, + 0x61, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x70, 0x62, 0x2e, 0x4e, 0x65, 0x77, 0x4d, 0x6f, 0x64, 0x75, + 0x6c, 0x65, 0x48, 0x00, 0x52, 0x09, 0x6e, 0x65, 0x77, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x12, + 0x44, 0x0a, 0x0f, 0x67, 0x61, 0x72, 0x62, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6c, 0x6c, 0x65, + 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x66, 0x61, 0x63, 0x74, 0x6f, + 0x72, 0x79, 0x70, 0x62, 0x2e, 0x47, 0x61, 0x72, 0x62, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6c, 0x6c, + 0x65, 0x63, 0x74, 0x48, 0x00, 0x52, 0x0e, 0x67, 0x61, 0x72, 0x62, 0x61, 0x67, 0x65, 0x43, 0x6f, + 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x3a, 0x04, 0x90, 0xa6, 0x1d, 0x01, 0x42, 0x0c, 0x0a, 0x04, 0x74, + 0x79, 0x70, 0x65, 0x12, 0x04, 0x80, 0xa6, 0x1d, 0x01, 0x22, 0x89, 0x02, 0x0a, 0x09, 0x4e, 0x65, + 0x77, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x53, 0x0a, 0x09, 0x6d, 0x6f, 0x64, 0x75, 0x6c, + 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x36, 0x82, 0xa6, 0x1d, 0x32, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x63, + 0x6f, 0x69, 0x6e, 0x2d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x6d, 0x69, 0x72, 0x2f, + 0x70, 0x6b, 0x67, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, + 0x49, 0x44, 0x52, 0x08, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x6d, 0x0a, 0x0f, + 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, 0x44, 0x82, 0xa6, 0x1d, 0x40, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x63, 0x6f, 0x69, 0x6e, 0x2d, 0x70, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x6d, 0x69, 0x72, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x74, + 0x72, 0x61, 0x6e, 0x74, 0x6f, 0x72, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x52, 0x65, 0x74, + 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x0e, 0x72, 0x65, 0x74, + 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x32, 0x0a, 0x06, 0x70, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x66, 0x61, + 0x63, 0x74, 0x6f, 0x72, 0x79, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, + 0x72, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x3a, + 0x04, 0x98, 0xa6, 0x1d, 0x01, 0x22, 0x85, 0x01, 0x0a, 0x0e, 0x47, 0x61, 0x72, 0x62, 0x61, 0x67, + 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x12, 0x6d, 0x0a, 0x0f, 0x72, 0x65, 0x74, 0x65, + 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x04, 0x42, 0x44, 0x82, 0xa6, 0x1d, 0x40, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x63, 0x6f, 0x69, 0x6e, 0x2d, 0x70, 0x72, 0x6f, 0x6a, 0x65, - 0x63, 0x74, 0x2f, 0x6d, 0x69, 0x72, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, - 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x49, 0x44, 0x52, 0x08, 0x6d, 0x6f, 0x64, 0x75, 0x6c, - 0x65, 0x49, 0x64, 0x12, 0x6d, 0x0a, 0x0f, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, 0x44, 0x82, 0xa6, - 0x1d, 0x40, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x66, 0x69, 0x6c, - 0x65, 0x63, 0x6f, 0x69, 0x6e, 0x2d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x6d, 0x69, - 0x72, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x74, 0x6f, 0x72, 0x2f, 0x74, 0x79, - 0x70, 0x65, 0x73, 0x2e, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x64, - 0x65, 0x78, 0x52, 0x0e, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x64, - 0x65, 0x78, 0x12, 0x32, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x70, 0x62, 0x2e, 0x47, - 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x06, - 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x3a, 0x04, 0x98, 0xa6, 0x1d, 0x01, 0x22, 0x85, 0x01, 0x0a, - 0x0e, 0x47, 0x61, 0x72, 0x62, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x12, - 0x6d, 0x0a, 0x0f, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x64, - 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x44, 0x82, 0xa6, 0x1d, 0x40, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x63, 0x6f, 0x69, - 0x6e, 0x2d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x6d, 0x69, 0x72, 0x2f, 0x70, 0x6b, - 0x67, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x74, 0x6f, 0x72, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, - 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x0e, - 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x3a, 0x04, - 0x98, 0xa6, 0x1d, 0x01, 0x22, 0x80, 0x03, 0x0a, 0x0f, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, - 0x6f, 0x72, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x55, 0x0a, 0x12, 0x6d, 0x75, 0x6c, 0x74, - 0x69, 0x73, 0x69, 0x67, 0x5f, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, - 0x69, 0x74, 0x79, 0x70, 0x62, 0x2e, 0x6d, 0x73, 0x63, 0x70, 0x62, 0x2e, 0x49, 0x6e, 0x73, 0x74, - 0x61, 0x6e, 0x63, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x48, 0x00, 0x52, 0x11, 0x6d, 0x75, - 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, - 0x3e, 0x0a, 0x0a, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, - 0x70, 0x62, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x48, 0x00, 0x52, 0x0a, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, - 0x47, 0x0a, 0x10, 0x65, 0x63, 0x68, 0x6f, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x6f, 0x64, - 0x75, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x66, 0x61, 0x63, 0x74, - 0x6f, 0x72, 0x79, 0x70, 0x62, 0x2e, 0x45, 0x63, 0x68, 0x6f, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x48, 0x00, 0x52, 0x0e, 0x65, 0x63, 0x68, 0x6f, 0x54, 0x65, - 0x73, 0x74, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x38, 0x0a, 0x0b, 0x70, 0x62, 0x66, 0x74, - 0x5f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, - 0x6f, 0x72, 0x64, 0x65, 0x72, 0x65, 0x72, 0x70, 0x62, 0x2e, 0x50, 0x42, 0x46, 0x54, 0x4d, 0x6f, - 0x64, 0x75, 0x6c, 0x65, 0x48, 0x00, 0x52, 0x0a, 0x70, 0x62, 0x66, 0x74, 0x4d, 0x6f, 0x64, 0x75, - 0x6c, 0x65, 0x12, 0x45, 0x0a, 0x0a, 0x70, 0x70, 0x76, 0x5f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x70, 0x70, 0x72, 0x65, 0x70, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x70, 0x62, 0x2e, 0x50, 0x50, 0x72, 0x65, 0x70, 0x56, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x43, 0x68, 0x6b, 0x70, 0x48, 0x00, 0x52, 0x09, - 0x70, 0x70, 0x76, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a, 0x04, 0x80, 0xa6, 0x1d, 0x01, 0x42, - 0x06, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x30, 0x0a, 0x10, 0x45, 0x63, 0x68, 0x6f, 0x4d, - 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x70, - 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x72, 0x65, - 0x66, 0x69, 0x78, 0x3a, 0x04, 0x80, 0xa6, 0x1d, 0x01, 0x42, 0x32, 0x5a, 0x30, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x63, 0x6f, 0x69, 0x6e, - 0x2d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x6d, 0x69, 0x72, 0x2f, 0x70, 0x6b, 0x67, - 0x2f, 0x70, 0x62, 0x2f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x70, 0x62, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x63, 0x74, 0x2f, 0x6d, 0x69, 0x72, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x74, + 0x6f, 0x72, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, + 0x6f, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x0e, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, + 0x6f, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x3a, 0x04, 0x98, 0xa6, 0x1d, 0x01, 0x22, 0xc3, 0x03, + 0x0a, 0x0f, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x12, 0x55, 0x0a, 0x12, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x5f, 0x63, 0x6f, + 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, + 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x70, 0x62, 0x2e, 0x6d, + 0x73, 0x63, 0x70, 0x62, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x50, 0x61, 0x72, + 0x61, 0x6d, 0x73, 0x48, 0x00, 0x52, 0x11, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x43, + 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x3e, 0x0a, 0x0a, 0x63, 0x68, 0x65, 0x63, + 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, + 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x49, 0x6e, 0x73, 0x74, + 0x61, 0x6e, 0x63, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x48, 0x00, 0x52, 0x0a, 0x63, 0x68, + 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x47, 0x0a, 0x10, 0x65, 0x63, 0x68, 0x6f, + 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x70, 0x62, 0x2e, 0x45, + 0x63, 0x68, 0x6f, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x48, + 0x00, 0x52, 0x0e, 0x65, 0x63, 0x68, 0x6f, 0x54, 0x65, 0x73, 0x74, 0x4d, 0x6f, 0x64, 0x75, 0x6c, + 0x65, 0x12, 0x38, 0x0a, 0x0b, 0x70, 0x62, 0x66, 0x74, 0x5f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x65, 0x72, + 0x70, 0x62, 0x2e, 0x50, 0x42, 0x46, 0x54, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x48, 0x00, 0x52, + 0x0a, 0x70, 0x62, 0x66, 0x74, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x45, 0x0a, 0x0a, 0x70, + 0x70, 0x76, 0x5f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x24, 0x2e, 0x70, 0x70, 0x72, 0x65, 0x70, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x70, 0x62, 0x2e, 0x50, 0x50, 0x72, 0x65, 0x70, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x43, 0x68, 0x6b, 0x70, 0x48, 0x00, 0x52, 0x09, 0x70, 0x70, 0x76, 0x4d, 0x6f, 0x64, 0x75, + 0x6c, 0x65, 0x12, 0x41, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x5f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x70, 0x62, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, + 0x63, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x48, 0x00, 0x52, 0x09, 0x61, 0x63, 0x63, 0x4d, + 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a, 0x04, 0x80, 0xa6, 0x1d, 0x01, 0x42, 0x06, 0x0a, 0x04, 0x74, + 0x79, 0x70, 0x65, 0x22, 0x30, 0x0a, 0x10, 0x45, 0x63, 0x68, 0x6f, 0x4d, 0x6f, 0x64, 0x75, 0x6c, + 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, + 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x3a, + 0x04, 0x80, 0xa6, 0x1d, 0x01, 0x42, 0x32, 0x5a, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x63, 0x6f, 0x69, 0x6e, 0x2d, 0x70, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x6d, 0x69, 0x72, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x62, 0x2f, + 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( @@ -499,6 +521,7 @@ var file_factorypb_factorypb_proto_goTypes = []interface{}{ (*checkpointpb.InstanceParams)(nil), // 6: checkpointpb.InstanceParams (*ordererpb.PBFTModule)(nil), // 7: ordererpb.PBFTModule (*pprepvalidatorpb.PPrepValidatorChkp)(nil), // 8: pprepvalidatorpb.PPrepValidatorChkp + (*accountabilitypb.InstanceParams)(nil), // 9: accountabilitypb.InstanceParams } var file_factorypb_factorypb_proto_depIdxs = []int32{ 1, // 0: factorypb.Event.new_module:type_name -> factorypb.NewModule @@ -509,11 +532,12 @@ var file_factorypb_factorypb_proto_depIdxs = []int32{ 4, // 5: factorypb.GeneratorParams.echo_test_module:type_name -> factorypb.EchoModuleParams 7, // 6: factorypb.GeneratorParams.pbft_module:type_name -> ordererpb.PBFTModule 8, // 7: factorypb.GeneratorParams.ppv_module:type_name -> pprepvalidatorpb.PPrepValidatorChkp - 8, // [8:8] is the sub-list for method output_type - 8, // [8:8] is the sub-list for method input_type - 8, // [8:8] is the sub-list for extension type_name - 8, // [8:8] is the sub-list for extension extendee - 0, // [0:8] is the sub-list for field type_name + 9, // 8: factorypb.GeneratorParams.acc_module:type_name -> accountabilitypb.InstanceParams + 9, // [9:9] is the sub-list for method output_type + 9, // [9:9] is the sub-list for method input_type + 9, // [9:9] is the sub-list for extension type_name + 9, // [9:9] is the sub-list for extension extendee + 0, // [0:9] is the sub-list for field type_name } func init() { file_factorypb_factorypb_proto_init() } @@ -593,6 +617,7 @@ func file_factorypb_factorypb_proto_init() { (*GeneratorParams_EchoTestModule)(nil), (*GeneratorParams_PbftModule)(nil), (*GeneratorParams_PpvModule)(nil), + (*GeneratorParams_AccModule)(nil), } type x struct{} out := protoimpl.TypeBuilder{ diff --git a/pkg/pb/factorypb/factorypb.pb.mir.go b/pkg/pb/factorypb/factorypb.pb.mir.go index e73319962..2e927544b 100644 --- a/pkg/pb/factorypb/factorypb.pb.mir.go +++ b/pkg/pb/factorypb/factorypb.pb.mir.go @@ -20,5 +20,6 @@ func (*GeneratorParams) ReflectTypeOptions() []reflect.Type { reflect.TypeOf((*GeneratorParams_EchoTestModule)(nil)), reflect.TypeOf((*GeneratorParams_PbftModule)(nil)), reflect.TypeOf((*GeneratorParams_PpvModule)(nil)), + reflect.TypeOf((*GeneratorParams_AccModule)(nil)), } } diff --git a/pkg/pb/factorypb/oneof_interfaces.mir.go b/pkg/pb/factorypb/oneof_interfaces.mir.go index 5967ac202..3fa582fe6 100644 --- a/pkg/pb/factorypb/oneof_interfaces.mir.go +++ b/pkg/pb/factorypb/oneof_interfaces.mir.go @@ -3,6 +3,7 @@ package factorypb import ( + accountabilitypb "github.com/filecoin-project/mir/pkg/pb/accountabilitypb" mscpb "github.com/filecoin-project/mir/pkg/pb/availabilitypb/mscpb" checkpointpb "github.com/filecoin-project/mir/pkg/pb/checkpointpb" ordererpb "github.com/filecoin-project/mir/pkg/pb/ordererpb" @@ -50,3 +51,7 @@ func (w *GeneratorParams_PbftModule) Unwrap() *ordererpb.PBFTModule { func (w *GeneratorParams_PpvModule) Unwrap() *pprepvalidatorpb.PPrepValidatorChkp { return w.PpvModule } + +func (w *GeneratorParams_AccModule) Unwrap() *accountabilitypb.InstanceParams { + return w.AccModule +} diff --git a/pkg/pb/factorypb/types/types.mir.go b/pkg/pb/factorypb/types/types.mir.go index 4c33268f9..f1b5c69d0 100644 --- a/pkg/pb/factorypb/types/types.mir.go +++ b/pkg/pb/factorypb/types/types.mir.go @@ -4,6 +4,7 @@ package factorypbtypes import ( mirreflect "github.com/filecoin-project/mir/codegen/mirreflect" + types6 "github.com/filecoin-project/mir/pkg/pb/accountabilitypb/types" types2 "github.com/filecoin-project/mir/pkg/pb/availabilitypb/mscpb/types" types3 "github.com/filecoin-project/mir/pkg/pb/checkpointpb/types" factorypb "github.com/filecoin-project/mir/pkg/pb/factorypb" @@ -213,6 +214,8 @@ func GeneratorParams_TypeFromPb(pb factorypb.GeneratorParams_Type) GeneratorPara return &GeneratorParams_PbftModule{PbftModule: types4.PBFTModuleFromPb(pb.PbftModule)} case *factorypb.GeneratorParams_PpvModule: return &GeneratorParams_PpvModule{PpvModule: types5.PPrepValidatorChkpFromPb(pb.PpvModule)} + case *factorypb.GeneratorParams_AccModule: + return &GeneratorParams_AccModule{AccModule: types6.InstanceParamsFromPb(pb.AccModule)} } return nil } @@ -337,6 +340,30 @@ func (*GeneratorParams_PpvModule) MirReflect() mirreflect.Type { return mirreflect.TypeImpl{PbType_: reflectutil.TypeOf[*factorypb.GeneratorParams_PpvModule]()} } +type GeneratorParams_AccModule struct { + AccModule *types6.InstanceParams +} + +func (*GeneratorParams_AccModule) isGeneratorParams_Type() {} + +func (w *GeneratorParams_AccModule) Unwrap() *types6.InstanceParams { + return w.AccModule +} + +func (w *GeneratorParams_AccModule) Pb() factorypb.GeneratorParams_Type { + if w == nil { + return nil + } + if w.AccModule == nil { + return &factorypb.GeneratorParams_AccModule{} + } + return &factorypb.GeneratorParams_AccModule{AccModule: (w.AccModule).Pb()} +} + +func (*GeneratorParams_AccModule) MirReflect() mirreflect.Type { + return mirreflect.TypeImpl{PbType_: reflectutil.TypeOf[*factorypb.GeneratorParams_AccModule]()} +} + func GeneratorParamsFromPb(pb *factorypb.GeneratorParams) *GeneratorParams { if pb == nil { return nil diff --git a/pkg/pb/hasherpb/hasherpb.pb.go b/pkg/pb/hasherpb/hasherpb.pb.go index cdc0413ee..e3e45fada 100644 --- a/pkg/pb/hasherpb/hasherpb.pb.go +++ b/pkg/pb/hasherpb/hasherpb.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0-devel -// protoc v3.14.0 +// protoc-gen-go v1.28.1 +// protoc v3.12.4 // source: hasherpb/hasherpb.proto package hasherpb diff --git a/pkg/pb/isspb/isspb.pb.go b/pkg/pb/isspb/isspb.pb.go index 825142a0a..e134e4180 100644 --- a/pkg/pb/isspb/isspb.pb.go +++ b/pkg/pb/isspb/isspb.pb.go @@ -5,8 +5,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0-devel -// protoc v3.14.0 +// protoc-gen-go v1.28.1 +// protoc v3.12.4 // source: isspb/isspb.proto package isspb diff --git a/pkg/pb/mempoolpb/mempoolpb.pb.go b/pkg/pb/mempoolpb/mempoolpb.pb.go index 2bfc92bc6..175bd9722 100644 --- a/pkg/pb/mempoolpb/mempoolpb.pb.go +++ b/pkg/pb/mempoolpb/mempoolpb.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0-devel -// protoc v3.14.0 +// protoc-gen-go v1.28.1 +// protoc v3.12.4 // source: mempoolpb/mempoolpb.proto package mempoolpb diff --git a/pkg/pb/messagepb/messagepb.pb.go b/pkg/pb/messagepb/messagepb.pb.go index f642796cf..66050c109 100644 --- a/pkg/pb/messagepb/messagepb.pb.go +++ b/pkg/pb/messagepb/messagepb.pb.go @@ -5,13 +5,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0-devel -// protoc v3.14.0 +// protoc-gen-go v1.28.1 +// protoc v3.12.4 // source: messagepb/messagepb.proto package messagepb import ( + accountabilitypb "github.com/filecoin-project/mir/pkg/pb/accountabilitypb" mscpb "github.com/filecoin-project/mir/pkg/pb/availabilitypb/mscpb" bcbpb "github.com/filecoin-project/mir/pkg/pb/bcbpb" checkpointpb "github.com/filecoin-project/mir/pkg/pb/checkpointpb" @@ -46,6 +47,7 @@ type Message struct { // *Message_Pingpong // *Message_Checkpoint // *Message_Orderer + // *Message_Accountability Type isMessage_Type `protobuf_oneof:"type"` } @@ -137,6 +139,13 @@ func (x *Message) GetOrderer() *ordererpb.Message { return nil } +func (x *Message) GetAccountability() *accountabilitypb.Message { + if x, ok := x.GetType().(*Message_Accountability); ok { + return x.Accountability + } + return nil +} + type isMessage_Type interface { isMessage_Type() } @@ -165,6 +174,10 @@ type Message_Orderer struct { Orderer *ordererpb.Message `protobuf:"bytes,7,opt,name=orderer,proto3,oneof"` } +type Message_Accountability struct { + Accountability *accountabilitypb.Message `protobuf:"bytes,8,opt,name=accountability,proto3,oneof"` +} + func (*Message_Iss) isMessage_Type() {} func (*Message_Bcb) isMessage_Type() {} @@ -177,6 +190,8 @@ func (*Message_Checkpoint) isMessage_Type() {} func (*Message_Orderer) isMessage_Type() {} +func (*Message_Accountability) isMessage_Type() {} + var File_messagepb_messagepb_proto protoreflect.FileDescriptor var file_messagepb_messagepb_proto_rawDesc = []byte{ @@ -192,41 +207,48 @@ var file_messagepb_messagepb_proto_rawDesc = []byte{ 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x70, 0x62, 0x2f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x65, 0x72, 0x70, 0x62, 0x2f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x65, 0x72, 0x70, - 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x6d, 0x69, 0x72, 0x2f, 0x63, 0x6f, 0x64, - 0x65, 0x67, 0x65, 0x6e, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x6e, 0x65, 0x74, 0x2f, 0x63, 0x6f, 0x64, 0x65, 0x67, - 0x65, 0x6e, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x22, 0xad, 0x03, 0x0a, 0x07, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, - 0x57, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x36, 0x82, 0xa6, 0x1d, 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x63, 0x6f, 0x69, 0x6e, 0x2d, 0x70, 0x72, - 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x6d, 0x69, 0x72, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x74, 0x79, - 0x70, 0x65, 0x73, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x49, 0x44, 0x52, 0x0a, 0x64, 0x65, - 0x73, 0x74, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x25, 0x0a, 0x03, 0x69, 0x73, 0x73, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x69, 0x73, 0x73, 0x70, 0x62, 0x2e, 0x49, 0x53, - 0x53, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x48, 0x00, 0x52, 0x03, 0x69, 0x73, 0x73, 0x12, - 0x22, 0x0a, 0x03, 0x62, 0x63, 0x62, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x62, - 0x63, 0x62, 0x70, 0x62, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x48, 0x00, 0x52, 0x03, - 0x62, 0x63, 0x62, 0x12, 0x4e, 0x0a, 0x12, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x5f, - 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1d, 0x2e, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x70, 0x62, - 0x2e, 0x6d, 0x73, 0x63, 0x70, 0x62, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x48, 0x00, - 0x52, 0x11, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, - 0x74, 0x6f, 0x72, 0x12, 0x31, 0x0a, 0x08, 0x70, 0x69, 0x6e, 0x67, 0x70, 0x6f, 0x6e, 0x67, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x69, 0x6e, 0x67, 0x70, 0x6f, 0x6e, 0x67, - 0x70, 0x62, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x48, 0x00, 0x52, 0x08, 0x70, 0x69, - 0x6e, 0x67, 0x70, 0x6f, 0x6e, 0x67, 0x12, 0x37, 0x0a, 0x0a, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, - 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x63, 0x68, 0x65, - 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x48, 0x00, 0x52, 0x0a, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, - 0x2e, 0x0a, 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x65, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x12, 0x2e, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x65, 0x72, 0x70, 0x62, 0x2e, 0x4d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x48, 0x00, 0x52, 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x65, 0x72, 0x3a, - 0x04, 0xc0, 0xe4, 0x1d, 0x01, 0x42, 0x0c, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x04, 0xc8, - 0xe4, 0x1d, 0x01, 0x42, 0x32, 0x5a, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x63, 0x6f, 0x69, 0x6e, 0x2d, 0x70, 0x72, 0x6f, 0x6a, 0x65, - 0x63, 0x74, 0x2f, 0x6d, 0x69, 0x72, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x62, 0x2f, 0x6d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x27, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x70, 0x62, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x70, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x1c, 0x6d, 0x69, 0x72, 0x2f, 0x63, 0x6f, 0x64, 0x65, 0x67, 0x65, 0x6e, 0x5f, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, + 0x6e, 0x65, 0x74, 0x2f, 0x63, 0x6f, 0x64, 0x65, 0x67, 0x65, 0x6e, 0x5f, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf2, 0x03, 0x0a, + 0x07, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x57, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x74, + 0x5f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x36, 0x82, + 0xa6, 0x1d, 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x66, 0x69, + 0x6c, 0x65, 0x63, 0x6f, 0x69, 0x6e, 0x2d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x6d, + 0x69, 0x72, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x4d, 0x6f, 0x64, + 0x75, 0x6c, 0x65, 0x49, 0x44, 0x52, 0x0a, 0x64, 0x65, 0x73, 0x74, 0x4d, 0x6f, 0x64, 0x75, 0x6c, + 0x65, 0x12, 0x25, 0x0a, 0x03, 0x69, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, + 0x2e, 0x69, 0x73, 0x73, 0x70, 0x62, 0x2e, 0x49, 0x53, 0x53, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x48, 0x00, 0x52, 0x03, 0x69, 0x73, 0x73, 0x12, 0x22, 0x0a, 0x03, 0x62, 0x63, 0x62, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x62, 0x63, 0x62, 0x70, 0x62, 0x2e, 0x4d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x48, 0x00, 0x52, 0x03, 0x62, 0x63, 0x62, 0x12, 0x4e, 0x0a, 0x12, + 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x5f, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, + 0x6f, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x61, 0x76, 0x61, 0x69, 0x6c, + 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x70, 0x62, 0x2e, 0x6d, 0x73, 0x63, 0x70, 0x62, 0x2e, + 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x48, 0x00, 0x52, 0x11, 0x6d, 0x75, 0x6c, 0x74, 0x69, + 0x73, 0x69, 0x67, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x31, 0x0a, 0x08, + 0x70, 0x69, 0x6e, 0x67, 0x70, 0x6f, 0x6e, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, + 0x2e, 0x70, 0x69, 0x6e, 0x67, 0x70, 0x6f, 0x6e, 0x67, 0x70, 0x62, 0x2e, 0x4d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x48, 0x00, 0x52, 0x08, 0x70, 0x69, 0x6e, 0x67, 0x70, 0x6f, 0x6e, 0x67, 0x12, + 0x37, 0x0a, 0x0a, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, + 0x70, 0x62, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x48, 0x00, 0x52, 0x0a, 0x63, 0x68, + 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x2e, 0x0a, 0x07, 0x6f, 0x72, 0x64, 0x65, + 0x72, 0x65, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6f, 0x72, 0x64, 0x65, + 0x72, 0x65, 0x72, 0x70, 0x62, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x48, 0x00, 0x52, + 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x65, 0x72, 0x12, 0x43, 0x0a, 0x0e, 0x61, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x19, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, + 0x79, 0x70, 0x62, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x48, 0x00, 0x52, 0x0e, 0x61, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x3a, 0x04, 0xc0, + 0xe4, 0x1d, 0x01, 0x42, 0x0c, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x04, 0xc8, 0xe4, 0x1d, + 0x01, 0x42, 0x32, 0x5a, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x66, 0x69, 0x6c, 0x65, 0x63, 0x6f, 0x69, 0x6e, 0x2d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x2f, 0x6d, 0x69, 0x72, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x62, 0x2f, 0x6d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -243,13 +265,14 @@ func file_messagepb_messagepb_proto_rawDescGZIP() []byte { var file_messagepb_messagepb_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_messagepb_messagepb_proto_goTypes = []interface{}{ - (*Message)(nil), // 0: messagepb.Message - (*isspb.ISSMessage)(nil), // 1: isspb.ISSMessage - (*bcbpb.Message)(nil), // 2: bcbpb.Message - (*mscpb.Message)(nil), // 3: availabilitypb.mscpb.Message - (*pingpongpb.Message)(nil), // 4: pingpongpb.Message - (*checkpointpb.Message)(nil), // 5: checkpointpb.Message - (*ordererpb.Message)(nil), // 6: ordererpb.Message + (*Message)(nil), // 0: messagepb.Message + (*isspb.ISSMessage)(nil), // 1: isspb.ISSMessage + (*bcbpb.Message)(nil), // 2: bcbpb.Message + (*mscpb.Message)(nil), // 3: availabilitypb.mscpb.Message + (*pingpongpb.Message)(nil), // 4: pingpongpb.Message + (*checkpointpb.Message)(nil), // 5: checkpointpb.Message + (*ordererpb.Message)(nil), // 6: ordererpb.Message + (*accountabilitypb.Message)(nil), // 7: accountabilitypb.Message } var file_messagepb_messagepb_proto_depIdxs = []int32{ 1, // 0: messagepb.Message.iss:type_name -> isspb.ISSMessage @@ -258,11 +281,12 @@ var file_messagepb_messagepb_proto_depIdxs = []int32{ 4, // 3: messagepb.Message.pingpong:type_name -> pingpongpb.Message 5, // 4: messagepb.Message.checkpoint:type_name -> checkpointpb.Message 6, // 5: messagepb.Message.orderer:type_name -> ordererpb.Message - 6, // [6:6] is the sub-list for method output_type - 6, // [6:6] is the sub-list for method input_type - 6, // [6:6] is the sub-list for extension type_name - 6, // [6:6] is the sub-list for extension extendee - 0, // [0:6] is the sub-list for field type_name + 7, // 6: messagepb.Message.accountability:type_name -> accountabilitypb.Message + 7, // [7:7] is the sub-list for method output_type + 7, // [7:7] is the sub-list for method input_type + 7, // [7:7] is the sub-list for extension type_name + 7, // [7:7] is the sub-list for extension extendee + 0, // [0:7] is the sub-list for field type_name } func init() { file_messagepb_messagepb_proto_init() } @@ -291,6 +315,7 @@ func file_messagepb_messagepb_proto_init() { (*Message_Pingpong)(nil), (*Message_Checkpoint)(nil), (*Message_Orderer)(nil), + (*Message_Accountability)(nil), } type x struct{} out := protoimpl.TypeBuilder{ diff --git a/pkg/pb/messagepb/messagepb.pb.mir.go b/pkg/pb/messagepb/messagepb.pb.mir.go index 4a44aaad3..76761eb70 100644 --- a/pkg/pb/messagepb/messagepb.pb.mir.go +++ b/pkg/pb/messagepb/messagepb.pb.mir.go @@ -14,5 +14,6 @@ func (*Message) ReflectTypeOptions() []reflect.Type { reflect.TypeOf((*Message_Pingpong)(nil)), reflect.TypeOf((*Message_Checkpoint)(nil)), reflect.TypeOf((*Message_Orderer)(nil)), + reflect.TypeOf((*Message_Accountability)(nil)), } } diff --git a/pkg/pb/messagepb/oneof_interfaces.mir.go b/pkg/pb/messagepb/oneof_interfaces.mir.go index 9cd5cdcd6..28903368e 100644 --- a/pkg/pb/messagepb/oneof_interfaces.mir.go +++ b/pkg/pb/messagepb/oneof_interfaces.mir.go @@ -3,6 +3,7 @@ package messagepb import ( + accountabilitypb "github.com/filecoin-project/mir/pkg/pb/accountabilitypb" mscpb "github.com/filecoin-project/mir/pkg/pb/availabilitypb/mscpb" bcbpb "github.com/filecoin-project/mir/pkg/pb/bcbpb" checkpointpb "github.com/filecoin-project/mir/pkg/pb/checkpointpb" @@ -41,3 +42,7 @@ func (w *Message_Checkpoint) Unwrap() *checkpointpb.Message { func (w *Message_Orderer) Unwrap() *ordererpb.Message { return w.Orderer } + +func (w *Message_Accountability) Unwrap() *accountabilitypb.Message { + return w.Accountability +} diff --git a/pkg/pb/messagepb/types/types.mir.go b/pkg/pb/messagepb/types/types.mir.go index 3d55bc14b..28a7f2130 100644 --- a/pkg/pb/messagepb/types/types.mir.go +++ b/pkg/pb/messagepb/types/types.mir.go @@ -4,6 +4,7 @@ package messagepbtypes import ( mirreflect "github.com/filecoin-project/mir/codegen/mirreflect" + types7 "github.com/filecoin-project/mir/pkg/pb/accountabilitypb/types" types3 "github.com/filecoin-project/mir/pkg/pb/availabilitypb/mscpb/types" types2 "github.com/filecoin-project/mir/pkg/pb/bcbpb/types" types5 "github.com/filecoin-project/mir/pkg/pb/checkpointpb/types" @@ -48,6 +49,8 @@ func Message_TypeFromPb(pb messagepb.Message_Type) Message_Type { return &Message_Checkpoint{Checkpoint: types5.MessageFromPb(pb.Checkpoint)} case *messagepb.Message_Orderer: return &Message_Orderer{Orderer: types6.MessageFromPb(pb.Orderer)} + case *messagepb.Message_Accountability: + return &Message_Accountability{Accountability: types7.MessageFromPb(pb.Accountability)} } return nil } @@ -196,6 +199,30 @@ func (*Message_Orderer) MirReflect() mirreflect.Type { return mirreflect.TypeImpl{PbType_: reflectutil.TypeOf[*messagepb.Message_Orderer]()} } +type Message_Accountability struct { + Accountability *types7.Message +} + +func (*Message_Accountability) isMessage_Type() {} + +func (w *Message_Accountability) Unwrap() *types7.Message { + return w.Accountability +} + +func (w *Message_Accountability) Pb() messagepb.Message_Type { + if w == nil { + return nil + } + if w.Accountability == nil { + return &messagepb.Message_Accountability{} + } + return &messagepb.Message_Accountability{Accountability: (w.Accountability).Pb()} +} + +func (*Message_Accountability) MirReflect() mirreflect.Type { + return mirreflect.TypeImpl{PbType_: reflectutil.TypeOf[*messagepb.Message_Accountability]()} +} + func MessageFromPb(pb *messagepb.Message) *Message { if pb == nil { return nil diff --git a/pkg/pb/mir/codegen_extensions.pb.go b/pkg/pb/mir/codegen_extensions.pb.go index 7e20985ec..f251ed1d4 100644 --- a/pkg/pb/mir/codegen_extensions.pb.go +++ b/pkg/pb/mir/codegen_extensions.pb.go @@ -1,15 +1,15 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0-devel -// protoc v3.14.0 +// protoc-gen-go v1.28.1 +// protoc v3.12.4 // source: mir/codegen_extensions.proto package mir import ( + descriptor "github.com/golang/protobuf/protoc-gen-go/descriptor" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - descriptorpb "google.golang.org/protobuf/types/descriptorpb" reflect "reflect" ) @@ -22,7 +22,7 @@ const ( var file_mir_codegen_extensions_proto_extTypes = []protoimpl.ExtensionInfo{ { - ExtendedType: (*descriptorpb.MessageOptions)(nil), + ExtendedType: (*descriptor.MessageOptions)(nil), ExtensionType: (*bool)(nil), Field: 60000, Name: "mir.struct", @@ -30,7 +30,7 @@ var file_mir_codegen_extensions_proto_extTypes = []protoimpl.ExtensionInfo{ Filename: "mir/codegen_extensions.proto", }, { - ExtendedType: (*descriptorpb.MessageOptions)(nil), + ExtendedType: (*descriptor.MessageOptions)(nil), ExtensionType: (*bool)(nil), Field: 60001, Name: "mir.event_root", @@ -38,7 +38,7 @@ var file_mir_codegen_extensions_proto_extTypes = []protoimpl.ExtensionInfo{ Filename: "mir/codegen_extensions.proto", }, { - ExtendedType: (*descriptorpb.MessageOptions)(nil), + ExtendedType: (*descriptor.MessageOptions)(nil), ExtensionType: (*bool)(nil), Field: 60002, Name: "mir.event_class", @@ -46,7 +46,7 @@ var file_mir_codegen_extensions_proto_extTypes = []protoimpl.ExtensionInfo{ Filename: "mir/codegen_extensions.proto", }, { - ExtendedType: (*descriptorpb.MessageOptions)(nil), + ExtendedType: (*descriptor.MessageOptions)(nil), ExtensionType: (*bool)(nil), Field: 60003, Name: "mir.event", @@ -54,7 +54,7 @@ var file_mir_codegen_extensions_proto_extTypes = []protoimpl.ExtensionInfo{ Filename: "mir/codegen_extensions.proto", }, { - ExtendedType: (*descriptorpb.OneofOptions)(nil), + ExtendedType: (*descriptor.OneofOptions)(nil), ExtensionType: (*bool)(nil), Field: 60000, Name: "mir.event_type", @@ -62,7 +62,7 @@ var file_mir_codegen_extensions_proto_extTypes = []protoimpl.ExtensionInfo{ Filename: "mir/codegen_extensions.proto", }, { - ExtendedType: (*descriptorpb.FieldOptions)(nil), + ExtendedType: (*descriptor.FieldOptions)(nil), ExtensionType: (*string)(nil), Field: 60000, Name: "mir.type", @@ -70,7 +70,7 @@ var file_mir_codegen_extensions_proto_extTypes = []protoimpl.ExtensionInfo{ Filename: "mir/codegen_extensions.proto", }, { - ExtendedType: (*descriptorpb.FieldOptions)(nil), + ExtendedType: (*descriptor.FieldOptions)(nil), ExtensionType: (*bool)(nil), Field: 60002, Name: "mir.omit_in_event_constructors", @@ -78,7 +78,7 @@ var file_mir_codegen_extensions_proto_extTypes = []protoimpl.ExtensionInfo{ Filename: "mir/codegen_extensions.proto", }, { - ExtendedType: (*descriptorpb.FieldOptions)(nil), + ExtendedType: (*descriptor.FieldOptions)(nil), ExtensionType: (*bool)(nil), Field: 60003, Name: "mir.origin_request", @@ -86,7 +86,7 @@ var file_mir_codegen_extensions_proto_extTypes = []protoimpl.ExtensionInfo{ Filename: "mir/codegen_extensions.proto", }, { - ExtendedType: (*descriptorpb.FieldOptions)(nil), + ExtendedType: (*descriptor.FieldOptions)(nil), ExtensionType: (*bool)(nil), Field: 60004, Name: "mir.origin_response", @@ -94,7 +94,7 @@ var file_mir_codegen_extensions_proto_extTypes = []protoimpl.ExtensionInfo{ Filename: "mir/codegen_extensions.proto", }, { - ExtendedType: (*descriptorpb.FieldOptions)(nil), + ExtendedType: (*descriptor.FieldOptions)(nil), ExtensionType: (*string)(nil), Field: 60005, Name: "mir.key_type", @@ -102,7 +102,7 @@ var file_mir_codegen_extensions_proto_extTypes = []protoimpl.ExtensionInfo{ Filename: "mir/codegen_extensions.proto", }, { - ExtendedType: (*descriptorpb.FieldOptions)(nil), + ExtendedType: (*descriptor.FieldOptions)(nil), ExtensionType: (*string)(nil), Field: 60006, Name: "mir.value_type", @@ -111,7 +111,7 @@ var file_mir_codegen_extensions_proto_extTypes = []protoimpl.ExtensionInfo{ }, } -// Extension fields to descriptorpb.MessageOptions. +// Extension fields to descriptor.MessageOptions. var ( // optional bool struct = 60000; E_Struct = &file_mir_codegen_extensions_proto_extTypes[0] @@ -123,13 +123,13 @@ var ( E_Event = &file_mir_codegen_extensions_proto_extTypes[3] ) -// Extension fields to descriptorpb.OneofOptions. +// Extension fields to descriptor.OneofOptions. var ( // optional bool event_type = 60000; E_EventType = &file_mir_codegen_extensions_proto_extTypes[4] ) -// Extension fields to descriptorpb.FieldOptions. +// Extension fields to descriptor.FieldOptions. var ( // optional string type = 60000; E_Type = &file_mir_codegen_extensions_proto_extTypes[5] @@ -205,9 +205,9 @@ var file_mir_codegen_extensions_proto_rawDesc = []byte{ } var file_mir_codegen_extensions_proto_goTypes = []interface{}{ - (*descriptorpb.MessageOptions)(nil), // 0: google.protobuf.MessageOptions - (*descriptorpb.OneofOptions)(nil), // 1: google.protobuf.OneofOptions - (*descriptorpb.FieldOptions)(nil), // 2: google.protobuf.FieldOptions + (*descriptor.MessageOptions)(nil), // 0: google.protobuf.MessageOptions + (*descriptor.OneofOptions)(nil), // 1: google.protobuf.OneofOptions + (*descriptor.FieldOptions)(nil), // 2: google.protobuf.FieldOptions } var file_mir_codegen_extensions_proto_depIdxs = []int32{ 0, // 0: mir.struct:extendee -> google.protobuf.MessageOptions diff --git a/pkg/pb/net/codegen_extensions.pb.go b/pkg/pb/net/codegen_extensions.pb.go index 8175c8679..2664c3c27 100644 --- a/pkg/pb/net/codegen_extensions.pb.go +++ b/pkg/pb/net/codegen_extensions.pb.go @@ -1,15 +1,15 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0-devel -// protoc v3.14.0 +// protoc-gen-go v1.28.1 +// protoc v3.12.4 // source: net/codegen_extensions.proto package net import ( + descriptor "github.com/golang/protobuf/protoc-gen-go/descriptor" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - descriptorpb "google.golang.org/protobuf/types/descriptorpb" reflect "reflect" ) @@ -22,7 +22,7 @@ const ( var file_net_codegen_extensions_proto_extTypes = []protoimpl.ExtensionInfo{ { - ExtendedType: (*descriptorpb.MessageOptions)(nil), + ExtendedType: (*descriptor.MessageOptions)(nil), ExtensionType: (*bool)(nil), Field: 61000, Name: "net.message_root", @@ -30,7 +30,7 @@ var file_net_codegen_extensions_proto_extTypes = []protoimpl.ExtensionInfo{ Filename: "net/codegen_extensions.proto", }, { - ExtendedType: (*descriptorpb.MessageOptions)(nil), + ExtendedType: (*descriptor.MessageOptions)(nil), ExtensionType: (*bool)(nil), Field: 61001, Name: "net.message_class", @@ -38,7 +38,7 @@ var file_net_codegen_extensions_proto_extTypes = []protoimpl.ExtensionInfo{ Filename: "net/codegen_extensions.proto", }, { - ExtendedType: (*descriptorpb.MessageOptions)(nil), + ExtendedType: (*descriptor.MessageOptions)(nil), ExtensionType: (*bool)(nil), Field: 61002, Name: "net.message", @@ -46,7 +46,7 @@ var file_net_codegen_extensions_proto_extTypes = []protoimpl.ExtensionInfo{ Filename: "net/codegen_extensions.proto", }, { - ExtendedType: (*descriptorpb.OneofOptions)(nil), + ExtendedType: (*descriptor.OneofOptions)(nil), ExtensionType: (*bool)(nil), Field: 61001, Name: "net.message_type", @@ -55,7 +55,7 @@ var file_net_codegen_extensions_proto_extTypes = []protoimpl.ExtensionInfo{ }, } -// Extension fields to descriptorpb.MessageOptions. +// Extension fields to descriptor.MessageOptions. var ( // optional bool message_root = 61000; E_MessageRoot = &file_net_codegen_extensions_proto_extTypes[0] @@ -65,7 +65,7 @@ var ( E_Message = &file_net_codegen_extensions_proto_extTypes[2] ) -// Extension fields to descriptorpb.OneofOptions. +// Extension fields to descriptor.OneofOptions. var ( // optional bool message_type = 61001; E_MessageType = &file_net_codegen_extensions_proto_extTypes[3] @@ -102,8 +102,8 @@ var file_net_codegen_extensions_proto_rawDesc = []byte{ } var file_net_codegen_extensions_proto_goTypes = []interface{}{ - (*descriptorpb.MessageOptions)(nil), // 0: google.protobuf.MessageOptions - (*descriptorpb.OneofOptions)(nil), // 1: google.protobuf.OneofOptions + (*descriptor.MessageOptions)(nil), // 0: google.protobuf.MessageOptions + (*descriptor.OneofOptions)(nil), // 1: google.protobuf.OneofOptions } var file_net_codegen_extensions_proto_depIdxs = []int32{ 0, // 0: net.message_root:extendee -> google.protobuf.MessageOptions diff --git a/pkg/pb/ordererpb/ordererpb.pb.go b/pkg/pb/ordererpb/ordererpb.pb.go index 6be8f8e28..c7dcba5cd 100644 --- a/pkg/pb/ordererpb/ordererpb.pb.go +++ b/pkg/pb/ordererpb/ordererpb.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0-devel -// protoc v3.14.0 +// protoc-gen-go v1.28.1 +// protoc v3.12.4 // source: ordererpb/ordererpb.proto package ordererpb diff --git a/pkg/pb/ordererpb/pprepvalidatorpb/pprepvalidatorpb.pb.go b/pkg/pb/ordererpb/pprepvalidatorpb/pprepvalidatorpb.pb.go index 40f6d4855..e84c1442c 100644 --- a/pkg/pb/ordererpb/pprepvalidatorpb/pprepvalidatorpb.pb.go +++ b/pkg/pb/ordererpb/pprepvalidatorpb/pprepvalidatorpb.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0-devel -// protoc v3.14.0 +// protoc-gen-go v1.28.1 +// protoc v3.12.4 // source: ordererpb/pprepvalidatorpb/pprepvalidatorpb.proto package pprepvalidatorpb diff --git a/pkg/pb/pbftpb/pbftpb.pb.go b/pkg/pb/pbftpb/pbftpb.pb.go index 62b472a49..1eef4f3ac 100644 --- a/pkg/pb/pbftpb/pbftpb.pb.go +++ b/pkg/pb/pbftpb/pbftpb.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0-devel -// protoc v3.14.0 +// protoc-gen-go v1.28.1 +// protoc v3.12.4 // source: pbftpb/pbftpb.proto package pbftpb diff --git a/pkg/pb/pingpongpb/pingpongpb.pb.go b/pkg/pb/pingpongpb/pingpongpb.pb.go index 2f88aec7c..75f77c579 100644 --- a/pkg/pb/pingpongpb/pingpongpb.pb.go +++ b/pkg/pb/pingpongpb/pingpongpb.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0-devel -// protoc v3.14.0 +// protoc-gen-go v1.28.1 +// protoc v3.12.4 // source: pingpongpb/pingpongpb.proto package pingpongpb diff --git a/pkg/pb/recordingpb/recordingpb.pb.go b/pkg/pb/recordingpb/recordingpb.pb.go index 2585b98fa..c528445c3 100644 --- a/pkg/pb/recordingpb/recordingpb.pb.go +++ b/pkg/pb/recordingpb/recordingpb.pb.go @@ -5,8 +5,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0-devel -// protoc v3.14.0 +// protoc-gen-go v1.28.1 +// protoc v3.12.4 // source: recordingpb/recordingpb.proto package recordingpb diff --git a/pkg/pb/testerpb/testerpb.pb.go b/pkg/pb/testerpb/testerpb.pb.go index 7dedd89c7..c7635844e 100644 --- a/pkg/pb/testerpb/testerpb.pb.go +++ b/pkg/pb/testerpb/testerpb.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0-devel -// protoc v3.14.0 +// protoc-gen-go v1.28.1 +// protoc v3.12.4 // source: testerpb/testerpb.proto package testerpb diff --git a/pkg/pb/threshcryptopb/threshcryptopb.pb.go b/pkg/pb/threshcryptopb/threshcryptopb.pb.go index 739438330..d1ae43923 100644 --- a/pkg/pb/threshcryptopb/threshcryptopb.pb.go +++ b/pkg/pb/threshcryptopb/threshcryptopb.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0-devel -// protoc v3.14.0 +// protoc-gen-go v1.28.1 +// protoc v3.12.4 // source: threshcryptopb/threshcryptopb.proto package threshcryptopb diff --git a/pkg/pb/transportpb/transportpb.pb.go b/pkg/pb/transportpb/transportpb.pb.go index ef42d1f2b..15babbc11 100644 --- a/pkg/pb/transportpb/transportpb.pb.go +++ b/pkg/pb/transportpb/transportpb.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0-devel -// protoc v3.14.0 +// protoc-gen-go v1.28.1 +// protoc v3.12.4 // source: transportpb/transportpb.proto package transportpb diff --git a/pkg/pb/trantorpb/trantorpb.pb.go b/pkg/pb/trantorpb/trantorpb.pb.go index ad414366b..72c10d176 100644 --- a/pkg/pb/trantorpb/trantorpb.pb.go +++ b/pkg/pb/trantorpb/trantorpb.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0-devel -// protoc v3.14.0 +// protoc-gen-go v1.28.1 +// protoc v3.12.4 // source: trantorpb/trantorpb.proto package trantorpb diff --git a/pkg/transactionreceiver/transactionreceiver.pb.go b/pkg/transactionreceiver/transactionreceiver.pb.go index c67b5b369..8df789148 100644 --- a/pkg/transactionreceiver/transactionreceiver.pb.go +++ b/pkg/transactionreceiver/transactionreceiver.pb.go @@ -5,8 +5,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0-devel -// protoc v3.14.0 +// protoc-gen-go v1.28.1 +// protoc v3.12.4 // source: transactionreceiver/transactionreceiver.proto package transactionreceiver diff --git a/pkg/transactionreceiver/transactionreceiver_grpc.pb.go b/pkg/transactionreceiver/transactionreceiver_grpc.pb.go index c088751b1..f75745de8 100644 --- a/pkg/transactionreceiver/transactionreceiver_grpc.pb.go +++ b/pkg/transactionreceiver/transactionreceiver_grpc.pb.go @@ -1,4 +1,8 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.2.0 +// - protoc v3.12.4 +// source: transactionreceiver/transactionreceiver.proto package transactionreceiver diff --git a/pkg/util/maputil/maputil.go b/pkg/util/maputil/maputil.go index 74568c98f..d6541ee6c 100644 --- a/pkg/util/maputil/maputil.go +++ b/pkg/util/maputil/maputil.go @@ -116,6 +116,16 @@ func Transform[Ki comparable, Vi any, Ko comparable, Vo any](mi map[Ki]Vi, f fun return mo } +func Filter[K comparable, V any](m map[K]V, pred func(K, V) bool) map[K]V { + result := make(map[K]V) + for k, v := range m { + if pred(k, v) { + result[k] = v + } + } + return result +} + // FromSlices constructs and returns a map from two separate slices of keys and corresponding values. // FromSlices panics if the number of keys differs from the number of values. func FromSlices[K comparable, V any](keys []K, vals []V) map[K]V { diff --git a/protos/accountabilitypb/accountabilitypb.proto b/protos/accountabilitypb/accountabilitypb.proto new file mode 100644 index 000000000..290140034 --- /dev/null +++ b/protos/accountabilitypb/accountabilitypb.proto @@ -0,0 +1,89 @@ +syntax = "proto3"; + +package accountabilitypb; + +option go_package = "github.com/filecoin-project/mir/pkg/pb/accountabilitypb"; + +import "trantorpb/trantorpb.proto"; + +import "net/codegen_extensions.proto"; +import "mir/codegen_extensions.proto"; + + +message Event{ + option (mir.event_class) = true; + oneof type { + option (mir.event_type) = true; + + Predecided predecided = 1; + Decided decided = 2; + PoMs poms = 3; + InstanceParams instance_params = 4; + } +} + +message Predecided { + option (mir.event) = true; + + bytes data = 1; +} + +message Decided { + option (mir.event) = true; + + bytes data = 1; +} + +message PoM { + option (mir.struct) = true; + + string node_id = 1 [(mir.type) = "github.com/filecoin-project/mir/pkg/types.NodeID"]; + SignedPredecision conflicting_msg_1 = 2; + SignedPredecision conflicting_msg_2 = 3; + +} + +message LightCertificate { + option (net.message) = true; + bytes data = 1; +} + +message PoMs { + option (mir.event) = true; + option (net.message) = true; + + repeated PoM poms = 1; +} + +message Message { + option (net.message_class) = true; + + oneof type { + option (net.message_type) = true; + + SignedPredecision signed_predecision = 1; + FullCertificate certificate = 2; + PoMs poms = 3; + LightCertificate light_certificate = 4; + } +} + +message SignedPredecision { + option (net.message) = true; + option (mir.struct) = true; + + bytes predecision = 1; + bytes signature = 2; +} + +message FullCertificate { + option (net.message) = true; + + map certificate = 1 [(mir.key_type) = "github.com/filecoin-project/mir/pkg/types.NodeID"]; +} + +message InstanceParams { + option (mir.event) = true; + + trantorpb.Membership membership = 3; +} diff --git a/protos/availabilitypb/batchdbpb/batchdbpb.proto b/protos/availabilitypb/batchdbpb/batchdbpb.proto index 4157f0f8d..97fc85fe6 100644 --- a/protos/availabilitypb/batchdbpb/batchdbpb.proto +++ b/protos/availabilitypb/batchdbpb/batchdbpb.proto @@ -75,13 +75,13 @@ message GarbageCollect { message LookupBatchOrigin { option (mir.event_class) = true; - string module = 1 [(mir.type) = "github.com/filecoin-project/mir/pkg/types.ModuleID"]; - oneof Type { - option (mir.event_type) = true; + string module = 1 [(mir.type) = "github.com/filecoin-project/mir/pkg/types.ModuleID"]; + oneof Type { + option (mir.event_type) = true; - contextstorepb.Origin context_store = 2; - dslpb.Origin dsl = 3; - } + contextstorepb.Origin context_store = 2; + dslpb.Origin dsl = 3; + } } message StoreBatchOrigin { diff --git a/protos/eventpb/eventpb.proto b/protos/eventpb/eventpb.proto index 7e71e0fdf..1bb8c261c 100644 --- a/protos/eventpb/eventpb.proto +++ b/protos/eventpb/eventpb.proto @@ -23,6 +23,7 @@ import "hasherpb/hasherpb.proto"; import "cryptopb/cryptopb.proto"; import "transportpb/transportpb.proto"; import "testerpb/testerpb.proto"; +import "accountabilitypb/accountabilitypb.proto"; import "mir/codegen_extensions.proto"; @@ -58,6 +59,7 @@ message Event { transportpb.Event transport = 23; chkpvalidatorpb.Event chkp_validator = 24; pprepvalidatorpb.Event pprep_valiadtor = 25; + accountabilitypb.Event accountability = 26; // Events for code samples diff --git a/protos/factorypb/factorypb.proto b/protos/factorypb/factorypb.proto index a3a080a8b..20b959ced 100644 --- a/protos/factorypb/factorypb.proto +++ b/protos/factorypb/factorypb.proto @@ -8,7 +8,7 @@ import "availabilitypb/mscpb/mscpb.proto"; import "checkpointpb/checkpointpb.proto"; import "ordererpb/ordererpb.proto"; import "ordererpb/pprepvalidatorpb/pprepvalidatorpb.proto"; - +import "accountabilitypb/accountabilitypb.proto"; import "mir/codegen_extensions.proto"; @@ -52,6 +52,7 @@ message GeneratorParams { EchoModuleParams echo_test_module = 3; ordererpb.PBFTModule pbft_module = 4; pprepvalidatorpb.PPrepValidatorChkp ppv_module = 5; + accountabilitypb.InstanceParams acc_module = 6; } } diff --git a/protos/generate.go b/protos/generate.go index b16ff152b..d330d8b1f 100644 --- a/protos/generate.go +++ b/protos/generate.go @@ -43,6 +43,7 @@ package protos //go:generate protoc-events cryptopb/cryptopb.proto //go:generate protoc-events apppb/apppb.proto //go:generate protoc-events transportpb/transportpb.proto +//go:generate protoc-events accountabilitypb/accountabilitypb.proto //go:generate protoc-events testerpb/testerpb.proto // Build the custom code generators. @@ -73,6 +74,7 @@ package protos //go:generate std-gen "github.com/filecoin-project/mir/pkg/pb/cryptopb" //go:generate std-gen "github.com/filecoin-project/mir/pkg/pb/apppb" //go:generate std-gen "github.com/filecoin-project/mir/pkg/pb/transportpb" +//go:generate std-gen "github.com/filecoin-project/mir/pkg/pb/accountabilitypb" //go:generate std-gen "github.com/filecoin-project/mir/pkg/pb/testerpb" //go:generate std-gen "github.com/filecoin-project/mir/pkg/pb/pingpongpb" diff --git a/protos/messagepb/messagepb.proto b/protos/messagepb/messagepb.proto index b440113e6..b7efb5c1d 100644 --- a/protos/messagepb/messagepb.proto +++ b/protos/messagepb/messagepb.proto @@ -16,6 +16,7 @@ import "availabilitypb/mscpb/mscpb.proto"; import "pingpongpb/pingpongpb.proto"; import "checkpointpb/checkpointpb.proto"; import "ordererpb/ordererpb.proto"; +import "accountabilitypb/accountabilitypb.proto"; import "mir/codegen_extensions.proto"; import "net/codegen_extensions.proto"; @@ -28,11 +29,13 @@ message Message { oneof type { option (net.message_type) = true; - isspb.ISSMessage iss = 2; - bcbpb.Message bcb = 3; - availabilitypb.mscpb.Message multisig_collector = 4; - pingpongpb.Message pingpong = 5; - checkpointpb.Message checkpoint = 6; - ordererpb.Message orderer = 7; + isspb.ISSMessage iss = 2; + bcbpb.Message bcb = 3; + availabilitypb.mscpb.Message multisig_collector = 4; + pingpongpb.Message pingpong = 5; + checkpointpb.Message checkpoint = 6; + ordererpb.Message orderer = 7; + accountabilitypb.Message accountability = 8; + } } From 4a1ba95de41d49df6a0d3976a50b50e63f20cfed Mon Sep 17 00:00:00 2001 From: Alejandro Ranchal-Pedrosa Date: Fri, 28 Jul 2023 16:39:13 +0200 Subject: [PATCH 02/14] Implement accountability module (as a factory) --- .../simpleacc/accountability.go | 137 +++++++++++++++ pkg/accountability/simpleacc/common/common.go | 24 +++ .../fullcertificates/fullcertificates.go | 81 +++++++++ .../lightcertificates/lightcertificates.go | 51 ++++++ .../simpleacc/internal/common/common.go | 16 ++ .../simpleacc/internal/poms/poms.go | 116 ++++++++++++ .../internal/predecisions/predecisions.go | 165 ++++++++++++++++++ 7 files changed, 590 insertions(+) create mode 100644 pkg/accountability/simpleacc/accountability.go create mode 100644 pkg/accountability/simpleacc/common/common.go create mode 100644 pkg/accountability/simpleacc/internal/certificates/fullcertificates/fullcertificates.go create mode 100644 pkg/accountability/simpleacc/internal/certificates/lightcertificates/lightcertificates.go create mode 100644 pkg/accountability/simpleacc/internal/common/common.go create mode 100644 pkg/accountability/simpleacc/internal/poms/poms.go create mode 100644 pkg/accountability/simpleacc/internal/predecisions/predecisions.go diff --git a/pkg/accountability/simpleacc/accountability.go b/pkg/accountability/simpleacc/accountability.go new file mode 100644 index 000000000..61a61b59f --- /dev/null +++ b/pkg/accountability/simpleacc/accountability.go @@ -0,0 +1,137 @@ +package simpleacc + +import ( + "github.com/filecoin-project/mir/pkg/accountability/simpleacc/common" + "github.com/filecoin-project/mir/pkg/accountability/simpleacc/internal/certificates/fullcertificates" + incommon "github.com/filecoin-project/mir/pkg/accountability/simpleacc/internal/common" + "github.com/filecoin-project/mir/pkg/accountability/simpleacc/internal/poms" + "github.com/filecoin-project/mir/pkg/accountability/simpleacc/internal/predecisions" + "github.com/filecoin-project/mir/pkg/dsl" + "github.com/filecoin-project/mir/pkg/factorymodule" + "github.com/filecoin-project/mir/pkg/logging" + "github.com/filecoin-project/mir/pkg/modules" + accpbtypes "github.com/filecoin-project/mir/pkg/pb/accountabilitypb/types" + factorypbtypes "github.com/filecoin-project/mir/pkg/pb/factorypb/types" + t "github.com/filecoin-project/mir/pkg/types" +) + +// ModuleConfig sets the module ids. All replicas are expected to use identical module configurations. +type ModuleConfig = common.ModuleConfig + +// ModuleParams sets the values for the parameters of an instance of the protocol. +// All replicas are expected to use identical module parameters. +type ModuleParams = common.ModuleParams + +// NewModule creates a new instance of the (optinal) accountability +// module. +// This module can receive predecisions from an +// ordering module (instead of the ordering module delivering them to the +// application layer directly). It performs two all-to-all broadcasts +// with signatures to ensure accountability. The first broadcast is a +// signed predecision per participant. In the second broadcast, each +// participant broadcasts a certificate containing a strong quorum of +// signed predecisions that they each delivered from the first +// broadcast. Termination occurs once a process receives a strong quorum +// of correctly signed predecisions. +// *Accountability* states that if an adversary (controlling less than a +// strong quorum, but perhaps more or as much as a weak quorum) causes +// a disagreement (two different correct processes delivering different +// decisions) then there is at least a weak quorum of processes for which +// all correct processes eventually receive Proofs-of-Misbehavior (PoMs). +// In the case of this module, a PoM is a pair of signed predecisions for +// different predecisions from the same node. +// The module keeps looking for PoMs with newly received messages +// (signed predecisions or certificates) after termination, until +// it is garbage collected. +// + +// Intuition of correctness: a process only terminates if it receives a +// strong quorum of signed predecisions from distinct processes, forming +// a certificate. Once this process forms a certificate, it shares it +// with the rest of participants. If all correct processes terminate, +// then that means all correct processes will (i) deliver a strong quorum +// of signed predecisions and (ii) broadcast them in a certificate. Thus, +// if two correct processes p_1, p_2 disagree (decide d_1, d_2, +// respectively) then that means they must have each delivered a strong +// quorum of signed predecisions for different predecisions. By quorum +// intersection, this means that at least a weak quorum of processes have +// signed respective predecisions for d_1, d_2 and sent each of them to +// the respective correct process p_1, p_2. Once p_1 receives the +// certificate that p_2 broadcasted, p_1 will then generate a weak quorum +// of PoMs (and vice versa) and broadcast it to the rest of processes. +// +// This module effectively implements a variant of the accountability +// module of Civit et al. at https://ieeexplore.ieee.org/document/9820722/ +// Except that it ReportedPoMs map[t.NodeID]*accpbtypes.PoM +// does not implement the optimization using threshold +// signatures (as we have members with associated weight) +// + +// The optimistic variant of this module is a parametrizable optimization +// in which certificates are optimistically believed to be correct. This way, +// in the good case a correct process broadcasts a light certificate of O(1) bits +// (instead of O(n) of a certificate) +// and only actually sends the full certificate to nodes from which it receives a light certificate +// for a predecision other than the locally Decided one. The recipient of the certificate can then +// generate and broadcast the PoMs. +// +// ATTENTION: This module is intended to be used once per instance +// (to avoid replay attacks) and reinstantiated in a factory. +func NewModule(mc ModuleConfig, params *ModuleParams, logger logging.Logger) (modules.PassiveModule, error) { + m := dsl.NewModule(mc.Self) + + state := &incommon.State{ + SignedPredecisions: make(map[t.NodeID]*accpbtypes.SignedPredecision), + PredecisionCount: make(map[string][]t.NodeID), + SignedPredecision: nil, + DecidedCertificate: nil, + Predecided: false, + UnsentPoMs: make([]*accpbtypes.PoM, 0), + SentPoMs: make(map[t.NodeID]*accpbtypes.PoM), + } + + predecisions.IncludePredecisions(m, &mc, params, state, logger) + fullcertificates.IncludeFullCertificate(m, &mc, params, state, logger) + poms.IncludePoMs(m, &mc, params, state, logger) + + return m, nil +} + +func NewReconfigurableModule(mc ModuleConfig, paramsTemplate ModuleParams, logger logging.Logger) modules.PassiveModule { + if logger == nil { + logger = logging.ConsoleErrorLogger + } + return factorymodule.New( + mc.Self, + factorymodule.DefaultParams( + + // This function will be called whenever the factory module + // is asked to create a new instance of the multisig collector. + func(accID t.ModuleID, params *factorypbtypes.GeneratorParams) (modules.PassiveModule, error) { + + // Extract the IDs of the nodes in the membership associated with this instance + accParams := params.Type.(*factorypbtypes.GeneratorParams_AccModule).AccModule + + // Create a copy of basic module config with an adapted ID for the submodule. + submc := mc + submc.Self = accID + + // Fill in instance-specific parameters. + moduleParams := paramsTemplate + moduleParams.Membership = accParams.Membership + + // Create a new instance of the multisig collector. + accountabilityModule, err := NewModule( + submc, + &moduleParams, + logger, + ) + if err != nil { + return nil, err + } + return accountabilityModule, nil + }, + ), + logger, + ) +} diff --git a/pkg/accountability/simpleacc/common/common.go b/pkg/accountability/simpleacc/common/common.go new file mode 100644 index 000000000..a9079fbaa --- /dev/null +++ b/pkg/accountability/simpleacc/common/common.go @@ -0,0 +1,24 @@ +package common + +import ( + trantorpbtypes "github.com/filecoin-project/mir/pkg/pb/trantorpb/types" + t "github.com/filecoin-project/mir/pkg/types" +) + +// ModuleConfig sets the module ids. All replicas are expected to use identical module configurations. +type ModuleConfig struct { + Self t.ModuleID // id of this module, used to uniquely identify an instance of the accountability module. + // It prevents cross-instance signature replay attack and should be unique across all executions. + + Ordering t.ModuleID // provides Predecisions + App t.ModuleID // receives Decisions and/or PoMs + Crypto t.ModuleID // provides cryptographic primitives + Net t.ModuleID // provides network primitives +} + +// ModuleParams sets the values for the parameters of an instance of the protocol. +// All replicas are expected to use identical module parameters. +type ModuleParams struct { + Membership *trantorpbtypes.Membership // the list of participating nodes + LightCertificates bool +} diff --git a/pkg/accountability/simpleacc/internal/certificates/fullcertificates/fullcertificates.go b/pkg/accountability/simpleacc/internal/certificates/fullcertificates/fullcertificates.go new file mode 100644 index 000000000..b040b9242 --- /dev/null +++ b/pkg/accountability/simpleacc/internal/certificates/fullcertificates/fullcertificates.go @@ -0,0 +1,81 @@ +package fullcertificates + +import ( + "reflect" + + "github.com/filecoin-project/mir/pkg/accountability/simpleacc/common" + incommon "github.com/filecoin-project/mir/pkg/accountability/simpleacc/internal/common" + "github.com/filecoin-project/mir/pkg/accountability/simpleacc/internal/poms" + "github.com/filecoin-project/mir/pkg/accountability/simpleacc/internal/predecisions" + "github.com/filecoin-project/mir/pkg/dsl" + "github.com/filecoin-project/mir/pkg/logging" + accpbdsl "github.com/filecoin-project/mir/pkg/pb/accountabilitypb/dsl" + accpbtypes "github.com/filecoin-project/mir/pkg/pb/accountabilitypb/types" + cryptopbdsl "github.com/filecoin-project/mir/pkg/pb/cryptopb/dsl" + cryptopbtypes "github.com/filecoin-project/mir/pkg/pb/cryptopb/types" + t "github.com/filecoin-project/mir/pkg/types" + "github.com/filecoin-project/mir/pkg/util/maputil" + "github.com/filecoin-project/mir/pkg/util/membutil" + "github.com/filecoin-project/mir/pkg/util/sliceutil" +) + +// IncludeFullCertificate implements the full certificate brodcast and verification +// in order to find PoMs +func IncludeFullCertificate(m dsl.Module, + mc *common.ModuleConfig, + params *common.ModuleParams, + state *incommon.State, + logger logging.Logger, +) { + + accpbdsl.UponFullCertificateReceived(m, func(from t.NodeID, certificate map[t.NodeID]*accpbtypes.SignedPredecision) error { + predecision, empty := maputil.AnyVal(certificate) + if empty { + logger.Log(logging.LevelDebug, "Received empty predecision certificate") + return nil + } + + if !membutil.HaveStrongQuorum(params.Membership, maputil.GetKeys(certificate)) { + logger.Log(logging.LevelDebug, "Received predecision certificate without strong quorum") + return nil + } + + for _, v := range certificate { + if !reflect.DeepEqual(predecision.Predecision, v.Predecision) { + logger.Log(logging.LevelDebug, "Received predecision certificate with different predecisions") + return nil + } + } + + // Verify all signatures in certificate + cryptopbdsl.VerifySigs( + m, + mc.Crypto, + sliceutil.Transform(maputil.GetValues(certificate), + func(i int, sp *accpbtypes.SignedPredecision) *cryptopbtypes.SignedData { + return &cryptopbtypes.SignedData{[][]byte{sp.Predecision, []byte(mc.Self)}} + }), + sliceutil.Transform(maputil.GetValues(certificate), + func(i int, sp *accpbtypes.SignedPredecision) []byte { + return sp.Signature + }), + maputil.GetKeys(certificate), + &verifySigs{ + certificate: certificate, + }, + ) + return nil + }) + + cryptopbdsl.UponSigsVerified(m, func(nodeIds []t.NodeID, errs []error, allOk bool, vsr *verifySigs) error { + for i, nodeId := range nodeIds { + predecisions.ApplySigVerified(m, mc, params, state, nodeId, errs[i], vsr.certificate[nodeId], false, logger) + } + poms.SendPoMs(m, mc, params, state, logger) + return nil + }) +} + +type verifySigs struct { + certificate map[t.NodeID]*accpbtypes.SignedPredecision +} diff --git a/pkg/accountability/simpleacc/internal/certificates/lightcertificates/lightcertificates.go b/pkg/accountability/simpleacc/internal/certificates/lightcertificates/lightcertificates.go new file mode 100644 index 000000000..3904b7f9f --- /dev/null +++ b/pkg/accountability/simpleacc/internal/certificates/lightcertificates/lightcertificates.go @@ -0,0 +1,51 @@ +package lightcertificates + +import ( + "reflect" + + "github.com/filecoin-project/mir/pkg/accountability/simpleacc/common" + incommon "github.com/filecoin-project/mir/pkg/accountability/simpleacc/internal/common" + "github.com/filecoin-project/mir/pkg/dsl" + "github.com/filecoin-project/mir/pkg/logging" + accpbdsl "github.com/filecoin-project/mir/pkg/pb/accountabilitypb/dsl" + accpbmsgs "github.com/filecoin-project/mir/pkg/pb/accountabilitypb/msgs" + transportpbdsl "github.com/filecoin-project/mir/pkg/pb/transportpb/dsl" + t "github.com/filecoin-project/mir/pkg/types" + "github.com/filecoin-project/mir/pkg/util/maputil" +) + +// IncludeLightCertificate implements the (optional) light certificate optimization +// that optimistically sends only the predecision during the light certificate +// so that in the good case where there are no disagreements and all processes +// are correct there is no need to broadcast a full certificate containing O(n) signatures +func IncludeLightCertificate(m dsl.Module, + mc *common.ModuleConfig, + params *common.ModuleParams, + state *incommon.State, + logger logging.Logger, +) { + + lightCertificates := make(map[t.NodeID][]byte) + + accpbdsl.UponLightCertificateReceived(m, func(from t.NodeID, data []byte) error { + + if state.DecidedCertificate == nil { + logger.Log(logging.LevelDebug, "Received light certificate before decided certificate, buffering it") + lightCertificates[from] = data + return nil + } + + decision, _ := maputil.AnyVal(state.DecidedCertificate) + + if !reflect.DeepEqual(decision.Predecision, data) { + logger.Log(logging.LevelWarn, "Received light certificate with different predecision than local decision! sending full certificate to node %v", from) + transportpbdsl.SendMessage( + m, + mc.Net, + accpbmsgs.FullCertificate(mc.Self, + state.DecidedCertificate), + []t.NodeID{from}) + } + return nil + }) +} diff --git a/pkg/accountability/simpleacc/internal/common/common.go b/pkg/accountability/simpleacc/internal/common/common.go new file mode 100644 index 000000000..74345c569 --- /dev/null +++ b/pkg/accountability/simpleacc/internal/common/common.go @@ -0,0 +1,16 @@ +package common + +import ( + accpbtypes "github.com/filecoin-project/mir/pkg/pb/accountabilitypb/types" + t "github.com/filecoin-project/mir/pkg/types" +) + +type State struct { + SignedPredecisions map[t.NodeID]*accpbtypes.SignedPredecision + PredecisionCount map[string][]t.NodeID + SignedPredecision *accpbtypes.SignedPredecision + DecidedCertificate map[t.NodeID]*accpbtypes.SignedPredecision + Predecided bool + UnsentPoMs []*accpbtypes.PoM + SentPoMs map[t.NodeID]*accpbtypes.PoM +} diff --git a/pkg/accountability/simpleacc/internal/poms/poms.go b/pkg/accountability/simpleacc/internal/poms/poms.go new file mode 100644 index 000000000..66295934e --- /dev/null +++ b/pkg/accountability/simpleacc/internal/poms/poms.go @@ -0,0 +1,116 @@ +package poms + +import ( + "reflect" + + "github.com/filecoin-project/mir/pkg/accountability/simpleacc/common" + incommon "github.com/filecoin-project/mir/pkg/accountability/simpleacc/internal/common" + "github.com/filecoin-project/mir/pkg/dsl" + "github.com/filecoin-project/mir/pkg/logging" + accpbdsl "github.com/filecoin-project/mir/pkg/pb/accountabilitypb/dsl" + accountabilitypbmsgs "github.com/filecoin-project/mir/pkg/pb/accountabilitypb/msgs" + accpbtypes "github.com/filecoin-project/mir/pkg/pb/accountabilitypb/types" + cryptopbdsl "github.com/filecoin-project/mir/pkg/pb/cryptopb/dsl" + cryptopbtypes "github.com/filecoin-project/mir/pkg/pb/cryptopb/types" + transportpbdsl "github.com/filecoin-project/mir/pkg/pb/transportpb/dsl" + t "github.com/filecoin-project/mir/pkg/types" + "github.com/filecoin-project/mir/pkg/util/maputil" +) + +// IncludePoMs verifies receives PoMs and sends found PoMs to other members +func IncludePoMs( + m dsl.Module, + mc *common.ModuleConfig, + params *common.ModuleParams, + state *incommon.State, + logger logging.Logger, +) { + accpbdsl.UponPoMsReceived(m, func(from t.NodeID, poms []*accpbtypes.PoM) error { + nodeIds := make([]t.NodeID, 0, 2*len(poms)) + data := make([]*cryptopbtypes.SignedData, 0, 2*len(poms)) + signatures := make([][]byte, 0, 2*len(poms)) + + for _, pom := range poms { + if reflect.DeepEqual(pom.ConflictingMsg_1.Predecision, pom.ConflictingMsg_2.Predecision) || + reflect.DeepEqual(pom.ConflictingMsg_1.Signature, pom.ConflictingMsg_2.Signature) { // no need to check, no PoM possible here + continue + } + + if _, ok := params.Membership.Nodes[pom.NodeId]; !ok { + continue + } + + if _, ok := state.SentPoMs[pom.NodeId]; !ok { + continue + } + + nodeIds = append(nodeIds, pom.NodeId, pom.NodeId) + + data = append(data, + &cryptopbtypes.SignedData{[][]byte{pom.ConflictingMsg_1.Predecision, []byte(mc.Self)}}, + &cryptopbtypes.SignedData{[][]byte{pom.ConflictingMsg_2.Predecision, []byte(mc.Self)}}) + + signatures = append(signatures, pom.ConflictingMsg_1.Signature, pom.ConflictingMsg_2.Signature) + } + + if len(data) == 0 { + logger.Log(logging.LevelDebug, "Received empty PoM") + return nil + } + + cryptopbdsl.VerifySigs( + m, + mc.Crypto, + data, + signatures, + nodeIds, + &verifyPoMs{poms}, + ) + return nil + }) + + cryptopbdsl.UponSigsVerified(m, func(nodeIds []t.NodeID, errs []error, allOk bool, vpoms *verifyPoMs) error { + for i := 0; i < len(nodeIds); i += 2 { + if errs[i] == nil && errs[i+1] == nil { + state.UnsentPoMs = append(state.UnsentPoMs, vpoms.poms[i/2]) + } + } + + SendPoMs(m, mc, params, state, logger) + + return nil + }) +} + +// SendPoMs sends all PoMs in State.UnsentPoMs to all nodes and to the application module (from the POV of this module, i.e. mc.App) +func SendPoMs( + m dsl.Module, + mc *common.ModuleConfig, + params *common.ModuleParams, + state *incommon.State, + logger logging.Logger, +) { + if len(state.UnsentPoMs) == 0 { + return + } + logger.Log(logging.LevelWarn, "Found valid PoMs! sending...") + + accpbdsl.PoMs(m, mc.App, state.UnsentPoMs) + + transportpbdsl.SendMessage( + m, + mc.Net, + accountabilitypbmsgs.PoMs(mc.Self, state.UnsentPoMs), + maputil.GetKeys(params.Membership.Nodes), + ) + + for _, pom := range state.UnsentPoMs { + state.SentPoMs[pom.NodeId] = pom + } + + state.UnsentPoMs = make([]*accpbtypes.PoM, 0) +} + +type verifyPoMs struct { + poms []*accpbtypes.PoM +} diff --git a/pkg/accountability/simpleacc/internal/predecisions/predecisions.go b/pkg/accountability/simpleacc/internal/predecisions/predecisions.go new file mode 100644 index 000000000..e7031cc26 --- /dev/null +++ b/pkg/accountability/simpleacc/internal/predecisions/predecisions.go @@ -0,0 +1,165 @@ +package predecisions + +import ( + "reflect" + + "github.com/filecoin-project/mir/pkg/accountability/simpleacc/common" + incommon "github.com/filecoin-project/mir/pkg/accountability/simpleacc/internal/common" + "github.com/filecoin-project/mir/pkg/accountability/simpleacc/internal/poms" + "github.com/filecoin-project/mir/pkg/dsl" + "github.com/filecoin-project/mir/pkg/logging" + accpbdsl "github.com/filecoin-project/mir/pkg/pb/accountabilitypb/dsl" + accpbmsgs "github.com/filecoin-project/mir/pkg/pb/accountabilitypb/msgs" + accpbtypes "github.com/filecoin-project/mir/pkg/pb/accountabilitypb/types" + cryptopbdsl "github.com/filecoin-project/mir/pkg/pb/cryptopb/dsl" + cryptopbtypes "github.com/filecoin-project/mir/pkg/pb/cryptopb/types" + transportpbdsl "github.com/filecoin-project/mir/pkg/pb/transportpb/dsl" + t "github.com/filecoin-project/mir/pkg/types" + "github.com/filecoin-project/mir/pkg/util/maputil" + "github.com/filecoin-project/mir/pkg/util/membutil" +) + +// IncludePredecisions implements the broadcast and treatment of predecisions. +// The broadcast and treatment of certificates is +// externalized to the ../certificates package so that a system can decide whether to instantiate the accountability +// module with full certificates or with the optimistic light certificates. +// The broadcast and treatment of PoMs is also externalized to the ../poms package. +func IncludePredecisions( + m dsl.Module, + mc *common.ModuleConfig, + params *common.ModuleParams, + state *incommon.State, + logger logging.Logger, +) { + + accpbdsl.UponPredecided(m, func(data []byte) error { + + if state.Predecided { + logger.Log(logging.LevelWarn, "Received Predecided message while already Predecided") + return nil + } + + state.Predecided = true + + // Sign predecision attaching mc.Self to prevent replay attacks + cryptopbdsl.SignRequest(m, mc.Crypto, &cryptopbtypes.SignedData{[][]byte{data, []byte(mc.Self)}}, &signRequest{data}) + + return nil + }) + + cryptopbdsl.UponSignResult(m, func(signature []byte, sr *signRequest) error { + state.SignedPredecision = &accpbtypes.SignedPredecision{ + Predecision: sr.data, + Signature: signature, + } + + // Broadcast signed predecision to all participants (including oneself) + transportpbdsl.SendMessage(m, mc.Net, accpbmsgs.SignedPredecision(mc.Self, sr.data, signature), maputil.GetKeys(params.Membership.Nodes)) + return nil + }) + + accpbdsl.UponSignedPredecisionReceived(m, func(from t.NodeID, predecision []byte, signature []byte) error { + + if state.SignedPredecisions[from] != nil { + if reflect.DeepEqual(state.SignedPredecisions[from].Predecision, predecision) { + logger.Log(logging.LevelDebug, "Received the same predecision from node %v twice, ignoring", from) + return nil + } + } + + // Verify signature of received signed predecision + cryptopbdsl.VerifySig(m, mc.Crypto, + &cryptopbtypes.SignedData{[][]byte{predecision, []byte(mc.Self)}}, + signature, + from, + &accpbtypes.SignedPredecision{ + Predecision: predecision, + Signature: signature}) + + return nil + }) + + cryptopbdsl.UponSigVerified(m, func(nodeId t.NodeID, err error, sp *accpbtypes.SignedPredecision) error { + return ApplySigVerified(m, mc, params, state, nodeId, err, sp, true, logger) + }) + +} + +// ApplySigVerified applies the result of a signature verification +// This function is called once a received signed predecision is verified, but also +// For all signatures of a signed predecision contained in a received certificate +// once they are verified +func ApplySigVerified( + m dsl.Module, + mc *common.ModuleConfig, + params *common.ModuleParams, + state *incommon.State, + nodeId t.NodeID, + err error, + sp *accpbtypes.SignedPredecision, + flushPoMs bool, + logger logging.Logger, +) error { + if err != nil { + logger.Log(logging.LevelDebug, "Signature verification failed") + return nil + } + + // Check if PoM found + if state.SignedPredecisions[nodeId] != nil { + if !reflect.DeepEqual(state.SignedPredecisions[nodeId].Predecision, sp.Predecision) { + logger.Log(logging.LevelWarn, "Received conflicting signed predecisions from same node") + // if a PoM for this node has not already been sent + if _, ok := state.SentPoMs[nodeId]; !ok { + state.UnsentPoMs = append(state.UnsentPoMs, + &accpbtypes.PoM{ + NodeId: nodeId, + ConflictingMsg_1: state.SignedPredecisions[nodeId], + ConflictingMsg_2: sp, + }) + + if flushPoMs { + poms.SendPoMs(m, mc, params, state, logger) + } + } + + logger.Log(logging.LevelDebug, "Discarding signed predecision as already received one from same node") + return nil + } + } + + // Store signed predecision + state.SignedPredecisions[nodeId] = sp + if state.PredecisionCount[string(sp.Predecision)] == nil { + state.PredecisionCount[string(sp.Predecision)] = make([]t.NodeID, 0) + } + state.PredecisionCount[string(sp.Predecision)] = append(state.PredecisionCount[string(sp.Predecision)], nodeId) + + // Once verified, if strong quorum, broadcast accpbdsl.FullCertificate + if state.DecidedCertificate == nil && + membutil.HaveStrongQuorum(params.Membership, state.PredecisionCount[string(sp.Predecision)]) { + state.DecidedCertificate = maputil.Filter( + state.SignedPredecisions, + func( + nodeId t.NodeID, + predecision *accpbtypes.SignedPredecision, + ) bool { + return reflect.DeepEqual(predecision.Predecision, sp.Predecision) + }) + + accpbdsl.Decided(m, mc.App, sp.Predecision) + + transportpbdsl.SendMessage( + m, + mc.Net, + accpbmsgs.FullCertificate(mc.Self, + state.DecidedCertificate), + maputil.GetKeys(params.Membership.Nodes)) + } + + return nil +} + +type signRequest struct { + data []byte +} From 5bc0c7d6936bbdadf50b7b1eea31c88ebcbc9a8a Mon Sep 17 00:00:00 2001 From: Alejandro Ranchal-Pedrosa Date: Fri, 28 Jul 2023 16:39:59 +0200 Subject: [PATCH 03/14] Implement light certificates optimization --- .../simpleacc/accountability.go | 4 + .../internal/predecisions/predecisions.go | 21 +- .../accountabilitypb/accountabilitypb.pb.go | 959 ++++++++++++++++++ .../accountabilitypb.pb.mir.go | 25 + pkg/pb/accountabilitypb/dsl/emit.mir.go | 29 + pkg/pb/accountabilitypb/dsl/messages.mir.go | 48 + pkg/pb/accountabilitypb/dsl/upon.mir.go | 47 + pkg/pb/accountabilitypb/events/events.mir.go | 70 ++ pkg/pb/accountabilitypb/msgs/msgs.mir.go | 70 ++ .../accountabilitypb/oneof_interfaces.mir.go | 49 + pkg/pb/accountabilitypb/types/types.mir.go | 577 +++++++++++ 11 files changed, 1893 insertions(+), 6 deletions(-) create mode 100644 pkg/pb/accountabilitypb/accountabilitypb.pb.go create mode 100644 pkg/pb/accountabilitypb/accountabilitypb.pb.mir.go create mode 100644 pkg/pb/accountabilitypb/dsl/emit.mir.go create mode 100644 pkg/pb/accountabilitypb/dsl/messages.mir.go create mode 100644 pkg/pb/accountabilitypb/dsl/upon.mir.go create mode 100644 pkg/pb/accountabilitypb/events/events.mir.go create mode 100644 pkg/pb/accountabilitypb/msgs/msgs.mir.go create mode 100644 pkg/pb/accountabilitypb/oneof_interfaces.mir.go create mode 100644 pkg/pb/accountabilitypb/types/types.mir.go diff --git a/pkg/accountability/simpleacc/accountability.go b/pkg/accountability/simpleacc/accountability.go index 61a61b59f..2cf073e05 100644 --- a/pkg/accountability/simpleacc/accountability.go +++ b/pkg/accountability/simpleacc/accountability.go @@ -3,6 +3,7 @@ package simpleacc import ( "github.com/filecoin-project/mir/pkg/accountability/simpleacc/common" "github.com/filecoin-project/mir/pkg/accountability/simpleacc/internal/certificates/fullcertificates" + "github.com/filecoin-project/mir/pkg/accountability/simpleacc/internal/certificates/lightcertificates" incommon "github.com/filecoin-project/mir/pkg/accountability/simpleacc/internal/common" "github.com/filecoin-project/mir/pkg/accountability/simpleacc/internal/poms" "github.com/filecoin-project/mir/pkg/accountability/simpleacc/internal/predecisions" @@ -92,6 +93,9 @@ func NewModule(mc ModuleConfig, params *ModuleParams, logger logging.Logger) (mo predecisions.IncludePredecisions(m, &mc, params, state, logger) fullcertificates.IncludeFullCertificate(m, &mc, params, state, logger) + if params.LightCertificates { + lightcertificates.IncludeLightCertificate(m, &mc, params, state, logger) + } poms.IncludePoMs(m, &mc, params, state, logger) return m, nil diff --git a/pkg/accountability/simpleacc/internal/predecisions/predecisions.go b/pkg/accountability/simpleacc/internal/predecisions/predecisions.go index e7031cc26..3fc80625b 100644 --- a/pkg/accountability/simpleacc/internal/predecisions/predecisions.go +++ b/pkg/accountability/simpleacc/internal/predecisions/predecisions.go @@ -149,12 +149,21 @@ func ApplySigVerified( accpbdsl.Decided(m, mc.App, sp.Predecision) - transportpbdsl.SendMessage( - m, - mc.Net, - accpbmsgs.FullCertificate(mc.Self, - state.DecidedCertificate), - maputil.GetKeys(params.Membership.Nodes)) + if params.LightCertificates { + transportpbdsl.SendMessage( + m, + mc.Net, + accpbmsgs.LightCertificate(mc.Self, + sp.Predecision), + maputil.GetKeys(params.Membership.Nodes)) + } else { + transportpbdsl.SendMessage( + m, + mc.Net, + accpbmsgs.FullCertificate(mc.Self, + state.DecidedCertificate), + maputil.GetKeys(params.Membership.Nodes)) + } } return nil diff --git a/pkg/pb/accountabilitypb/accountabilitypb.pb.go b/pkg/pb/accountabilitypb/accountabilitypb.pb.go new file mode 100644 index 000000000..c107ea919 --- /dev/null +++ b/pkg/pb/accountabilitypb/accountabilitypb.pb.go @@ -0,0 +1,959 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.1 +// protoc v3.12.4 +// source: accountabilitypb/accountabilitypb.proto + +package accountabilitypb + +import ( + _ "github.com/filecoin-project/mir/pkg/pb/mir" + _ "github.com/filecoin-project/mir/pkg/pb/net" + trantorpb "github.com/filecoin-project/mir/pkg/pb/trantorpb" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +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) +) + +type Event struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Type: + // *Event_Predecided + // *Event_Decided + // *Event_Poms + // *Event_InstanceParams + Type isEvent_Type `protobuf_oneof:"type"` +} + +func (x *Event) Reset() { + *x = Event{} + if protoimpl.UnsafeEnabled { + mi := &file_accountabilitypb_accountabilitypb_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Event) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Event) ProtoMessage() {} + +func (x *Event) ProtoReflect() protoreflect.Message { + mi := &file_accountabilitypb_accountabilitypb_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Event.ProtoReflect.Descriptor instead. +func (*Event) Descriptor() ([]byte, []int) { + return file_accountabilitypb_accountabilitypb_proto_rawDescGZIP(), []int{0} +} + +func (m *Event) GetType() isEvent_Type { + if m != nil { + return m.Type + } + return nil +} + +func (x *Event) GetPredecided() *Predecided { + if x, ok := x.GetType().(*Event_Predecided); ok { + return x.Predecided + } + return nil +} + +func (x *Event) GetDecided() *Decided { + if x, ok := x.GetType().(*Event_Decided); ok { + return x.Decided + } + return nil +} + +func (x *Event) GetPoms() *PoMs { + if x, ok := x.GetType().(*Event_Poms); ok { + return x.Poms + } + return nil +} + +func (x *Event) GetInstanceParams() *InstanceParams { + if x, ok := x.GetType().(*Event_InstanceParams); ok { + return x.InstanceParams + } + return nil +} + +type isEvent_Type interface { + isEvent_Type() +} + +type Event_Predecided struct { + Predecided *Predecided `protobuf:"bytes,1,opt,name=predecided,proto3,oneof"` +} + +type Event_Decided struct { + Decided *Decided `protobuf:"bytes,2,opt,name=decided,proto3,oneof"` +} + +type Event_Poms struct { + Poms *PoMs `protobuf:"bytes,3,opt,name=poms,proto3,oneof"` +} + +type Event_InstanceParams struct { + InstanceParams *InstanceParams `protobuf:"bytes,4,opt,name=instance_params,json=instanceParams,proto3,oneof"` +} + +func (*Event_Predecided) isEvent_Type() {} + +func (*Event_Decided) isEvent_Type() {} + +func (*Event_Poms) isEvent_Type() {} + +func (*Event_InstanceParams) isEvent_Type() {} + +type Predecided struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` +} + +func (x *Predecided) Reset() { + *x = Predecided{} + if protoimpl.UnsafeEnabled { + mi := &file_accountabilitypb_accountabilitypb_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Predecided) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Predecided) ProtoMessage() {} + +func (x *Predecided) ProtoReflect() protoreflect.Message { + mi := &file_accountabilitypb_accountabilitypb_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Predecided.ProtoReflect.Descriptor instead. +func (*Predecided) Descriptor() ([]byte, []int) { + return file_accountabilitypb_accountabilitypb_proto_rawDescGZIP(), []int{1} +} + +func (x *Predecided) GetData() []byte { + if x != nil { + return x.Data + } + return nil +} + +type Decided struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` +} + +func (x *Decided) Reset() { + *x = Decided{} + if protoimpl.UnsafeEnabled { + mi := &file_accountabilitypb_accountabilitypb_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Decided) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Decided) ProtoMessage() {} + +func (x *Decided) ProtoReflect() protoreflect.Message { + mi := &file_accountabilitypb_accountabilitypb_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Decided.ProtoReflect.Descriptor instead. +func (*Decided) Descriptor() ([]byte, []int) { + return file_accountabilitypb_accountabilitypb_proto_rawDescGZIP(), []int{2} +} + +func (x *Decided) GetData() []byte { + if x != nil { + return x.Data + } + return nil +} + +type PoM struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + NodeId string `protobuf:"bytes,1,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"` + ConflictingMsg_1 *SignedPredecision `protobuf:"bytes,2,opt,name=conflicting_msg_1,json=conflictingMsg1,proto3" json:"conflicting_msg_1,omitempty"` + ConflictingMsg_2 *SignedPredecision `protobuf:"bytes,3,opt,name=conflicting_msg_2,json=conflictingMsg2,proto3" json:"conflicting_msg_2,omitempty"` +} + +func (x *PoM) Reset() { + *x = PoM{} + if protoimpl.UnsafeEnabled { + mi := &file_accountabilitypb_accountabilitypb_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PoM) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PoM) ProtoMessage() {} + +func (x *PoM) ProtoReflect() protoreflect.Message { + mi := &file_accountabilitypb_accountabilitypb_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PoM.ProtoReflect.Descriptor instead. +func (*PoM) Descriptor() ([]byte, []int) { + return file_accountabilitypb_accountabilitypb_proto_rawDescGZIP(), []int{3} +} + +func (x *PoM) GetNodeId() string { + if x != nil { + return x.NodeId + } + return "" +} + +func (x *PoM) GetConflictingMsg_1() *SignedPredecision { + if x != nil { + return x.ConflictingMsg_1 + } + return nil +} + +func (x *PoM) GetConflictingMsg_2() *SignedPredecision { + if x != nil { + return x.ConflictingMsg_2 + } + return nil +} + +type LightCertificate struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` +} + +func (x *LightCertificate) Reset() { + *x = LightCertificate{} + if protoimpl.UnsafeEnabled { + mi := &file_accountabilitypb_accountabilitypb_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LightCertificate) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LightCertificate) ProtoMessage() {} + +func (x *LightCertificate) ProtoReflect() protoreflect.Message { + mi := &file_accountabilitypb_accountabilitypb_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LightCertificate.ProtoReflect.Descriptor instead. +func (*LightCertificate) Descriptor() ([]byte, []int) { + return file_accountabilitypb_accountabilitypb_proto_rawDescGZIP(), []int{4} +} + +func (x *LightCertificate) GetData() []byte { + if x != nil { + return x.Data + } + return nil +} + +type PoMs struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Poms []*PoM `protobuf:"bytes,1,rep,name=poms,proto3" json:"poms,omitempty"` +} + +func (x *PoMs) Reset() { + *x = PoMs{} + if protoimpl.UnsafeEnabled { + mi := &file_accountabilitypb_accountabilitypb_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PoMs) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PoMs) ProtoMessage() {} + +func (x *PoMs) ProtoReflect() protoreflect.Message { + mi := &file_accountabilitypb_accountabilitypb_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PoMs.ProtoReflect.Descriptor instead. +func (*PoMs) Descriptor() ([]byte, []int) { + return file_accountabilitypb_accountabilitypb_proto_rawDescGZIP(), []int{5} +} + +func (x *PoMs) GetPoms() []*PoM { + if x != nil { + return x.Poms + } + return nil +} + +type Message struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Type: + // *Message_SignedPredecision + // *Message_Certificate + // *Message_Poms + // *Message_LightCertificate + Type isMessage_Type `protobuf_oneof:"type"` +} + +func (x *Message) Reset() { + *x = Message{} + if protoimpl.UnsafeEnabled { + mi := &file_accountabilitypb_accountabilitypb_proto_msgTypes[6] + 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_accountabilitypb_accountabilitypb_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && 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_accountabilitypb_accountabilitypb_proto_rawDescGZIP(), []int{6} +} + +func (m *Message) GetType() isMessage_Type { + if m != nil { + return m.Type + } + return nil +} + +func (x *Message) GetSignedPredecision() *SignedPredecision { + if x, ok := x.GetType().(*Message_SignedPredecision); ok { + return x.SignedPredecision + } + return nil +} + +func (x *Message) GetCertificate() *FullCertificate { + if x, ok := x.GetType().(*Message_Certificate); ok { + return x.Certificate + } + return nil +} + +func (x *Message) GetPoms() *PoMs { + if x, ok := x.GetType().(*Message_Poms); ok { + return x.Poms + } + return nil +} + +func (x *Message) GetLightCertificate() *LightCertificate { + if x, ok := x.GetType().(*Message_LightCertificate); ok { + return x.LightCertificate + } + return nil +} + +type isMessage_Type interface { + isMessage_Type() +} + +type Message_SignedPredecision struct { + SignedPredecision *SignedPredecision `protobuf:"bytes,1,opt,name=signed_predecision,json=signedPredecision,proto3,oneof"` +} + +type Message_Certificate struct { + Certificate *FullCertificate `protobuf:"bytes,2,opt,name=certificate,proto3,oneof"` +} + +type Message_Poms struct { + Poms *PoMs `protobuf:"bytes,3,opt,name=poms,proto3,oneof"` +} + +type Message_LightCertificate struct { + LightCertificate *LightCertificate `protobuf:"bytes,4,opt,name=light_certificate,json=lightCertificate,proto3,oneof"` +} + +func (*Message_SignedPredecision) isMessage_Type() {} + +func (*Message_Certificate) isMessage_Type() {} + +func (*Message_Poms) isMessage_Type() {} + +func (*Message_LightCertificate) isMessage_Type() {} + +type SignedPredecision struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Predecision []byte `protobuf:"bytes,1,opt,name=predecision,proto3" json:"predecision,omitempty"` + Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` +} + +func (x *SignedPredecision) Reset() { + *x = SignedPredecision{} + if protoimpl.UnsafeEnabled { + mi := &file_accountabilitypb_accountabilitypb_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SignedPredecision) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SignedPredecision) ProtoMessage() {} + +func (x *SignedPredecision) ProtoReflect() protoreflect.Message { + mi := &file_accountabilitypb_accountabilitypb_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SignedPredecision.ProtoReflect.Descriptor instead. +func (*SignedPredecision) Descriptor() ([]byte, []int) { + return file_accountabilitypb_accountabilitypb_proto_rawDescGZIP(), []int{7} +} + +func (x *SignedPredecision) GetPredecision() []byte { + if x != nil { + return x.Predecision + } + return nil +} + +func (x *SignedPredecision) GetSignature() []byte { + if x != nil { + return x.Signature + } + return nil +} + +type FullCertificate struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Certificate map[uint64]*SignedPredecision `protobuf:"bytes,1,rep,name=certificate,proto3" json:"certificate,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *FullCertificate) Reset() { + *x = FullCertificate{} + if protoimpl.UnsafeEnabled { + mi := &file_accountabilitypb_accountabilitypb_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FullCertificate) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FullCertificate) ProtoMessage() {} + +func (x *FullCertificate) ProtoReflect() protoreflect.Message { + mi := &file_accountabilitypb_accountabilitypb_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FullCertificate.ProtoReflect.Descriptor instead. +func (*FullCertificate) Descriptor() ([]byte, []int) { + return file_accountabilitypb_accountabilitypb_proto_rawDescGZIP(), []int{8} +} + +func (x *FullCertificate) GetCertificate() map[uint64]*SignedPredecision { + if x != nil { + return x.Certificate + } + return nil +} + +type InstanceParams struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Membership *trantorpb.Membership `protobuf:"bytes,3,opt,name=membership,proto3" json:"membership,omitempty"` +} + +func (x *InstanceParams) Reset() { + *x = InstanceParams{} + if protoimpl.UnsafeEnabled { + mi := &file_accountabilitypb_accountabilitypb_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InstanceParams) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InstanceParams) ProtoMessage() {} + +func (x *InstanceParams) ProtoReflect() protoreflect.Message { + mi := &file_accountabilitypb_accountabilitypb_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InstanceParams.ProtoReflect.Descriptor instead. +func (*InstanceParams) Descriptor() ([]byte, []int) { + return file_accountabilitypb_accountabilitypb_proto_rawDescGZIP(), []int{9} +} + +func (x *InstanceParams) GetMembership() *trantorpb.Membership { + if x != nil { + return x.Membership + } + return nil +} + +var File_accountabilitypb_accountabilitypb_proto protoreflect.FileDescriptor + +var file_accountabilitypb_accountabilitypb_proto_rawDesc = []byte{ + 0x0a, 0x27, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, + 0x70, 0x62, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, + 0x79, 0x70, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x10, 0x61, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x70, 0x62, 0x1a, 0x19, 0x74, 0x72, 0x61, + 0x6e, 0x74, 0x6f, 0x72, 0x70, 0x62, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x74, 0x6f, 0x72, 0x70, 0x62, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x6e, 0x65, 0x74, 0x2f, 0x63, 0x6f, 0x64, 0x65, + 0x67, 0x65, 0x6e, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x6d, 0x69, 0x72, 0x2f, 0x63, 0x6f, 0x64, 0x65, 0x67, 0x65, + 0x6e, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x22, 0x8d, 0x02, 0x0a, 0x05, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x3e, 0x0a, 0x0a, + 0x70, 0x72, 0x65, 0x64, 0x65, 0x63, 0x69, 0x64, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1c, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, + 0x79, 0x70, 0x62, 0x2e, 0x50, 0x72, 0x65, 0x64, 0x65, 0x63, 0x69, 0x64, 0x65, 0x64, 0x48, 0x00, + 0x52, 0x0a, 0x70, 0x72, 0x65, 0x64, 0x65, 0x63, 0x69, 0x64, 0x65, 0x64, 0x12, 0x35, 0x0a, 0x07, + 0x64, 0x65, 0x63, 0x69, 0x64, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, + 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x70, 0x62, + 0x2e, 0x44, 0x65, 0x63, 0x69, 0x64, 0x65, 0x64, 0x48, 0x00, 0x52, 0x07, 0x64, 0x65, 0x63, 0x69, + 0x64, 0x65, 0x64, 0x12, 0x2c, 0x0a, 0x04, 0x70, 0x6f, 0x6d, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x16, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x62, 0x69, 0x6c, 0x69, + 0x74, 0x79, 0x70, 0x62, 0x2e, 0x50, 0x6f, 0x4d, 0x73, 0x48, 0x00, 0x52, 0x04, 0x70, 0x6f, 0x6d, + 0x73, 0x12, 0x4b, 0x0a, 0x0f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x70, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x61, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x70, 0x62, 0x2e, 0x49, 0x6e, + 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x48, 0x00, 0x52, 0x0e, + 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x3a, 0x04, + 0x90, 0xa6, 0x1d, 0x01, 0x42, 0x0c, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x04, 0x80, 0xa6, + 0x1d, 0x01, 0x22, 0x26, 0x0a, 0x0a, 0x50, 0x72, 0x65, 0x64, 0x65, 0x63, 0x69, 0x64, 0x65, 0x64, + 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, + 0x64, 0x61, 0x74, 0x61, 0x3a, 0x04, 0x98, 0xa6, 0x1d, 0x01, 0x22, 0x23, 0x0a, 0x07, 0x44, 0x65, + 0x63, 0x69, 0x64, 0x65, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x3a, 0x04, 0x98, 0xa6, 0x1d, 0x01, 0x22, + 0xfc, 0x01, 0x0a, 0x03, 0x50, 0x6f, 0x4d, 0x12, 0x4d, 0x0a, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x34, 0x82, 0xa6, 0x1d, 0x30, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x63, 0x6f, 0x69, + 0x6e, 0x2d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x6d, 0x69, 0x72, 0x2f, 0x70, 0x6b, + 0x67, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x44, 0x52, 0x06, + 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x4f, 0x0a, 0x11, 0x63, 0x6f, 0x6e, 0x66, 0x6c, 0x69, + 0x63, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x6d, 0x73, 0x67, 0x5f, 0x31, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x23, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x62, 0x69, 0x6c, 0x69, + 0x74, 0x79, 0x70, 0x62, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x50, 0x72, 0x65, 0x64, 0x65, + 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, + 0x69, 0x6e, 0x67, 0x4d, 0x73, 0x67, 0x31, 0x12, 0x4f, 0x0a, 0x11, 0x63, 0x6f, 0x6e, 0x66, 0x6c, + 0x69, 0x63, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x6d, 0x73, 0x67, 0x5f, 0x32, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x62, 0x69, 0x6c, + 0x69, 0x74, 0x79, 0x70, 0x62, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x50, 0x72, 0x65, 0x64, + 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, + 0x74, 0x69, 0x6e, 0x67, 0x4d, 0x73, 0x67, 0x32, 0x3a, 0x04, 0x80, 0xa6, 0x1d, 0x01, 0x22, 0x2c, + 0x0a, 0x10, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, + 0x74, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x3a, 0x04, 0xd0, 0xe4, 0x1d, 0x01, 0x22, 0x3b, 0x0a, 0x04, + 0x50, 0x6f, 0x4d, 0x73, 0x12, 0x29, 0x0a, 0x04, 0x70, 0x6f, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x62, 0x69, 0x6c, + 0x69, 0x74, 0x79, 0x70, 0x62, 0x2e, 0x50, 0x6f, 0x4d, 0x52, 0x04, 0x70, 0x6f, 0x6d, 0x73, 0x3a, + 0x08, 0x98, 0xa6, 0x1d, 0x01, 0xd0, 0xe4, 0x1d, 0x01, 0x22, 0xbb, 0x02, 0x0a, 0x07, 0x4d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x54, 0x0a, 0x12, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, + 0x70, 0x72, 0x65, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x23, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x62, 0x69, 0x6c, 0x69, + 0x74, 0x79, 0x70, 0x62, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x50, 0x72, 0x65, 0x64, 0x65, + 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x11, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, + 0x50, 0x72, 0x65, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x45, 0x0a, 0x0b, 0x63, + 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x21, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, + 0x79, 0x70, 0x62, 0x2e, 0x46, 0x75, 0x6c, 0x6c, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, + 0x61, 0x74, 0x65, 0x48, 0x00, 0x52, 0x0b, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, + 0x74, 0x65, 0x12, 0x2c, 0x0a, 0x04, 0x70, 0x6f, 0x6d, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x16, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, + 0x79, 0x70, 0x62, 0x2e, 0x50, 0x6f, 0x4d, 0x73, 0x48, 0x00, 0x52, 0x04, 0x70, 0x6f, 0x6d, 0x73, + 0x12, 0x51, 0x0a, 0x11, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, + 0x69, 0x63, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x61, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x70, 0x62, 0x2e, 0x4c, + 0x69, 0x67, 0x68, 0x74, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x48, + 0x00, 0x52, 0x10, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, + 0x61, 0x74, 0x65, 0x3a, 0x04, 0xc8, 0xe4, 0x1d, 0x01, 0x42, 0x0c, 0x0a, 0x04, 0x74, 0x79, 0x70, + 0x65, 0x12, 0x04, 0xc8, 0xe4, 0x1d, 0x01, 0x22, 0x5d, 0x0a, 0x11, 0x53, 0x69, 0x67, 0x6e, 0x65, + 0x64, 0x50, 0x72, 0x65, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x0a, 0x0b, + 0x70, 0x72, 0x65, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x0b, 0x70, 0x72, 0x65, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1c, + 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x3a, 0x08, 0xd0, 0xe4, + 0x1d, 0x01, 0x80, 0xa6, 0x1d, 0x01, 0x22, 0x89, 0x02, 0x0a, 0x0f, 0x46, 0x75, 0x6c, 0x6c, 0x43, + 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x8a, 0x01, 0x0a, 0x0b, 0x63, + 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x32, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, + 0x79, 0x70, 0x62, 0x2e, 0x46, 0x75, 0x6c, 0x6c, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, + 0x61, 0x74, 0x65, 0x2e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x42, 0x34, 0xaa, 0xa6, 0x1d, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x63, 0x6f, 0x69, 0x6e, 0x2d, 0x70, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x6d, 0x69, 0x72, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x74, 0x79, + 0x70, 0x65, 0x73, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x44, 0x52, 0x0b, 0x63, 0x65, 0x72, 0x74, + 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x1a, 0x63, 0x0a, 0x10, 0x43, 0x65, 0x72, 0x74, 0x69, + 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, + 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x39, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x61, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x70, 0x62, 0x2e, + 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x50, 0x72, 0x65, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, + 0x6e, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x04, 0xd0, 0xe4, + 0x1d, 0x01, 0x22, 0x4d, 0x0a, 0x0e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x50, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x12, 0x35, 0x0a, 0x0a, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, + 0x69, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x74, + 0x6f, 0x72, 0x70, 0x62, 0x2e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x52, + 0x0a, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x3a, 0x04, 0x98, 0xa6, 0x1d, + 0x01, 0x42, 0x39, 0x5a, 0x37, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x66, 0x69, 0x6c, 0x65, 0x63, 0x6f, 0x69, 0x6e, 0x2d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x2f, 0x6d, 0x69, 0x72, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x62, 0x2f, 0x61, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_accountabilitypb_accountabilitypb_proto_rawDescOnce sync.Once + file_accountabilitypb_accountabilitypb_proto_rawDescData = file_accountabilitypb_accountabilitypb_proto_rawDesc +) + +func file_accountabilitypb_accountabilitypb_proto_rawDescGZIP() []byte { + file_accountabilitypb_accountabilitypb_proto_rawDescOnce.Do(func() { + file_accountabilitypb_accountabilitypb_proto_rawDescData = protoimpl.X.CompressGZIP(file_accountabilitypb_accountabilitypb_proto_rawDescData) + }) + return file_accountabilitypb_accountabilitypb_proto_rawDescData +} + +var file_accountabilitypb_accountabilitypb_proto_msgTypes = make([]protoimpl.MessageInfo, 11) +var file_accountabilitypb_accountabilitypb_proto_goTypes = []interface{}{ + (*Event)(nil), // 0: accountabilitypb.Event + (*Predecided)(nil), // 1: accountabilitypb.Predecided + (*Decided)(nil), // 2: accountabilitypb.Decided + (*PoM)(nil), // 3: accountabilitypb.PoM + (*LightCertificate)(nil), // 4: accountabilitypb.LightCertificate + (*PoMs)(nil), // 5: accountabilitypb.PoMs + (*Message)(nil), // 6: accountabilitypb.Message + (*SignedPredecision)(nil), // 7: accountabilitypb.SignedPredecision + (*FullCertificate)(nil), // 8: accountabilitypb.FullCertificate + (*InstanceParams)(nil), // 9: accountabilitypb.InstanceParams + nil, // 10: accountabilitypb.FullCertificate.CertificateEntry + (*trantorpb.Membership)(nil), // 11: trantorpb.Membership +} +var file_accountabilitypb_accountabilitypb_proto_depIdxs = []int32{ + 1, // 0: accountabilitypb.Event.predecided:type_name -> accountabilitypb.Predecided + 2, // 1: accountabilitypb.Event.decided:type_name -> accountabilitypb.Decided + 5, // 2: accountabilitypb.Event.poms:type_name -> accountabilitypb.PoMs + 9, // 3: accountabilitypb.Event.instance_params:type_name -> accountabilitypb.InstanceParams + 7, // 4: accountabilitypb.PoM.conflicting_msg_1:type_name -> accountabilitypb.SignedPredecision + 7, // 5: accountabilitypb.PoM.conflicting_msg_2:type_name -> accountabilitypb.SignedPredecision + 3, // 6: accountabilitypb.PoMs.poms:type_name -> accountabilitypb.PoM + 7, // 7: accountabilitypb.Message.signed_predecision:type_name -> accountabilitypb.SignedPredecision + 8, // 8: accountabilitypb.Message.certificate:type_name -> accountabilitypb.FullCertificate + 5, // 9: accountabilitypb.Message.poms:type_name -> accountabilitypb.PoMs + 4, // 10: accountabilitypb.Message.light_certificate:type_name -> accountabilitypb.LightCertificate + 10, // 11: accountabilitypb.FullCertificate.certificate:type_name -> accountabilitypb.FullCertificate.CertificateEntry + 11, // 12: accountabilitypb.InstanceParams.membership:type_name -> trantorpb.Membership + 7, // 13: accountabilitypb.FullCertificate.CertificateEntry.value:type_name -> accountabilitypb.SignedPredecision + 14, // [14:14] is the sub-list for method output_type + 14, // [14:14] is the sub-list for method input_type + 14, // [14:14] is the sub-list for extension type_name + 14, // [14:14] is the sub-list for extension extendee + 0, // [0:14] is the sub-list for field type_name +} + +func init() { file_accountabilitypb_accountabilitypb_proto_init() } +func file_accountabilitypb_accountabilitypb_proto_init() { + if File_accountabilitypb_accountabilitypb_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_accountabilitypb_accountabilitypb_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Event); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_accountabilitypb_accountabilitypb_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Predecided); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_accountabilitypb_accountabilitypb_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Decided); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_accountabilitypb_accountabilitypb_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PoM); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_accountabilitypb_accountabilitypb_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LightCertificate); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_accountabilitypb_accountabilitypb_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PoMs); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_accountabilitypb_accountabilitypb_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Message); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_accountabilitypb_accountabilitypb_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SignedPredecision); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_accountabilitypb_accountabilitypb_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FullCertificate); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_accountabilitypb_accountabilitypb_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InstanceParams); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_accountabilitypb_accountabilitypb_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*Event_Predecided)(nil), + (*Event_Decided)(nil), + (*Event_Poms)(nil), + (*Event_InstanceParams)(nil), + } + file_accountabilitypb_accountabilitypb_proto_msgTypes[6].OneofWrappers = []interface{}{ + (*Message_SignedPredecision)(nil), + (*Message_Certificate)(nil), + (*Message_Poms)(nil), + (*Message_LightCertificate)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_accountabilitypb_accountabilitypb_proto_rawDesc, + NumEnums: 0, + NumMessages: 11, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_accountabilitypb_accountabilitypb_proto_goTypes, + DependencyIndexes: file_accountabilitypb_accountabilitypb_proto_depIdxs, + MessageInfos: file_accountabilitypb_accountabilitypb_proto_msgTypes, + }.Build() + File_accountabilitypb_accountabilitypb_proto = out.File + file_accountabilitypb_accountabilitypb_proto_rawDesc = nil + file_accountabilitypb_accountabilitypb_proto_goTypes = nil + file_accountabilitypb_accountabilitypb_proto_depIdxs = nil +} diff --git a/pkg/pb/accountabilitypb/accountabilitypb.pb.mir.go b/pkg/pb/accountabilitypb/accountabilitypb.pb.mir.go new file mode 100644 index 000000000..b2c890da6 --- /dev/null +++ b/pkg/pb/accountabilitypb/accountabilitypb.pb.mir.go @@ -0,0 +1,25 @@ +// Code generated by Mir codegen. DO NOT EDIT. + +package accountabilitypb + +import ( + reflect "reflect" +) + +func (*Event) ReflectTypeOptions() []reflect.Type { + return []reflect.Type{ + reflect.TypeOf((*Event_Predecided)(nil)), + reflect.TypeOf((*Event_Decided)(nil)), + reflect.TypeOf((*Event_Poms)(nil)), + reflect.TypeOf((*Event_InstanceParams)(nil)), + } +} + +func (*Message) ReflectTypeOptions() []reflect.Type { + return []reflect.Type{ + reflect.TypeOf((*Message_SignedPredecision)(nil)), + reflect.TypeOf((*Message_Certificate)(nil)), + reflect.TypeOf((*Message_Poms)(nil)), + reflect.TypeOf((*Message_LightCertificate)(nil)), + } +} diff --git a/pkg/pb/accountabilitypb/dsl/emit.mir.go b/pkg/pb/accountabilitypb/dsl/emit.mir.go new file mode 100644 index 000000000..7ef96f6b2 --- /dev/null +++ b/pkg/pb/accountabilitypb/dsl/emit.mir.go @@ -0,0 +1,29 @@ +// Code generated by Mir codegen. DO NOT EDIT. + +package accountabilitypbdsl + +import ( + dsl "github.com/filecoin-project/mir/pkg/dsl" + events "github.com/filecoin-project/mir/pkg/pb/accountabilitypb/events" + types1 "github.com/filecoin-project/mir/pkg/pb/accountabilitypb/types" + types2 "github.com/filecoin-project/mir/pkg/pb/trantorpb/types" + types "github.com/filecoin-project/mir/pkg/types" +) + +// Module-specific dsl functions for emitting events. + +func Predecided(m dsl.Module, destModule types.ModuleID, data []uint8) { + dsl.EmitMirEvent(m, events.Predecided(destModule, data)) +} + +func Decided(m dsl.Module, destModule types.ModuleID, data []uint8) { + dsl.EmitMirEvent(m, events.Decided(destModule, data)) +} + +func PoMs(m dsl.Module, destModule types.ModuleID, poms []*types1.PoM) { + dsl.EmitMirEvent(m, events.PoMs(destModule, poms)) +} + +func InstanceParams(m dsl.Module, destModule types.ModuleID, membership *types2.Membership) { + dsl.EmitMirEvent(m, events.InstanceParams(destModule, membership)) +} diff --git a/pkg/pb/accountabilitypb/dsl/messages.mir.go b/pkg/pb/accountabilitypb/dsl/messages.mir.go new file mode 100644 index 000000000..37e347186 --- /dev/null +++ b/pkg/pb/accountabilitypb/dsl/messages.mir.go @@ -0,0 +1,48 @@ +// Code generated by Mir codegen. DO NOT EDIT. + +package accountabilitypbdsl + +import ( + dsl "github.com/filecoin-project/mir/pkg/dsl" + types "github.com/filecoin-project/mir/pkg/pb/accountabilitypb/types" + dsl1 "github.com/filecoin-project/mir/pkg/pb/messagepb/dsl" + types2 "github.com/filecoin-project/mir/pkg/pb/messagepb/types" + types1 "github.com/filecoin-project/mir/pkg/types" +) + +// Module-specific dsl functions for processing net messages. + +func UponMessageReceived[W types.Message_TypeWrapper[M], M any](m dsl.Module, handler func(from types1.NodeID, msg *M) error) { + dsl1.UponMessageReceived[*types2.Message_Accountability](m, func(from types1.NodeID, msg *types.Message) error { + w, ok := msg.Type.(W) + if !ok { + return nil + } + + return handler(from, w.Unwrap()) + }) +} + +func UponSignedPredecisionReceived(m dsl.Module, handler func(from types1.NodeID, predecision []uint8, signature []uint8) error) { + UponMessageReceived[*types.Message_SignedPredecision](m, func(from types1.NodeID, msg *types.SignedPredecision) error { + return handler(from, msg.Predecision, msg.Signature) + }) +} + +func UponFullCertificateReceived(m dsl.Module, handler func(from types1.NodeID, certificate map[types1.NodeID]*types.SignedPredecision) error) { + UponMessageReceived[*types.Message_Certificate](m, func(from types1.NodeID, msg *types.FullCertificate) error { + return handler(from, msg.Certificate) + }) +} + +func UponPoMsReceived(m dsl.Module, handler func(from types1.NodeID, poms []*types.PoM) error) { + UponMessageReceived[*types.Message_Poms](m, func(from types1.NodeID, msg *types.PoMs) error { + return handler(from, msg.Poms) + }) +} + +func UponLightCertificateReceived(m dsl.Module, handler func(from types1.NodeID, data []uint8) error) { + UponMessageReceived[*types.Message_LightCertificate](m, func(from types1.NodeID, msg *types.LightCertificate) error { + return handler(from, msg.Data) + }) +} diff --git a/pkg/pb/accountabilitypb/dsl/upon.mir.go b/pkg/pb/accountabilitypb/dsl/upon.mir.go new file mode 100644 index 000000000..c7c47b06f --- /dev/null +++ b/pkg/pb/accountabilitypb/dsl/upon.mir.go @@ -0,0 +1,47 @@ +// Code generated by Mir codegen. DO NOT EDIT. + +package accountabilitypbdsl + +import ( + dsl "github.com/filecoin-project/mir/pkg/dsl" + types "github.com/filecoin-project/mir/pkg/pb/accountabilitypb/types" + types1 "github.com/filecoin-project/mir/pkg/pb/eventpb/types" + types2 "github.com/filecoin-project/mir/pkg/pb/trantorpb/types" +) + +// Module-specific dsl functions for processing events. + +func UponEvent[W types.Event_TypeWrapper[Ev], Ev any](m dsl.Module, handler func(ev *Ev) error) { + dsl.UponMirEvent[*types1.Event_Accountability](m, func(ev *types.Event) error { + w, ok := ev.Type.(W) + if !ok { + return nil + } + + return handler(w.Unwrap()) + }) +} + +func UponPredecided(m dsl.Module, handler func(data []uint8) error) { + UponEvent[*types.Event_Predecided](m, func(ev *types.Predecided) error { + return handler(ev.Data) + }) +} + +func UponDecided(m dsl.Module, handler func(data []uint8) error) { + UponEvent[*types.Event_Decided](m, func(ev *types.Decided) error { + return handler(ev.Data) + }) +} + +func UponPoMs(m dsl.Module, handler func(poms []*types.PoM) error) { + UponEvent[*types.Event_Poms](m, func(ev *types.PoMs) error { + return handler(ev.Poms) + }) +} + +func UponInstanceParams(m dsl.Module, handler func(membership *types2.Membership) error) { + UponEvent[*types.Event_InstanceParams](m, func(ev *types.InstanceParams) error { + return handler(ev.Membership) + }) +} diff --git a/pkg/pb/accountabilitypb/events/events.mir.go b/pkg/pb/accountabilitypb/events/events.mir.go new file mode 100644 index 000000000..c47e51fee --- /dev/null +++ b/pkg/pb/accountabilitypb/events/events.mir.go @@ -0,0 +1,70 @@ +// Code generated by Mir codegen. DO NOT EDIT. + +package accountabilitypbevents + +import ( + types2 "github.com/filecoin-project/mir/pkg/pb/accountabilitypb/types" + types1 "github.com/filecoin-project/mir/pkg/pb/eventpb/types" + types3 "github.com/filecoin-project/mir/pkg/pb/trantorpb/types" + types "github.com/filecoin-project/mir/pkg/types" +) + +func Predecided(destModule types.ModuleID, data []uint8) *types1.Event { + return &types1.Event{ + DestModule: destModule, + Type: &types1.Event_Accountability{ + Accountability: &types2.Event{ + Type: &types2.Event_Predecided{ + Predecided: &types2.Predecided{ + Data: data, + }, + }, + }, + }, + } +} + +func Decided(destModule types.ModuleID, data []uint8) *types1.Event { + return &types1.Event{ + DestModule: destModule, + Type: &types1.Event_Accountability{ + Accountability: &types2.Event{ + Type: &types2.Event_Decided{ + Decided: &types2.Decided{ + Data: data, + }, + }, + }, + }, + } +} + +func PoMs(destModule types.ModuleID, poms []*types2.PoM) *types1.Event { + return &types1.Event{ + DestModule: destModule, + Type: &types1.Event_Accountability{ + Accountability: &types2.Event{ + Type: &types2.Event_Poms{ + Poms: &types2.PoMs{ + Poms: poms, + }, + }, + }, + }, + } +} + +func InstanceParams(destModule types.ModuleID, membership *types3.Membership) *types1.Event { + return &types1.Event{ + DestModule: destModule, + Type: &types1.Event_Accountability{ + Accountability: &types2.Event{ + Type: &types2.Event_InstanceParams{ + InstanceParams: &types2.InstanceParams{ + Membership: membership, + }, + }, + }, + }, + } +} diff --git a/pkg/pb/accountabilitypb/msgs/msgs.mir.go b/pkg/pb/accountabilitypb/msgs/msgs.mir.go new file mode 100644 index 000000000..a411a0d12 --- /dev/null +++ b/pkg/pb/accountabilitypb/msgs/msgs.mir.go @@ -0,0 +1,70 @@ +// Code generated by Mir codegen. DO NOT EDIT. + +package accountabilitypbmsgs + +import ( + types2 "github.com/filecoin-project/mir/pkg/pb/accountabilitypb/types" + types1 "github.com/filecoin-project/mir/pkg/pb/messagepb/types" + types "github.com/filecoin-project/mir/pkg/types" +) + +func SignedPredecision(destModule types.ModuleID, predecision []uint8, signature []uint8) *types1.Message { + return &types1.Message{ + DestModule: destModule, + Type: &types1.Message_Accountability{ + Accountability: &types2.Message{ + Type: &types2.Message_SignedPredecision{ + SignedPredecision: &types2.SignedPredecision{ + Predecision: predecision, + Signature: signature, + }, + }, + }, + }, + } +} + +func FullCertificate(destModule types.ModuleID, certificate map[types.NodeID]*types2.SignedPredecision) *types1.Message { + return &types1.Message{ + DestModule: destModule, + Type: &types1.Message_Accountability{ + Accountability: &types2.Message{ + Type: &types2.Message_Certificate{ + Certificate: &types2.FullCertificate{ + Certificate: certificate, + }, + }, + }, + }, + } +} + +func PoMs(destModule types.ModuleID, poms []*types2.PoM) *types1.Message { + return &types1.Message{ + DestModule: destModule, + Type: &types1.Message_Accountability{ + Accountability: &types2.Message{ + Type: &types2.Message_Poms{ + Poms: &types2.PoMs{ + Poms: poms, + }, + }, + }, + }, + } +} + +func LightCertificate(destModule types.ModuleID, data []uint8) *types1.Message { + return &types1.Message{ + DestModule: destModule, + Type: &types1.Message_Accountability{ + Accountability: &types2.Message{ + Type: &types2.Message_LightCertificate{ + LightCertificate: &types2.LightCertificate{ + Data: data, + }, + }, + }, + }, + } +} diff --git a/pkg/pb/accountabilitypb/oneof_interfaces.mir.go b/pkg/pb/accountabilitypb/oneof_interfaces.mir.go new file mode 100644 index 000000000..ae4b4a906 --- /dev/null +++ b/pkg/pb/accountabilitypb/oneof_interfaces.mir.go @@ -0,0 +1,49 @@ +// Code generated by Mir codegen. DO NOT EDIT. + +package accountabilitypb + +type Event_Type = isEvent_Type + +type Event_TypeWrapper[T any] interface { + Event_Type + Unwrap() *T +} + +func (w *Event_Predecided) Unwrap() *Predecided { + return w.Predecided +} + +func (w *Event_Decided) Unwrap() *Decided { + return w.Decided +} + +func (w *Event_Poms) Unwrap() *PoMs { + return w.Poms +} + +func (w *Event_InstanceParams) Unwrap() *InstanceParams { + return w.InstanceParams +} + +type Message_Type = isMessage_Type + +type Message_TypeWrapper[T any] interface { + Message_Type + Unwrap() *T +} + +func (w *Message_SignedPredecision) Unwrap() *SignedPredecision { + return w.SignedPredecision +} + +func (w *Message_Certificate) Unwrap() *FullCertificate { + return w.Certificate +} + +func (w *Message_Poms) Unwrap() *PoMs { + return w.Poms +} + +func (w *Message_LightCertificate) Unwrap() *LightCertificate { + return w.LightCertificate +} diff --git a/pkg/pb/accountabilitypb/types/types.mir.go b/pkg/pb/accountabilitypb/types/types.mir.go new file mode 100644 index 000000000..1045536a4 --- /dev/null +++ b/pkg/pb/accountabilitypb/types/types.mir.go @@ -0,0 +1,577 @@ +// Code generated by Mir codegen. DO NOT EDIT. + +package accountabilitypbtypes + +import ( + mirreflect "github.com/filecoin-project/mir/codegen/mirreflect" + types1 "github.com/filecoin-project/mir/codegen/model/types" + accountabilitypb "github.com/filecoin-project/mir/pkg/pb/accountabilitypb" + types2 "github.com/filecoin-project/mir/pkg/pb/trantorpb/types" + types "github.com/filecoin-project/mir/pkg/types" + reflectutil "github.com/filecoin-project/mir/pkg/util/reflectutil" +) + +type Event struct { + Type Event_Type +} + +type Event_Type interface { + mirreflect.GeneratedType + isEvent_Type() + Pb() accountabilitypb.Event_Type +} + +type Event_TypeWrapper[T any] interface { + Event_Type + Unwrap() *T +} + +func Event_TypeFromPb(pb accountabilitypb.Event_Type) Event_Type { + if pb == nil { + return nil + } + switch pb := pb.(type) { + case *accountabilitypb.Event_Predecided: + return &Event_Predecided{Predecided: PredecidedFromPb(pb.Predecided)} + case *accountabilitypb.Event_Decided: + return &Event_Decided{Decided: DecidedFromPb(pb.Decided)} + case *accountabilitypb.Event_Poms: + return &Event_Poms{Poms: PoMsFromPb(pb.Poms)} + case *accountabilitypb.Event_InstanceParams: + return &Event_InstanceParams{InstanceParams: InstanceParamsFromPb(pb.InstanceParams)} + } + return nil +} + +type Event_Predecided struct { + Predecided *Predecided +} + +func (*Event_Predecided) isEvent_Type() {} + +func (w *Event_Predecided) Unwrap() *Predecided { + return w.Predecided +} + +func (w *Event_Predecided) Pb() accountabilitypb.Event_Type { + if w == nil { + return nil + } + if w.Predecided == nil { + return &accountabilitypb.Event_Predecided{} + } + return &accountabilitypb.Event_Predecided{Predecided: (w.Predecided).Pb()} +} + +func (*Event_Predecided) MirReflect() mirreflect.Type { + return mirreflect.TypeImpl{PbType_: reflectutil.TypeOf[*accountabilitypb.Event_Predecided]()} +} + +type Event_Decided struct { + Decided *Decided +} + +func (*Event_Decided) isEvent_Type() {} + +func (w *Event_Decided) Unwrap() *Decided { + return w.Decided +} + +func (w *Event_Decided) Pb() accountabilitypb.Event_Type { + if w == nil { + return nil + } + if w.Decided == nil { + return &accountabilitypb.Event_Decided{} + } + return &accountabilitypb.Event_Decided{Decided: (w.Decided).Pb()} +} + +func (*Event_Decided) MirReflect() mirreflect.Type { + return mirreflect.TypeImpl{PbType_: reflectutil.TypeOf[*accountabilitypb.Event_Decided]()} +} + +type Event_Poms struct { + Poms *PoMs +} + +func (*Event_Poms) isEvent_Type() {} + +func (w *Event_Poms) Unwrap() *PoMs { + return w.Poms +} + +func (w *Event_Poms) Pb() accountabilitypb.Event_Type { + if w == nil { + return nil + } + if w.Poms == nil { + return &accountabilitypb.Event_Poms{} + } + return &accountabilitypb.Event_Poms{Poms: (w.Poms).Pb()} +} + +func (*Event_Poms) MirReflect() mirreflect.Type { + return mirreflect.TypeImpl{PbType_: reflectutil.TypeOf[*accountabilitypb.Event_Poms]()} +} + +type Event_InstanceParams struct { + InstanceParams *InstanceParams +} + +func (*Event_InstanceParams) isEvent_Type() {} + +func (w *Event_InstanceParams) Unwrap() *InstanceParams { + return w.InstanceParams +} + +func (w *Event_InstanceParams) Pb() accountabilitypb.Event_Type { + if w == nil { + return nil + } + if w.InstanceParams == nil { + return &accountabilitypb.Event_InstanceParams{} + } + return &accountabilitypb.Event_InstanceParams{InstanceParams: (w.InstanceParams).Pb()} +} + +func (*Event_InstanceParams) MirReflect() mirreflect.Type { + return mirreflect.TypeImpl{PbType_: reflectutil.TypeOf[*accountabilitypb.Event_InstanceParams]()} +} + +func EventFromPb(pb *accountabilitypb.Event) *Event { + if pb == nil { + return nil + } + return &Event{ + Type: Event_TypeFromPb(pb.Type), + } +} + +func (m *Event) Pb() *accountabilitypb.Event { + if m == nil { + return nil + } + pbMessage := &accountabilitypb.Event{} + { + if m.Type != nil { + pbMessage.Type = (m.Type).Pb() + } + } + + return pbMessage +} + +func (*Event) MirReflect() mirreflect.Type { + return mirreflect.TypeImpl{PbType_: reflectutil.TypeOf[*accountabilitypb.Event]()} +} + +type Predecided struct { + Data []uint8 +} + +func PredecidedFromPb(pb *accountabilitypb.Predecided) *Predecided { + if pb == nil { + return nil + } + return &Predecided{ + Data: pb.Data, + } +} + +func (m *Predecided) Pb() *accountabilitypb.Predecided { + if m == nil { + return nil + } + pbMessage := &accountabilitypb.Predecided{} + { + pbMessage.Data = m.Data + } + + return pbMessage +} + +func (*Predecided) MirReflect() mirreflect.Type { + return mirreflect.TypeImpl{PbType_: reflectutil.TypeOf[*accountabilitypb.Predecided]()} +} + +type Decided struct { + Data []uint8 +} + +func DecidedFromPb(pb *accountabilitypb.Decided) *Decided { + if pb == nil { + return nil + } + return &Decided{ + Data: pb.Data, + } +} + +func (m *Decided) Pb() *accountabilitypb.Decided { + if m == nil { + return nil + } + pbMessage := &accountabilitypb.Decided{} + { + pbMessage.Data = m.Data + } + + return pbMessage +} + +func (*Decided) MirReflect() mirreflect.Type { + return mirreflect.TypeImpl{PbType_: reflectutil.TypeOf[*accountabilitypb.Decided]()} +} + +type PoM struct { + NodeId types.NodeID + ConflictingMsg_1 *SignedPredecision + ConflictingMsg_2 *SignedPredecision +} + +func PoMFromPb(pb *accountabilitypb.PoM) *PoM { + if pb == nil { + return nil + } + return &PoM{ + NodeId: (types.NodeID)(pb.NodeId), + ConflictingMsg_1: SignedPredecisionFromPb(pb.ConflictingMsg_1), + ConflictingMsg_2: SignedPredecisionFromPb(pb.ConflictingMsg_2), + } +} + +func (m *PoM) Pb() *accountabilitypb.PoM { + if m == nil { + return nil + } + pbMessage := &accountabilitypb.PoM{} + { + pbMessage.NodeId = (string)(m.NodeId) + if m.ConflictingMsg_1 != nil { + pbMessage.ConflictingMsg_1 = (m.ConflictingMsg_1).Pb() + } + if m.ConflictingMsg_2 != nil { + pbMessage.ConflictingMsg_2 = (m.ConflictingMsg_2).Pb() + } + } + + return pbMessage +} + +func (*PoM) MirReflect() mirreflect.Type { + return mirreflect.TypeImpl{PbType_: reflectutil.TypeOf[*accountabilitypb.PoM]()} +} + +type LightCertificate struct { + Data []uint8 +} + +func LightCertificateFromPb(pb *accountabilitypb.LightCertificate) *LightCertificate { + if pb == nil { + return nil + } + return &LightCertificate{ + Data: pb.Data, + } +} + +func (m *LightCertificate) Pb() *accountabilitypb.LightCertificate { + if m == nil { + return nil + } + pbMessage := &accountabilitypb.LightCertificate{} + { + pbMessage.Data = m.Data + } + + return pbMessage +} + +func (*LightCertificate) MirReflect() mirreflect.Type { + return mirreflect.TypeImpl{PbType_: reflectutil.TypeOf[*accountabilitypb.LightCertificate]()} +} + +type PoMs struct { + Poms []*PoM +} + +func PoMsFromPb(pb *accountabilitypb.PoMs) *PoMs { + if pb == nil { + return nil + } + return &PoMs{ + Poms: types1.ConvertSlice(pb.Poms, func(t *accountabilitypb.PoM) *PoM { + return PoMFromPb(t) + }), + } +} + +func (m *PoMs) Pb() *accountabilitypb.PoMs { + if m == nil { + return nil + } + pbMessage := &accountabilitypb.PoMs{} + { + pbMessage.Poms = types1.ConvertSlice(m.Poms, func(t *PoM) *accountabilitypb.PoM { + return (t).Pb() + }) + } + + return pbMessage +} + +func (*PoMs) MirReflect() mirreflect.Type { + return mirreflect.TypeImpl{PbType_: reflectutil.TypeOf[*accountabilitypb.PoMs]()} +} + +type Message struct { + Type Message_Type +} + +type Message_Type interface { + mirreflect.GeneratedType + isMessage_Type() + Pb() accountabilitypb.Message_Type +} + +type Message_TypeWrapper[T any] interface { + Message_Type + Unwrap() *T +} + +func Message_TypeFromPb(pb accountabilitypb.Message_Type) Message_Type { + if pb == nil { + return nil + } + switch pb := pb.(type) { + case *accountabilitypb.Message_SignedPredecision: + return &Message_SignedPredecision{SignedPredecision: SignedPredecisionFromPb(pb.SignedPredecision)} + case *accountabilitypb.Message_Certificate: + return &Message_Certificate{Certificate: FullCertificateFromPb(pb.Certificate)} + case *accountabilitypb.Message_Poms: + return &Message_Poms{Poms: PoMsFromPb(pb.Poms)} + case *accountabilitypb.Message_LightCertificate: + return &Message_LightCertificate{LightCertificate: LightCertificateFromPb(pb.LightCertificate)} + } + return nil +} + +type Message_SignedPredecision struct { + SignedPredecision *SignedPredecision +} + +func (*Message_SignedPredecision) isMessage_Type() {} + +func (w *Message_SignedPredecision) Unwrap() *SignedPredecision { + return w.SignedPredecision +} + +func (w *Message_SignedPredecision) Pb() accountabilitypb.Message_Type { + if w == nil { + return nil + } + if w.SignedPredecision == nil { + return &accountabilitypb.Message_SignedPredecision{} + } + return &accountabilitypb.Message_SignedPredecision{SignedPredecision: (w.SignedPredecision).Pb()} +} + +func (*Message_SignedPredecision) MirReflect() mirreflect.Type { + return mirreflect.TypeImpl{PbType_: reflectutil.TypeOf[*accountabilitypb.Message_SignedPredecision]()} +} + +type Message_Certificate struct { + Certificate *FullCertificate +} + +func (*Message_Certificate) isMessage_Type() {} + +func (w *Message_Certificate) Unwrap() *FullCertificate { + return w.Certificate +} + +func (w *Message_Certificate) Pb() accountabilitypb.Message_Type { + if w == nil { + return nil + } + if w.Certificate == nil { + return &accountabilitypb.Message_Certificate{} + } + return &accountabilitypb.Message_Certificate{Certificate: (w.Certificate).Pb()} +} + +func (*Message_Certificate) MirReflect() mirreflect.Type { + return mirreflect.TypeImpl{PbType_: reflectutil.TypeOf[*accountabilitypb.Message_Certificate]()} +} + +type Message_Poms struct { + Poms *PoMs +} + +func (*Message_Poms) isMessage_Type() {} + +func (w *Message_Poms) Unwrap() *PoMs { + return w.Poms +} + +func (w *Message_Poms) Pb() accountabilitypb.Message_Type { + if w == nil { + return nil + } + if w.Poms == nil { + return &accountabilitypb.Message_Poms{} + } + return &accountabilitypb.Message_Poms{Poms: (w.Poms).Pb()} +} + +func (*Message_Poms) MirReflect() mirreflect.Type { + return mirreflect.TypeImpl{PbType_: reflectutil.TypeOf[*accountabilitypb.Message_Poms]()} +} + +type Message_LightCertificate struct { + LightCertificate *LightCertificate +} + +func (*Message_LightCertificate) isMessage_Type() {} + +func (w *Message_LightCertificate) Unwrap() *LightCertificate { + return w.LightCertificate +} + +func (w *Message_LightCertificate) Pb() accountabilitypb.Message_Type { + if w == nil { + return nil + } + if w.LightCertificate == nil { + return &accountabilitypb.Message_LightCertificate{} + } + return &accountabilitypb.Message_LightCertificate{LightCertificate: (w.LightCertificate).Pb()} +} + +func (*Message_LightCertificate) MirReflect() mirreflect.Type { + return mirreflect.TypeImpl{PbType_: reflectutil.TypeOf[*accountabilitypb.Message_LightCertificate]()} +} + +func MessageFromPb(pb *accountabilitypb.Message) *Message { + if pb == nil { + return nil + } + return &Message{ + Type: Message_TypeFromPb(pb.Type), + } +} + +func (m *Message) Pb() *accountabilitypb.Message { + if m == nil { + return nil + } + pbMessage := &accountabilitypb.Message{} + { + if m.Type != nil { + pbMessage.Type = (m.Type).Pb() + } + } + + return pbMessage +} + +func (*Message) MirReflect() mirreflect.Type { + return mirreflect.TypeImpl{PbType_: reflectutil.TypeOf[*accountabilitypb.Message]()} +} + +type SignedPredecision struct { + Predecision []uint8 + Signature []uint8 +} + +func SignedPredecisionFromPb(pb *accountabilitypb.SignedPredecision) *SignedPredecision { + if pb == nil { + return nil + } + return &SignedPredecision{ + Predecision: pb.Predecision, + Signature: pb.Signature, + } +} + +func (m *SignedPredecision) Pb() *accountabilitypb.SignedPredecision { + if m == nil { + return nil + } + pbMessage := &accountabilitypb.SignedPredecision{} + { + pbMessage.Predecision = m.Predecision + pbMessage.Signature = m.Signature + } + + return pbMessage +} + +func (*SignedPredecision) MirReflect() mirreflect.Type { + return mirreflect.TypeImpl{PbType_: reflectutil.TypeOf[*accountabilitypb.SignedPredecision]()} +} + +type FullCertificate struct { + Certificate map[types.NodeID]*SignedPredecision +} + +func FullCertificateFromPb(pb *accountabilitypb.FullCertificate) *FullCertificate { + if pb == nil { + return nil + } + return &FullCertificate{ + Certificate: types1.ConvertMap(pb.Certificate, func(k uint64, v *accountabilitypb.SignedPredecision) (types.NodeID, *SignedPredecision) { + return (types.NodeID)(k), SignedPredecisionFromPb(v) + }), + } +} + +func (m *FullCertificate) Pb() *accountabilitypb.FullCertificate { + if m == nil { + return nil + } + pbMessage := &accountabilitypb.FullCertificate{} + { + pbMessage.Certificate = types1.ConvertMap(m.Certificate, func(k types.NodeID, v *SignedPredecision) (uint64, *accountabilitypb.SignedPredecision) { + return (uint64)(k), (v).Pb() + }) + } + + return pbMessage +} + +func (*FullCertificate) MirReflect() mirreflect.Type { + return mirreflect.TypeImpl{PbType_: reflectutil.TypeOf[*accountabilitypb.FullCertificate]()} +} + +type InstanceParams struct { + Membership *types2.Membership +} + +func InstanceParamsFromPb(pb *accountabilitypb.InstanceParams) *InstanceParams { + if pb == nil { + return nil + } + return &InstanceParams{ + Membership: types2.MembershipFromPb(pb.Membership), + } +} + +func (m *InstanceParams) Pb() *accountabilitypb.InstanceParams { + if m == nil { + return nil + } + pbMessage := &accountabilitypb.InstanceParams{} + { + if m.Membership != nil { + pbMessage.Membership = (m.Membership).Pb() + } + } + + return pbMessage +} + +func (*InstanceParams) MirReflect() mirreflect.Type { + return mirreflect.TypeImpl{PbType_: reflectutil.TypeOf[*accountabilitypb.InstanceParams]()} +} From a14de10b6f35be4147b71a0fbb7e86aabe3fdd18 Mon Sep 17 00:00:00 2001 From: Alejandro Ranchal-Pedrosa Date: Fri, 28 Jul 2023 16:44:05 +0200 Subject: [PATCH 04/14] Correct typo in proto message and regenerate protos --- pkg/pb/accountabilitypb/accountabilitypb.pb.go | 6 +++--- pkg/pb/accountabilitypb/types/types.mir.go | 6 +++--- protos/accountabilitypb/accountabilitypb.proto | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/pkg/pb/accountabilitypb/accountabilitypb.pb.go b/pkg/pb/accountabilitypb/accountabilitypb.pb.go index c107ea919..67227f9c3 100644 --- a/pkg/pb/accountabilitypb/accountabilitypb.pb.go +++ b/pkg/pb/accountabilitypb/accountabilitypb.pb.go @@ -550,7 +550,7 @@ type FullCertificate struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Certificate map[uint64]*SignedPredecision `protobuf:"bytes,1,rep,name=certificate,proto3" json:"certificate,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Certificate map[string]*SignedPredecision `protobuf:"bytes,1,rep,name=certificate,proto3" json:"certificate,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } func (x *FullCertificate) Reset() { @@ -585,7 +585,7 @@ func (*FullCertificate) Descriptor() ([]byte, []int) { return file_accountabilitypb_accountabilitypb_proto_rawDescGZIP(), []int{8} } -func (x *FullCertificate) GetCertificate() map[uint64]*SignedPredecision { +func (x *FullCertificate) GetCertificate() map[string]*SignedPredecision { if x != nil { return x.Certificate } @@ -733,7 +733,7 @@ var file_accountabilitypb_accountabilitypb_proto_rawDesc = []byte{ 0x70, 0x65, 0x73, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x44, 0x52, 0x0b, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x1a, 0x63, 0x0a, 0x10, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, - 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x39, 0x0a, + 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x39, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x70, 0x62, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x50, 0x72, 0x65, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, diff --git a/pkg/pb/accountabilitypb/types/types.mir.go b/pkg/pb/accountabilitypb/types/types.mir.go index 1045536a4..464056d7a 100644 --- a/pkg/pb/accountabilitypb/types/types.mir.go +++ b/pkg/pb/accountabilitypb/types/types.mir.go @@ -521,7 +521,7 @@ func FullCertificateFromPb(pb *accountabilitypb.FullCertificate) *FullCertificat return nil } return &FullCertificate{ - Certificate: types1.ConvertMap(pb.Certificate, func(k uint64, v *accountabilitypb.SignedPredecision) (types.NodeID, *SignedPredecision) { + Certificate: types1.ConvertMap(pb.Certificate, func(k string, v *accountabilitypb.SignedPredecision) (types.NodeID, *SignedPredecision) { return (types.NodeID)(k), SignedPredecisionFromPb(v) }), } @@ -533,8 +533,8 @@ func (m *FullCertificate) Pb() *accountabilitypb.FullCertificate { } pbMessage := &accountabilitypb.FullCertificate{} { - pbMessage.Certificate = types1.ConvertMap(m.Certificate, func(k types.NodeID, v *SignedPredecision) (uint64, *accountabilitypb.SignedPredecision) { - return (uint64)(k), (v).Pb() + pbMessage.Certificate = types1.ConvertMap(m.Certificate, func(k types.NodeID, v *SignedPredecision) (string, *accountabilitypb.SignedPredecision) { + return (string)(k), (v).Pb() }) } diff --git a/protos/accountabilitypb/accountabilitypb.proto b/protos/accountabilitypb/accountabilitypb.proto index 290140034..753d5ace6 100644 --- a/protos/accountabilitypb/accountabilitypb.proto +++ b/protos/accountabilitypb/accountabilitypb.proto @@ -79,7 +79,7 @@ message SignedPredecision { message FullCertificate { option (net.message) = true; - map certificate = 1 [(mir.key_type) = "github.com/filecoin-project/mir/pkg/types.NodeID"]; + map certificate = 1 [(mir.key_type) = "github.com/filecoin-project/mir/pkg/types.NodeID"]; } message InstanceParams { From f089ac25f0c632fa8ce734bc6956f5e375a1feb1 Mon Sep 17 00:00:00 2001 From: Alejandro Ranchal-Pedrosa Date: Fri, 28 Jul 2023 16:49:29 +0200 Subject: [PATCH 05/14] Make lint happy --- .../fullcertificates/fullcertificates.go | 6 ++-- .../lightcertificates/lightcertificates.go | 4 +++ .../simpleacc/internal/poms/poms.go | 4 +-- .../internal/predecisions/predecisions.go | 29 +++++++++---------- 4 files changed, 22 insertions(+), 21 deletions(-) diff --git a/pkg/accountability/simpleacc/internal/certificates/fullcertificates/fullcertificates.go b/pkg/accountability/simpleacc/internal/certificates/fullcertificates/fullcertificates.go index b040b9242..8d03c78ab 100644 --- a/pkg/accountability/simpleacc/internal/certificates/fullcertificates/fullcertificates.go +++ b/pkg/accountability/simpleacc/internal/certificates/fullcertificates/fullcertificates.go @@ -53,7 +53,7 @@ func IncludeFullCertificate(m dsl.Module, mc.Crypto, sliceutil.Transform(maputil.GetValues(certificate), func(i int, sp *accpbtypes.SignedPredecision) *cryptopbtypes.SignedData { - return &cryptopbtypes.SignedData{[][]byte{sp.Predecision, []byte(mc.Self)}} + return &cryptopbtypes.SignedData{Data: [][]byte{sp.Predecision, []byte(mc.Self)}} }), sliceutil.Transform(maputil.GetValues(certificate), func(i int, sp *accpbtypes.SignedPredecision) []byte { @@ -68,8 +68,8 @@ func IncludeFullCertificate(m dsl.Module, }) cryptopbdsl.UponSigsVerified(m, func(nodeIds []t.NodeID, errs []error, allOk bool, vsr *verifySigs) error { - for i, nodeId := range nodeIds { - predecisions.ApplySigVerified(m, mc, params, state, nodeId, errs[i], vsr.certificate[nodeId], false, logger) + for i, nodeID := range nodeIds { + predecisions.ApplySigVerified(m, mc, params, state, nodeID, errs[i], vsr.certificate[nodeID], false, logger) } poms.SendPoMs(m, mc, params, state, logger) return nil diff --git a/pkg/accountability/simpleacc/internal/certificates/lightcertificates/lightcertificates.go b/pkg/accountability/simpleacc/internal/certificates/lightcertificates/lightcertificates.go index 3904b7f9f..252aa222a 100644 --- a/pkg/accountability/simpleacc/internal/certificates/lightcertificates/lightcertificates.go +++ b/pkg/accountability/simpleacc/internal/certificates/lightcertificates/lightcertificates.go @@ -29,6 +29,10 @@ func IncludeLightCertificate(m dsl.Module, accpbdsl.UponLightCertificateReceived(m, func(from t.NodeID, data []byte) error { + if !params.LightCertificates { + return nil + } + if state.DecidedCertificate == nil { logger.Log(logging.LevelDebug, "Received light certificate before decided certificate, buffering it") lightCertificates[from] = data diff --git a/pkg/accountability/simpleacc/internal/poms/poms.go b/pkg/accountability/simpleacc/internal/poms/poms.go index 66295934e..2b86cdf1d 100644 --- a/pkg/accountability/simpleacc/internal/poms/poms.go +++ b/pkg/accountability/simpleacc/internal/poms/poms.go @@ -47,8 +47,8 @@ func IncludePoMs( nodeIds = append(nodeIds, pom.NodeId, pom.NodeId) data = append(data, - &cryptopbtypes.SignedData{[][]byte{pom.ConflictingMsg_1.Predecision, []byte(mc.Self)}}, - &cryptopbtypes.SignedData{[][]byte{pom.ConflictingMsg_2.Predecision, []byte(mc.Self)}}) + &cryptopbtypes.SignedData{Data: [][]byte{pom.ConflictingMsg_1.Predecision, []byte(mc.Self)}}, + &cryptopbtypes.SignedData{Data: [][]byte{pom.ConflictingMsg_2.Predecision, []byte(mc.Self)}}) signatures = append(signatures, pom.ConflictingMsg_1.Signature, pom.ConflictingMsg_2.Signature) } diff --git a/pkg/accountability/simpleacc/internal/predecisions/predecisions.go b/pkg/accountability/simpleacc/internal/predecisions/predecisions.go index 3fc80625b..7992475db 100644 --- a/pkg/accountability/simpleacc/internal/predecisions/predecisions.go +++ b/pkg/accountability/simpleacc/internal/predecisions/predecisions.go @@ -42,7 +42,7 @@ func IncludePredecisions( state.Predecided = true // Sign predecision attaching mc.Self to prevent replay attacks - cryptopbdsl.SignRequest(m, mc.Crypto, &cryptopbtypes.SignedData{[][]byte{data, []byte(mc.Self)}}, &signRequest{data}) + cryptopbdsl.SignRequest(m, mc.Crypto, &cryptopbtypes.SignedData{Data: [][]byte{data, []byte(mc.Self)}}, &signRequest{data: data}) return nil }) @@ -69,7 +69,7 @@ func IncludePredecisions( // Verify signature of received signed predecision cryptopbdsl.VerifySig(m, mc.Crypto, - &cryptopbtypes.SignedData{[][]byte{predecision, []byte(mc.Self)}}, + &cryptopbtypes.SignedData{Data: [][]byte{predecision, []byte(mc.Self)}}, signature, from, &accpbtypes.SignedPredecision{ @@ -80,7 +80,8 @@ func IncludePredecisions( }) cryptopbdsl.UponSigVerified(m, func(nodeId t.NodeID, err error, sp *accpbtypes.SignedPredecision) error { - return ApplySigVerified(m, mc, params, state, nodeId, err, sp, true, logger) + ApplySigVerified(m, mc, params, state, nodeId, err, sp, true, logger) + return nil }) } @@ -94,27 +95,26 @@ func ApplySigVerified( mc *common.ModuleConfig, params *common.ModuleParams, state *incommon.State, - nodeId t.NodeID, + nodeID t.NodeID, err error, sp *accpbtypes.SignedPredecision, flushPoMs bool, logger logging.Logger, -) error { +) { if err != nil { logger.Log(logging.LevelDebug, "Signature verification failed") - return nil } // Check if PoM found - if state.SignedPredecisions[nodeId] != nil { - if !reflect.DeepEqual(state.SignedPredecisions[nodeId].Predecision, sp.Predecision) { + if state.SignedPredecisions[nodeID] != nil { + if !reflect.DeepEqual(state.SignedPredecisions[nodeID].Predecision, sp.Predecision) { logger.Log(logging.LevelWarn, "Received conflicting signed predecisions from same node") // if a PoM for this node has not already been sent - if _, ok := state.SentPoMs[nodeId]; !ok { + if _, ok := state.SentPoMs[nodeID]; !ok { state.UnsentPoMs = append(state.UnsentPoMs, &accpbtypes.PoM{ - NodeId: nodeId, - ConflictingMsg_1: state.SignedPredecisions[nodeId], + NodeId: nodeID, + ConflictingMsg_1: state.SignedPredecisions[nodeID], ConflictingMsg_2: sp, }) @@ -124,16 +124,15 @@ func ApplySigVerified( } logger.Log(logging.LevelDebug, "Discarding signed predecision as already received one from same node") - return nil } } // Store signed predecision - state.SignedPredecisions[nodeId] = sp + state.SignedPredecisions[nodeID] = sp if state.PredecisionCount[string(sp.Predecision)] == nil { state.PredecisionCount[string(sp.Predecision)] = make([]t.NodeID, 0) } - state.PredecisionCount[string(sp.Predecision)] = append(state.PredecisionCount[string(sp.Predecision)], nodeId) + state.PredecisionCount[string(sp.Predecision)] = append(state.PredecisionCount[string(sp.Predecision)], nodeID) // Once verified, if strong quorum, broadcast accpbdsl.FullCertificate if state.DecidedCertificate == nil && @@ -165,8 +164,6 @@ func ApplySigVerified( maputil.GetKeys(params.Membership.Nodes)) } } - - return nil } type signRequest struct { From dcbbee3d63245e047104f5b846c178bf9dbf853f Mon Sep 17 00:00:00 2001 From: Alejandro Ranchal-Pedrosa Date: Mon, 7 Aug 2023 16:27:24 +0200 Subject: [PATCH 06/14] Address minor comments --- .../simpleacc/accountability.go | 23 +- .../fullcertificates/fullcertificates.go | 10 +- .../lightcertificates/lightcertificates.go | 2 +- .../simpleacc/internal/common/common.go | 15 +- .../simpleacc/internal/poms/poms.go | 8 +- .../internal/predecisions/predecisions.go | 27 +-- .../accountabilitypb/accountabilitypb.pb.go | 215 ++++++++---------- .../accountabilitypb.pb.mir.go | 1 - pkg/pb/accountabilitypb/dsl/emit.mir.go | 5 - pkg/pb/accountabilitypb/dsl/upon.mir.go | 7 - pkg/pb/accountabilitypb/events/events.mir.go | 16 -- .../accountabilitypb/oneof_interfaces.mir.go | 4 - pkg/pb/accountabilitypb/types/types.mir.go | 26 --- .../accountabilitypb/accountabilitypb.proto | 3 +- 14 files changed, 139 insertions(+), 223 deletions(-) diff --git a/pkg/accountability/simpleacc/accountability.go b/pkg/accountability/simpleacc/accountability.go index 2cf073e05..ee0e561a7 100644 --- a/pkg/accountability/simpleacc/accountability.go +++ b/pkg/accountability/simpleacc/accountability.go @@ -25,9 +25,10 @@ type ModuleParams = common.ModuleParams // NewModule creates a new instance of the (optinal) accountability // module. -// This module can receive predecisions from an -// ordering module (instead of the ordering module delivering them to the -// application layer directly). It performs two all-to-all broadcasts +// This module can receive decisions from a module that ensures agreement +// (for example, receive a decision from the ordering module, instead of +// the ordering module delivering them to the application layer directly), +// and treats them as predecisions. It performs two all-to-all broadcasts // with signatures to ensure accountability. The first broadcast is a // signed predecision per participant. In the second broadcast, each // participant broadcasts a certificate containing a strong quorum of @@ -37,10 +38,10 @@ type ModuleParams = common.ModuleParams // *Accountability* states that if an adversary (controlling less than a // strong quorum, but perhaps more or as much as a weak quorum) causes // a disagreement (two different correct processes delivering different -// decisions) then there is at least a weak quorum of processes for which -// all correct processes eventually receive Proofs-of-Misbehavior (PoMs). -// In the case of this module, a PoM is a pair of signed predecisions for -// different predecisions from the same node. +// decisions) then all correct processes eventually receive Proofs-of-Misbehavior (PoMs) +// for a provably malicious coalition at least the size of a weak quorum. +// In the case of this module, a PoM is a pair of different predecisions signed +// by the same node. // The module keeps looking for PoMs with newly received messages // (signed predecisions or certificates) after termination, until // it is garbage collected. @@ -63,8 +64,7 @@ type ModuleParams = common.ModuleParams // // This module effectively implements a variant of the accountability // module of Civit et al. at https://ieeexplore.ieee.org/document/9820722/ -// Except that it ReportedPoMs map[t.NodeID]*accpbtypes.PoM -// does not implement the optimization using threshold +// Except that it does not implement the optimization using threshold // signatures (as we have members with associated weight) // @@ -83,7 +83,7 @@ func NewModule(mc ModuleConfig, params *ModuleParams, logger logging.Logger) (mo state := &incommon.State{ SignedPredecisions: make(map[t.NodeID]*accpbtypes.SignedPredecision), - PredecisionCount: make(map[string][]t.NodeID), + PredecisionNodeIDs: make(map[string][]t.NodeID), SignedPredecision: nil, DecidedCertificate: nil, Predecided: false, @@ -110,10 +110,9 @@ func NewReconfigurableModule(mc ModuleConfig, paramsTemplate ModuleParams, logge factorymodule.DefaultParams( // This function will be called whenever the factory module - // is asked to create a new instance of the multisig collector. + // is asked to create a new instance of the accountabuility module. func(accID t.ModuleID, params *factorypbtypes.GeneratorParams) (modules.PassiveModule, error) { - // Extract the IDs of the nodes in the membership associated with this instance accParams := params.Type.(*factorypbtypes.GeneratorParams_AccModule).AccModule // Create a copy of basic module config with an adapted ID for the submodule. diff --git a/pkg/accountability/simpleacc/internal/certificates/fullcertificates/fullcertificates.go b/pkg/accountability/simpleacc/internal/certificates/fullcertificates/fullcertificates.go index 8d03c78ab..bdc753d84 100644 --- a/pkg/accountability/simpleacc/internal/certificates/fullcertificates/fullcertificates.go +++ b/pkg/accountability/simpleacc/internal/certificates/fullcertificates/fullcertificates.go @@ -20,7 +20,7 @@ import ( ) // IncludeFullCertificate implements the full certificate brodcast and verification -// in order to find PoMs +// in order to find PoMs. func IncludeFullCertificate(m dsl.Module, mc *common.ModuleConfig, params *common.ModuleParams, @@ -31,23 +31,23 @@ func IncludeFullCertificate(m dsl.Module, accpbdsl.UponFullCertificateReceived(m, func(from t.NodeID, certificate map[t.NodeID]*accpbtypes.SignedPredecision) error { predecision, empty := maputil.AnyVal(certificate) if empty { - logger.Log(logging.LevelDebug, "Received empty predecision certificate") + logger.Log(logging.LevelDebug, "Ignoring empty predecision certificate") return nil } if !membutil.HaveStrongQuorum(params.Membership, maputil.GetKeys(certificate)) { - logger.Log(logging.LevelDebug, "Received predecision certificate without strong quorum") + logger.Log(logging.LevelDebug, "Ignoring predecision certificate without strong quorum") return nil } for _, v := range certificate { if !reflect.DeepEqual(predecision.Predecision, v.Predecision) { - logger.Log(logging.LevelDebug, "Received predecision certificate with different predecisions") + logger.Log(logging.LevelDebug, "Ignoring predecision certificate with different predecisions") return nil } } - // Verify all signatures in certificate + // Verify all signatures in certificate. cryptopbdsl.VerifySigs( m, mc.Crypto, diff --git a/pkg/accountability/simpleacc/internal/certificates/lightcertificates/lightcertificates.go b/pkg/accountability/simpleacc/internal/certificates/lightcertificates/lightcertificates.go index 252aa222a..a7fbe8607 100644 --- a/pkg/accountability/simpleacc/internal/certificates/lightcertificates/lightcertificates.go +++ b/pkg/accountability/simpleacc/internal/certificates/lightcertificates/lightcertificates.go @@ -17,7 +17,7 @@ import ( // IncludeLightCertificate implements the (optional) light certificate optimization // that optimistically sends only the predecision during the light certificate // so that in the good case where there are no disagreements and all processes -// are correct there is no need to broadcast a full certificate containing O(n) signatures +// are correct there is no need to broadcast a full certificate containing O(n) signatures. func IncludeLightCertificate(m dsl.Module, mc *common.ModuleConfig, params *common.ModuleParams, diff --git a/pkg/accountability/simpleacc/internal/common/common.go b/pkg/accountability/simpleacc/internal/common/common.go index 74345c569..71a6d3e15 100644 --- a/pkg/accountability/simpleacc/internal/common/common.go +++ b/pkg/accountability/simpleacc/internal/common/common.go @@ -6,11 +6,12 @@ import ( ) type State struct { - SignedPredecisions map[t.NodeID]*accpbtypes.SignedPredecision - PredecisionCount map[string][]t.NodeID - SignedPredecision *accpbtypes.SignedPredecision - DecidedCertificate map[t.NodeID]*accpbtypes.SignedPredecision - Predecided bool - UnsentPoMs []*accpbtypes.PoM - SentPoMs map[t.NodeID]*accpbtypes.PoM + SignedPredecisions map[t.NodeID]*accpbtypes.SignedPredecision // Map of received signed predicisions (including own's) with their signer as key. + PredecisionNodeIDs map[string][]t.NodeID // Map of predecisions and the nodes that have signed them with the predecision as key, + // used for fast verification of whether a predecision is predecided by a strong quorum. + SignedPredecision *accpbtypes.SignedPredecision // Own signed predecision. + DecidedCertificate map[t.NodeID]*accpbtypes.SignedPredecision // Locally decided certificate as a map with signer as key. + Predecided bool // Whether this process has received a predecided value from calling module. + UnsentPoMs []*accpbtypes.PoM // List of PoMs not yet sent to the application. + SentPoMs map[t.NodeID]*accpbtypes.PoM // List of PoMs already sent to the application with the signer as key. } diff --git a/pkg/accountability/simpleacc/internal/poms/poms.go b/pkg/accountability/simpleacc/internal/poms/poms.go index 2b86cdf1d..99e102e03 100644 --- a/pkg/accountability/simpleacc/internal/poms/poms.go +++ b/pkg/accountability/simpleacc/internal/poms/poms.go @@ -17,7 +17,7 @@ import ( "github.com/filecoin-project/mir/pkg/util/maputil" ) -// IncludePoMs verifies receives PoMs and sends found PoMs to other members +// IncludePoMs verifies receives PoMs and sends found PoMs to other members. func IncludePoMs( m dsl.Module, mc *common.ModuleConfig, @@ -32,7 +32,7 @@ func IncludePoMs( for _, pom := range poms { if reflect.DeepEqual(pom.ConflictingMsg_1.Predecision, pom.ConflictingMsg_2.Predecision) || - reflect.DeepEqual(pom.ConflictingMsg_1.Signature, pom.ConflictingMsg_2.Signature) { // no need to check, no PoM possible here + reflect.DeepEqual(pom.ConflictingMsg_1.Signature, pom.ConflictingMsg_2.Signature) { // no PoM possible here continue } @@ -40,7 +40,7 @@ func IncludePoMs( continue } - if _, ok := state.SentPoMs[pom.NodeId]; !ok { + if _, ok := state.SentPoMs[pom.NodeId]; ok { continue } @@ -82,7 +82,7 @@ func IncludePoMs( }) } -// SendPoMs sends all PoMs in State.UnsentPoMs to all nodes and to the application module (from the POV of this module, i.e. mc.App) +// SendPoMs sends all PoMs in State.UnsentPoMs to all nodes and to the application module (from the POV of this module, i.e. mc.App). func SendPoMs( m dsl.Module, mc *common.ModuleConfig, diff --git a/pkg/accountability/simpleacc/internal/predecisions/predecisions.go b/pkg/accountability/simpleacc/internal/predecisions/predecisions.go index 7992475db..04e84471c 100644 --- a/pkg/accountability/simpleacc/internal/predecisions/predecisions.go +++ b/pkg/accountability/simpleacc/internal/predecisions/predecisions.go @@ -35,13 +35,13 @@ func IncludePredecisions( accpbdsl.UponPredecided(m, func(data []byte) error { if state.Predecided { - logger.Log(logging.LevelWarn, "Received Predecided message while already Predecided") + logger.Log(logging.LevelWarn, "Received Predecided event while already Predecided") return nil } state.Predecided = true - // Sign predecision attaching mc.Self to prevent replay attacks + // Sign predecision attaching mc.Self to prevent replay attacks. cryptopbdsl.SignRequest(m, mc.Crypto, &cryptopbtypes.SignedData{Data: [][]byte{data, []byte(mc.Self)}}, &signRequest{data: data}) return nil @@ -53,7 +53,7 @@ func IncludePredecisions( Signature: signature, } - // Broadcast signed predecision to all participants (including oneself) + // Broadcast signed predecision to all participants (including oneself). transportpbdsl.SendMessage(m, mc.Net, accpbmsgs.SignedPredecision(mc.Self, sr.data, signature), maputil.GetKeys(params.Membership.Nodes)) return nil }) @@ -67,7 +67,7 @@ func IncludePredecisions( } } - // Verify signature of received signed predecision + // Verify signature of received signed predecision. cryptopbdsl.VerifySig(m, mc.Crypto, &cryptopbtypes.SignedData{Data: [][]byte{predecision, []byte(mc.Self)}}, signature, @@ -86,10 +86,10 @@ func IncludePredecisions( } -// ApplySigVerified applies the result of a signature verification +// ApplySigVerified applies the result of a signature verification. // This function is called once a received signed predecision is verified, but also // For all signatures of a signed predecision contained in a received certificate -// once they are verified +// once they are verified. func ApplySigVerified( m dsl.Module, mc *common.ModuleConfig, @@ -105,11 +105,11 @@ func ApplySigVerified( logger.Log(logging.LevelDebug, "Signature verification failed") } - // Check if PoM found + // Check if PoM found. if state.SignedPredecisions[nodeID] != nil { if !reflect.DeepEqual(state.SignedPredecisions[nodeID].Predecision, sp.Predecision) { logger.Log(logging.LevelWarn, "Received conflicting signed predecisions from same node") - // if a PoM for this node has not already been sent + // if a PoM for this node has not already been sent. if _, ok := state.SentPoMs[nodeID]; !ok { state.UnsentPoMs = append(state.UnsentPoMs, &accpbtypes.PoM{ @@ -127,16 +127,13 @@ func ApplySigVerified( } } - // Store signed predecision + // Store signed predecision. state.SignedPredecisions[nodeID] = sp - if state.PredecisionCount[string(sp.Predecision)] == nil { - state.PredecisionCount[string(sp.Predecision)] = make([]t.NodeID, 0) - } - state.PredecisionCount[string(sp.Predecision)] = append(state.PredecisionCount[string(sp.Predecision)], nodeID) + state.PredecisionNodeIDs[string(sp.Predecision)] = append(state.PredecisionNodeIDs[string(sp.Predecision)], nodeID) - // Once verified, if strong quorum, broadcast accpbdsl.FullCertificate + // Once verified, if strong quorum, broadcast accpbdsl.FullCertificate. if state.DecidedCertificate == nil && - membutil.HaveStrongQuorum(params.Membership, state.PredecisionCount[string(sp.Predecision)]) { + membutil.HaveStrongQuorum(params.Membership, state.PredecisionNodeIDs[string(sp.Predecision)]) { state.DecidedCertificate = maputil.Filter( state.SignedPredecisions, func( diff --git a/pkg/pb/accountabilitypb/accountabilitypb.pb.go b/pkg/pb/accountabilitypb/accountabilitypb.pb.go index 67227f9c3..49284aff0 100644 --- a/pkg/pb/accountabilitypb/accountabilitypb.pb.go +++ b/pkg/pb/accountabilitypb/accountabilitypb.pb.go @@ -32,7 +32,6 @@ type Event struct { // *Event_Predecided // *Event_Decided // *Event_Poms - // *Event_InstanceParams Type isEvent_Type `protobuf_oneof:"type"` } @@ -96,13 +95,6 @@ func (x *Event) GetPoms() *PoMs { return nil } -func (x *Event) GetInstanceParams() *InstanceParams { - if x, ok := x.GetType().(*Event_InstanceParams); ok { - return x.InstanceParams - } - return nil -} - type isEvent_Type interface { isEvent_Type() } @@ -119,18 +111,12 @@ type Event_Poms struct { Poms *PoMs `protobuf:"bytes,3,opt,name=poms,proto3,oneof"` } -type Event_InstanceParams struct { - InstanceParams *InstanceParams `protobuf:"bytes,4,opt,name=instance_params,json=instanceParams,proto3,oneof"` -} - func (*Event_Predecided) isEvent_Type() {} func (*Event_Decided) isEvent_Type() {} func (*Event_Poms) isEvent_Type() {} -func (*Event_InstanceParams) isEvent_Type() {} - type Predecided struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -651,7 +637,7 @@ var file_accountabilitypb_accountabilitypb_proto_rawDesc = []byte{ 0x67, 0x65, 0x6e, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x6d, 0x69, 0x72, 0x2f, 0x63, 0x6f, 0x64, 0x65, 0x67, 0x65, 0x6e, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x22, 0x8d, 0x02, 0x0a, 0x05, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x3e, 0x0a, 0x0a, + 0x74, 0x6f, 0x22, 0xc0, 0x01, 0x0a, 0x05, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x3e, 0x0a, 0x0a, 0x70, 0x72, 0x65, 0x64, 0x65, 0x63, 0x69, 0x64, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x70, 0x62, 0x2e, 0x50, 0x72, 0x65, 0x64, 0x65, 0x63, 0x69, 0x64, 0x65, 0x64, 0x48, 0x00, @@ -662,92 +648,87 @@ var file_accountabilitypb_accountabilitypb_proto_rawDesc = []byte{ 0x64, 0x65, 0x64, 0x12, 0x2c, 0x0a, 0x04, 0x70, 0x6f, 0x6d, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x70, 0x62, 0x2e, 0x50, 0x6f, 0x4d, 0x73, 0x48, 0x00, 0x52, 0x04, 0x70, 0x6f, 0x6d, - 0x73, 0x12, 0x4b, 0x0a, 0x0f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x70, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x61, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x70, 0x62, 0x2e, 0x49, 0x6e, - 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x48, 0x00, 0x52, 0x0e, - 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x3a, 0x04, - 0x90, 0xa6, 0x1d, 0x01, 0x42, 0x0c, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x04, 0x80, 0xa6, - 0x1d, 0x01, 0x22, 0x26, 0x0a, 0x0a, 0x50, 0x72, 0x65, 0x64, 0x65, 0x63, 0x69, 0x64, 0x65, 0x64, - 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, - 0x64, 0x61, 0x74, 0x61, 0x3a, 0x04, 0x98, 0xa6, 0x1d, 0x01, 0x22, 0x23, 0x0a, 0x07, 0x44, 0x65, - 0x63, 0x69, 0x64, 0x65, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x3a, 0x04, 0x98, 0xa6, 0x1d, 0x01, 0x22, - 0xfc, 0x01, 0x0a, 0x03, 0x50, 0x6f, 0x4d, 0x12, 0x4d, 0x0a, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x5f, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x34, 0x82, 0xa6, 0x1d, 0x30, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x63, 0x6f, 0x69, - 0x6e, 0x2d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x6d, 0x69, 0x72, 0x2f, 0x70, 0x6b, - 0x67, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x44, 0x52, 0x06, - 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x4f, 0x0a, 0x11, 0x63, 0x6f, 0x6e, 0x66, 0x6c, 0x69, - 0x63, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x6d, 0x73, 0x67, 0x5f, 0x31, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x23, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x62, 0x69, 0x6c, 0x69, - 0x74, 0x79, 0x70, 0x62, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x50, 0x72, 0x65, 0x64, 0x65, - 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, - 0x69, 0x6e, 0x67, 0x4d, 0x73, 0x67, 0x31, 0x12, 0x4f, 0x0a, 0x11, 0x63, 0x6f, 0x6e, 0x66, 0x6c, - 0x69, 0x63, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x6d, 0x73, 0x67, 0x5f, 0x32, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x62, 0x69, 0x6c, - 0x69, 0x74, 0x79, 0x70, 0x62, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x50, 0x72, 0x65, 0x64, - 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, - 0x74, 0x69, 0x6e, 0x67, 0x4d, 0x73, 0x67, 0x32, 0x3a, 0x04, 0x80, 0xa6, 0x1d, 0x01, 0x22, 0x2c, - 0x0a, 0x10, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, - 0x74, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, - 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x3a, 0x04, 0xd0, 0xe4, 0x1d, 0x01, 0x22, 0x3b, 0x0a, 0x04, - 0x50, 0x6f, 0x4d, 0x73, 0x12, 0x29, 0x0a, 0x04, 0x70, 0x6f, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x62, 0x69, 0x6c, - 0x69, 0x74, 0x79, 0x70, 0x62, 0x2e, 0x50, 0x6f, 0x4d, 0x52, 0x04, 0x70, 0x6f, 0x6d, 0x73, 0x3a, - 0x08, 0x98, 0xa6, 0x1d, 0x01, 0xd0, 0xe4, 0x1d, 0x01, 0x22, 0xbb, 0x02, 0x0a, 0x07, 0x4d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x54, 0x0a, 0x12, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, - 0x70, 0x72, 0x65, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x23, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x62, 0x69, 0x6c, 0x69, - 0x74, 0x79, 0x70, 0x62, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x50, 0x72, 0x65, 0x64, 0x65, - 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x11, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, - 0x50, 0x72, 0x65, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x45, 0x0a, 0x0b, 0x63, - 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x21, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, - 0x79, 0x70, 0x62, 0x2e, 0x46, 0x75, 0x6c, 0x6c, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, - 0x61, 0x74, 0x65, 0x48, 0x00, 0x52, 0x0b, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, - 0x74, 0x65, 0x12, 0x2c, 0x0a, 0x04, 0x70, 0x6f, 0x6d, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x16, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, - 0x79, 0x70, 0x62, 0x2e, 0x50, 0x6f, 0x4d, 0x73, 0x48, 0x00, 0x52, 0x04, 0x70, 0x6f, 0x6d, 0x73, - 0x12, 0x51, 0x0a, 0x11, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, - 0x69, 0x63, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x61, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x70, 0x62, 0x2e, 0x4c, - 0x69, 0x67, 0x68, 0x74, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x48, - 0x00, 0x52, 0x10, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, - 0x61, 0x74, 0x65, 0x3a, 0x04, 0xc8, 0xe4, 0x1d, 0x01, 0x42, 0x0c, 0x0a, 0x04, 0x74, 0x79, 0x70, - 0x65, 0x12, 0x04, 0xc8, 0xe4, 0x1d, 0x01, 0x22, 0x5d, 0x0a, 0x11, 0x53, 0x69, 0x67, 0x6e, 0x65, - 0x64, 0x50, 0x72, 0x65, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x0a, 0x0b, - 0x70, 0x72, 0x65, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0c, 0x52, 0x0b, 0x70, 0x72, 0x65, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1c, - 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0c, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x3a, 0x08, 0xd0, 0xe4, - 0x1d, 0x01, 0x80, 0xa6, 0x1d, 0x01, 0x22, 0x89, 0x02, 0x0a, 0x0f, 0x46, 0x75, 0x6c, 0x6c, 0x43, - 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x8a, 0x01, 0x0a, 0x0b, 0x63, - 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x32, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, - 0x79, 0x70, 0x62, 0x2e, 0x46, 0x75, 0x6c, 0x6c, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, - 0x61, 0x74, 0x65, 0x2e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x42, 0x34, 0xaa, 0xa6, 0x1d, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x63, 0x6f, 0x69, 0x6e, 0x2d, 0x70, 0x72, - 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x6d, 0x69, 0x72, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x74, 0x79, - 0x70, 0x65, 0x73, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x44, 0x52, 0x0b, 0x63, 0x65, 0x72, 0x74, - 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x1a, 0x63, 0x0a, 0x10, 0x43, 0x65, 0x72, 0x74, 0x69, - 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, - 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x39, 0x0a, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x61, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x70, 0x62, 0x2e, - 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x50, 0x72, 0x65, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, - 0x6e, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x04, 0xd0, 0xe4, - 0x1d, 0x01, 0x22, 0x4d, 0x0a, 0x0e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x50, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x12, 0x35, 0x0a, 0x0a, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, - 0x69, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x74, - 0x6f, 0x72, 0x70, 0x62, 0x2e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x52, - 0x0a, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x3a, 0x04, 0x98, 0xa6, 0x1d, - 0x01, 0x42, 0x39, 0x5a, 0x37, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x66, 0x69, 0x6c, 0x65, 0x63, 0x6f, 0x69, 0x6e, 0x2d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, - 0x2f, 0x6d, 0x69, 0x72, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x62, 0x2f, 0x61, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x73, 0x3a, 0x04, 0x90, 0xa6, 0x1d, 0x01, 0x42, 0x0c, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, + 0x04, 0x80, 0xa6, 0x1d, 0x01, 0x22, 0x26, 0x0a, 0x0a, 0x50, 0x72, 0x65, 0x64, 0x65, 0x63, 0x69, + 0x64, 0x65, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x3a, 0x04, 0x98, 0xa6, 0x1d, 0x01, 0x22, 0x23, 0x0a, + 0x07, 0x44, 0x65, 0x63, 0x69, 0x64, 0x65, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x3a, 0x04, 0x98, 0xa6, + 0x1d, 0x01, 0x22, 0xfc, 0x01, 0x0a, 0x03, 0x50, 0x6f, 0x4d, 0x12, 0x4d, 0x0a, 0x07, 0x6e, 0x6f, + 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x34, 0x82, 0xa6, 0x1d, + 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x66, 0x69, 0x6c, 0x65, + 0x63, 0x6f, 0x69, 0x6e, 0x2d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x6d, 0x69, 0x72, + 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x49, + 0x44, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x4f, 0x0a, 0x11, 0x63, 0x6f, 0x6e, + 0x66, 0x6c, 0x69, 0x63, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x6d, 0x73, 0x67, 0x5f, 0x31, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x62, + 0x69, 0x6c, 0x69, 0x74, 0x79, 0x70, 0x62, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x50, 0x72, + 0x65, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x66, 0x6c, + 0x69, 0x63, 0x74, 0x69, 0x6e, 0x67, 0x4d, 0x73, 0x67, 0x31, 0x12, 0x4f, 0x0a, 0x11, 0x63, 0x6f, + 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x6d, 0x73, 0x67, 0x5f, 0x32, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, + 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x70, 0x62, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x50, + 0x72, 0x65, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x66, + 0x6c, 0x69, 0x63, 0x74, 0x69, 0x6e, 0x67, 0x4d, 0x73, 0x67, 0x32, 0x3a, 0x04, 0x80, 0xa6, 0x1d, + 0x01, 0x22, 0x2c, 0x0a, 0x10, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, + 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x3a, 0x04, 0xd0, 0xe4, 0x1d, 0x01, 0x22, + 0x3b, 0x0a, 0x04, 0x50, 0x6f, 0x4d, 0x73, 0x12, 0x29, 0x0a, 0x04, 0x70, 0x6f, 0x6d, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, + 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x70, 0x62, 0x2e, 0x50, 0x6f, 0x4d, 0x52, 0x04, 0x70, 0x6f, + 0x6d, 0x73, 0x3a, 0x08, 0x98, 0xa6, 0x1d, 0x01, 0xd0, 0xe4, 0x1d, 0x01, 0x22, 0xbb, 0x02, 0x0a, + 0x07, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x54, 0x0a, 0x12, 0x73, 0x69, 0x67, 0x6e, + 0x65, 0x64, 0x5f, 0x70, 0x72, 0x65, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x62, + 0x69, 0x6c, 0x69, 0x74, 0x79, 0x70, 0x62, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x50, 0x72, + 0x65, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x11, 0x73, 0x69, 0x67, + 0x6e, 0x65, 0x64, 0x50, 0x72, 0x65, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x45, + 0x0a, 0x0b, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x62, 0x69, + 0x6c, 0x69, 0x74, 0x79, 0x70, 0x62, 0x2e, 0x46, 0x75, 0x6c, 0x6c, 0x43, 0x65, 0x72, 0x74, 0x69, + 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x48, 0x00, 0x52, 0x0b, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, + 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x2c, 0x0a, 0x04, 0x70, 0x6f, 0x6d, 0x73, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x62, 0x69, + 0x6c, 0x69, 0x74, 0x79, 0x70, 0x62, 0x2e, 0x50, 0x6f, 0x4d, 0x73, 0x48, 0x00, 0x52, 0x04, 0x70, + 0x6f, 0x6d, 0x73, 0x12, 0x51, 0x0a, 0x11, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x5f, 0x63, 0x65, 0x72, + 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, + 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x70, + 0x62, 0x2e, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, + 0x74, 0x65, 0x48, 0x00, 0x52, 0x10, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x43, 0x65, 0x72, 0x74, 0x69, + 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x3a, 0x04, 0xc8, 0xe4, 0x1d, 0x01, 0x42, 0x0c, 0x0a, 0x04, + 0x74, 0x79, 0x70, 0x65, 0x12, 0x04, 0xc8, 0xe4, 0x1d, 0x01, 0x22, 0x5d, 0x0a, 0x11, 0x53, 0x69, + 0x67, 0x6e, 0x65, 0x64, 0x50, 0x72, 0x65, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, + 0x20, 0x0a, 0x0b, 0x70, 0x72, 0x65, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x70, 0x72, 0x65, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, + 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x3a, + 0x08, 0xd0, 0xe4, 0x1d, 0x01, 0x80, 0xa6, 0x1d, 0x01, 0x22, 0x89, 0x02, 0x0a, 0x0f, 0x46, 0x75, + 0x6c, 0x6c, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x8a, 0x01, + 0x0a, 0x0b, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x62, 0x69, + 0x6c, 0x69, 0x74, 0x79, 0x70, 0x62, 0x2e, 0x46, 0x75, 0x6c, 0x6c, 0x43, 0x65, 0x72, 0x74, 0x69, + 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x2e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, + 0x74, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x34, 0xaa, 0xa6, 0x1d, 0x30, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x63, 0x6f, 0x69, 0x6e, + 0x2d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x6d, 0x69, 0x72, 0x2f, 0x70, 0x6b, 0x67, + 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x44, 0x52, 0x0b, 0x63, + 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x1a, 0x63, 0x0a, 0x10, 0x43, 0x65, + 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, + 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, + 0x12, 0x39, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x23, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, + 0x70, 0x62, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x50, 0x72, 0x65, 0x64, 0x65, 0x63, 0x69, + 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, + 0x04, 0xd0, 0xe4, 0x1d, 0x01, 0x22, 0x4d, 0x0a, 0x0e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, + 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x35, 0x0a, 0x0a, 0x6d, 0x65, 0x6d, 0x62, 0x65, + 0x72, 0x73, 0x68, 0x69, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x72, + 0x61, 0x6e, 0x74, 0x6f, 0x72, 0x70, 0x62, 0x2e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, + 0x69, 0x70, 0x52, 0x0a, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x3a, 0x04, + 0x80, 0xa6, 0x1d, 0x01, 0x42, 0x39, 0x5a, 0x37, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x63, 0x6f, 0x69, 0x6e, 0x2d, 0x70, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x2f, 0x6d, 0x69, 0x72, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x62, 0x2f, 0x61, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x70, 0x62, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -781,22 +762,21 @@ var file_accountabilitypb_accountabilitypb_proto_depIdxs = []int32{ 1, // 0: accountabilitypb.Event.predecided:type_name -> accountabilitypb.Predecided 2, // 1: accountabilitypb.Event.decided:type_name -> accountabilitypb.Decided 5, // 2: accountabilitypb.Event.poms:type_name -> accountabilitypb.PoMs - 9, // 3: accountabilitypb.Event.instance_params:type_name -> accountabilitypb.InstanceParams - 7, // 4: accountabilitypb.PoM.conflicting_msg_1:type_name -> accountabilitypb.SignedPredecision - 7, // 5: accountabilitypb.PoM.conflicting_msg_2:type_name -> accountabilitypb.SignedPredecision - 3, // 6: accountabilitypb.PoMs.poms:type_name -> accountabilitypb.PoM - 7, // 7: accountabilitypb.Message.signed_predecision:type_name -> accountabilitypb.SignedPredecision - 8, // 8: accountabilitypb.Message.certificate:type_name -> accountabilitypb.FullCertificate - 5, // 9: accountabilitypb.Message.poms:type_name -> accountabilitypb.PoMs - 4, // 10: accountabilitypb.Message.light_certificate:type_name -> accountabilitypb.LightCertificate - 10, // 11: accountabilitypb.FullCertificate.certificate:type_name -> accountabilitypb.FullCertificate.CertificateEntry - 11, // 12: accountabilitypb.InstanceParams.membership:type_name -> trantorpb.Membership - 7, // 13: accountabilitypb.FullCertificate.CertificateEntry.value:type_name -> accountabilitypb.SignedPredecision - 14, // [14:14] is the sub-list for method output_type - 14, // [14:14] is the sub-list for method input_type - 14, // [14:14] is the sub-list for extension type_name - 14, // [14:14] is the sub-list for extension extendee - 0, // [0:14] is the sub-list for field type_name + 7, // 3: accountabilitypb.PoM.conflicting_msg_1:type_name -> accountabilitypb.SignedPredecision + 7, // 4: accountabilitypb.PoM.conflicting_msg_2:type_name -> accountabilitypb.SignedPredecision + 3, // 5: accountabilitypb.PoMs.poms:type_name -> accountabilitypb.PoM + 7, // 6: accountabilitypb.Message.signed_predecision:type_name -> accountabilitypb.SignedPredecision + 8, // 7: accountabilitypb.Message.certificate:type_name -> accountabilitypb.FullCertificate + 5, // 8: accountabilitypb.Message.poms:type_name -> accountabilitypb.PoMs + 4, // 9: accountabilitypb.Message.light_certificate:type_name -> accountabilitypb.LightCertificate + 10, // 10: accountabilitypb.FullCertificate.certificate:type_name -> accountabilitypb.FullCertificate.CertificateEntry + 11, // 11: accountabilitypb.InstanceParams.membership:type_name -> trantorpb.Membership + 7, // 12: accountabilitypb.FullCertificate.CertificateEntry.value:type_name -> accountabilitypb.SignedPredecision + 13, // [13:13] is the sub-list for method output_type + 13, // [13:13] is the sub-list for method input_type + 13, // [13:13] is the sub-list for extension type_name + 13, // [13:13] is the sub-list for extension extendee + 0, // [0:13] is the sub-list for field type_name } func init() { file_accountabilitypb_accountabilitypb_proto_init() } @@ -930,7 +910,6 @@ func file_accountabilitypb_accountabilitypb_proto_init() { (*Event_Predecided)(nil), (*Event_Decided)(nil), (*Event_Poms)(nil), - (*Event_InstanceParams)(nil), } file_accountabilitypb_accountabilitypb_proto_msgTypes[6].OneofWrappers = []interface{}{ (*Message_SignedPredecision)(nil), diff --git a/pkg/pb/accountabilitypb/accountabilitypb.pb.mir.go b/pkg/pb/accountabilitypb/accountabilitypb.pb.mir.go index b2c890da6..74be284a0 100644 --- a/pkg/pb/accountabilitypb/accountabilitypb.pb.mir.go +++ b/pkg/pb/accountabilitypb/accountabilitypb.pb.mir.go @@ -11,7 +11,6 @@ func (*Event) ReflectTypeOptions() []reflect.Type { reflect.TypeOf((*Event_Predecided)(nil)), reflect.TypeOf((*Event_Decided)(nil)), reflect.TypeOf((*Event_Poms)(nil)), - reflect.TypeOf((*Event_InstanceParams)(nil)), } } diff --git a/pkg/pb/accountabilitypb/dsl/emit.mir.go b/pkg/pb/accountabilitypb/dsl/emit.mir.go index 7ef96f6b2..9987aa711 100644 --- a/pkg/pb/accountabilitypb/dsl/emit.mir.go +++ b/pkg/pb/accountabilitypb/dsl/emit.mir.go @@ -6,7 +6,6 @@ import ( dsl "github.com/filecoin-project/mir/pkg/dsl" events "github.com/filecoin-project/mir/pkg/pb/accountabilitypb/events" types1 "github.com/filecoin-project/mir/pkg/pb/accountabilitypb/types" - types2 "github.com/filecoin-project/mir/pkg/pb/trantorpb/types" types "github.com/filecoin-project/mir/pkg/types" ) @@ -23,7 +22,3 @@ func Decided(m dsl.Module, destModule types.ModuleID, data []uint8) { func PoMs(m dsl.Module, destModule types.ModuleID, poms []*types1.PoM) { dsl.EmitMirEvent(m, events.PoMs(destModule, poms)) } - -func InstanceParams(m dsl.Module, destModule types.ModuleID, membership *types2.Membership) { - dsl.EmitMirEvent(m, events.InstanceParams(destModule, membership)) -} diff --git a/pkg/pb/accountabilitypb/dsl/upon.mir.go b/pkg/pb/accountabilitypb/dsl/upon.mir.go index c7c47b06f..763c3bf94 100644 --- a/pkg/pb/accountabilitypb/dsl/upon.mir.go +++ b/pkg/pb/accountabilitypb/dsl/upon.mir.go @@ -6,7 +6,6 @@ import ( dsl "github.com/filecoin-project/mir/pkg/dsl" types "github.com/filecoin-project/mir/pkg/pb/accountabilitypb/types" types1 "github.com/filecoin-project/mir/pkg/pb/eventpb/types" - types2 "github.com/filecoin-project/mir/pkg/pb/trantorpb/types" ) // Module-specific dsl functions for processing events. @@ -39,9 +38,3 @@ func UponPoMs(m dsl.Module, handler func(poms []*types.PoM) error) { return handler(ev.Poms) }) } - -func UponInstanceParams(m dsl.Module, handler func(membership *types2.Membership) error) { - UponEvent[*types.Event_InstanceParams](m, func(ev *types.InstanceParams) error { - return handler(ev.Membership) - }) -} diff --git a/pkg/pb/accountabilitypb/events/events.mir.go b/pkg/pb/accountabilitypb/events/events.mir.go index c47e51fee..a19f15a7b 100644 --- a/pkg/pb/accountabilitypb/events/events.mir.go +++ b/pkg/pb/accountabilitypb/events/events.mir.go @@ -5,7 +5,6 @@ package accountabilitypbevents import ( types2 "github.com/filecoin-project/mir/pkg/pb/accountabilitypb/types" types1 "github.com/filecoin-project/mir/pkg/pb/eventpb/types" - types3 "github.com/filecoin-project/mir/pkg/pb/trantorpb/types" types "github.com/filecoin-project/mir/pkg/types" ) @@ -53,18 +52,3 @@ func PoMs(destModule types.ModuleID, poms []*types2.PoM) *types1.Event { }, } } - -func InstanceParams(destModule types.ModuleID, membership *types3.Membership) *types1.Event { - return &types1.Event{ - DestModule: destModule, - Type: &types1.Event_Accountability{ - Accountability: &types2.Event{ - Type: &types2.Event_InstanceParams{ - InstanceParams: &types2.InstanceParams{ - Membership: membership, - }, - }, - }, - }, - } -} diff --git a/pkg/pb/accountabilitypb/oneof_interfaces.mir.go b/pkg/pb/accountabilitypb/oneof_interfaces.mir.go index ae4b4a906..0cd3a5109 100644 --- a/pkg/pb/accountabilitypb/oneof_interfaces.mir.go +++ b/pkg/pb/accountabilitypb/oneof_interfaces.mir.go @@ -21,10 +21,6 @@ func (w *Event_Poms) Unwrap() *PoMs { return w.Poms } -func (w *Event_InstanceParams) Unwrap() *InstanceParams { - return w.InstanceParams -} - type Message_Type = isMessage_Type type Message_TypeWrapper[T any] interface { diff --git a/pkg/pb/accountabilitypb/types/types.mir.go b/pkg/pb/accountabilitypb/types/types.mir.go index 464056d7a..80d8567db 100644 --- a/pkg/pb/accountabilitypb/types/types.mir.go +++ b/pkg/pb/accountabilitypb/types/types.mir.go @@ -37,8 +37,6 @@ func Event_TypeFromPb(pb accountabilitypb.Event_Type) Event_Type { return &Event_Decided{Decided: DecidedFromPb(pb.Decided)} case *accountabilitypb.Event_Poms: return &Event_Poms{Poms: PoMsFromPb(pb.Poms)} - case *accountabilitypb.Event_InstanceParams: - return &Event_InstanceParams{InstanceParams: InstanceParamsFromPb(pb.InstanceParams)} } return nil } @@ -115,30 +113,6 @@ func (*Event_Poms) MirReflect() mirreflect.Type { return mirreflect.TypeImpl{PbType_: reflectutil.TypeOf[*accountabilitypb.Event_Poms]()} } -type Event_InstanceParams struct { - InstanceParams *InstanceParams -} - -func (*Event_InstanceParams) isEvent_Type() {} - -func (w *Event_InstanceParams) Unwrap() *InstanceParams { - return w.InstanceParams -} - -func (w *Event_InstanceParams) Pb() accountabilitypb.Event_Type { - if w == nil { - return nil - } - if w.InstanceParams == nil { - return &accountabilitypb.Event_InstanceParams{} - } - return &accountabilitypb.Event_InstanceParams{InstanceParams: (w.InstanceParams).Pb()} -} - -func (*Event_InstanceParams) MirReflect() mirreflect.Type { - return mirreflect.TypeImpl{PbType_: reflectutil.TypeOf[*accountabilitypb.Event_InstanceParams]()} -} - func EventFromPb(pb *accountabilitypb.Event) *Event { if pb == nil { return nil diff --git a/protos/accountabilitypb/accountabilitypb.proto b/protos/accountabilitypb/accountabilitypb.proto index 753d5ace6..7af9e7fb6 100644 --- a/protos/accountabilitypb/accountabilitypb.proto +++ b/protos/accountabilitypb/accountabilitypb.proto @@ -18,7 +18,6 @@ message Event{ Predecided predecided = 1; Decided decided = 2; PoMs poms = 3; - InstanceParams instance_params = 4; } } @@ -83,7 +82,7 @@ message FullCertificate { } message InstanceParams { - option (mir.event) = true; + option (mir.struct) = true; trantorpb.Membership membership = 3; } From c9469132da6521c0eabf719eb454c8528fd174f5 Mon Sep 17 00:00:00 2001 From: Alejandro Ranchal-Pedrosa Date: Mon, 7 Aug 2023 17:32:25 +0200 Subject: [PATCH 07/14] Simplify Certificate use SBDeliver as entry/exit point --- .../simpleacc/accountability.go | 2 +- .../simpleacc/internal/common/common.go | 21 +- .../internal/predecisions/predecisions.go | 142 ++++- .../accountabilitypb/accountabilitypb.pb.go | 559 +++++++++--------- .../accountabilitypb.pb.mir.go | 4 +- pkg/pb/accountabilitypb/dsl/emit.mir.go | 8 - pkg/pb/accountabilitypb/dsl/messages.mir.go | 17 +- pkg/pb/accountabilitypb/dsl/upon.mir.go | 12 - pkg/pb/accountabilitypb/events/events.mir.go | 46 +- pkg/pb/accountabilitypb/msgs/msgs.mir.go | 34 +- .../accountabilitypb/oneof_interfaces.mir.go | 16 +- pkg/pb/accountabilitypb/types/types.mir.go | 236 ++++---- .../accountabilitypb/accountabilitypb.proto | 39 +- 13 files changed, 631 insertions(+), 505 deletions(-) diff --git a/pkg/accountability/simpleacc/accountability.go b/pkg/accountability/simpleacc/accountability.go index ee0e561a7..8f06a6857 100644 --- a/pkg/accountability/simpleacc/accountability.go +++ b/pkg/accountability/simpleacc/accountability.go @@ -84,7 +84,7 @@ func NewModule(mc ModuleConfig, params *ModuleParams, logger logging.Logger) (mo state := &incommon.State{ SignedPredecisions: make(map[t.NodeID]*accpbtypes.SignedPredecision), PredecisionNodeIDs: make(map[string][]t.NodeID), - SignedPredecision: nil, + LocalPredecision: nil, DecidedCertificate: nil, Predecided: false, UnsentPoMs: make([]*accpbtypes.PoM, 0), diff --git a/pkg/accountability/simpleacc/internal/common/common.go b/pkg/accountability/simpleacc/internal/common/common.go index 71a6d3e15..33777d25e 100644 --- a/pkg/accountability/simpleacc/internal/common/common.go +++ b/pkg/accountability/simpleacc/internal/common/common.go @@ -2,6 +2,7 @@ package common import ( accpbtypes "github.com/filecoin-project/mir/pkg/pb/accountabilitypb/types" + isspbtypes "github.com/filecoin-project/mir/pkg/pb/isspb/types" t "github.com/filecoin-project/mir/pkg/types" ) @@ -9,9 +10,19 @@ type State struct { SignedPredecisions map[t.NodeID]*accpbtypes.SignedPredecision // Map of received signed predicisions (including own's) with their signer as key. PredecisionNodeIDs map[string][]t.NodeID // Map of predecisions and the nodes that have signed them with the predecision as key, // used for fast verification of whether a predecision is predecided by a strong quorum. - SignedPredecision *accpbtypes.SignedPredecision // Own signed predecision. - DecidedCertificate map[t.NodeID]*accpbtypes.SignedPredecision // Locally decided certificate as a map with signer as key. - Predecided bool // Whether this process has received a predecided value from calling module. - UnsentPoMs []*accpbtypes.PoM // List of PoMs not yet sent to the application. - SentPoMs map[t.NodeID]*accpbtypes.PoM // List of PoMs already sent to the application with the signer as key. + LocalPredecision *LocalPredecision // Decision locally decided + DecidedCertificate *Certificate // Locally decided certificate (predecision and list of signatures with signers as key) + Predecided bool // Whether this process has received a predecided value from calling module. + UnsentPoMs []*accpbtypes.PoM // List of PoMs not yet sent to the application. + SentPoMs map[t.NodeID]*accpbtypes.PoM // List of PoMs already sent to the application with the signer as key. +} + +type LocalPredecision struct { + SBDeliver *isspbtypes.SBDeliver // Actual payload of the local predecision. + SignedPredecision *accpbtypes.SignedPredecision // Own signed predecision. +} + +type Certificate struct { + Decision []byte + Signatures map[t.NodeID][]byte } diff --git a/pkg/accountability/simpleacc/internal/predecisions/predecisions.go b/pkg/accountability/simpleacc/internal/predecisions/predecisions.go index 04e84471c..bf1d123b6 100644 --- a/pkg/accountability/simpleacc/internal/predecisions/predecisions.go +++ b/pkg/accountability/simpleacc/internal/predecisions/predecisions.go @@ -1,6 +1,9 @@ package predecisions import ( + isspbdsl "github.com/filecoin-project/mir/pkg/pb/isspb/dsl" + isspbtypes "github.com/filecoin-project/mir/pkg/pb/isspb/types" + tt "github.com/filecoin-project/mir/pkg/trantor/types" "reflect" "github.com/filecoin-project/mir/pkg/accountability/simpleacc/common" @@ -32,26 +35,46 @@ func IncludePredecisions( logger logging.Logger, ) { - accpbdsl.UponPredecided(m, func(data []byte) error { + // Upon predecision received, sign it and broadcast it. + isspbdsl.UponSBDeliver(m, + func(sn tt.SeqNr, data []uint8, aborted bool, leader t.NodeID, instanceId t.ModuleID) error { - if state.Predecided { - logger.Log(logging.LevelWarn, "Received Predecided event while already Predecided") - return nil - } + if state.Predecided { + logger.Log(logging.LevelWarn, "Received Predecided event while already Predecided") + return nil + } + + state.Predecided = true - state.Predecided = true + predecision := &isspbtypes.SBDeliver{ + Sn: sn, + Data: data, + Aborted: aborted, + Leader: leader, + InstanceId: instanceId, + } - // Sign predecision attaching mc.Self to prevent replay attacks. - cryptopbdsl.SignRequest(m, mc.Crypto, &cryptopbtypes.SignedData{Data: [][]byte{data, []byte(mc.Self)}}, &signRequest{data: data}) + serializedPredecision := serializePredecision(predecision) - return nil - }) + state.LocalPredecision = &incommon.LocalPredecision{ + SBDeliver: predecision, + SignedPredecision: &accpbtypes.SignedPredecision{ + Predecision: serializedPredecision, + }, + } + + // Sign predecision attaching mc.Self to prevent replay attacks. + cryptopbdsl.SignRequest(m, + mc.Crypto, + &cryptopbtypes.SignedData{ + Data: [][]byte{serializedPredecision}}, + &signRequest{data: serializedPredecision}) + + return nil + }) cryptopbdsl.UponSignResult(m, func(signature []byte, sr *signRequest) error { - state.SignedPredecision = &accpbtypes.SignedPredecision{ - Predecision: sr.data, - Signature: signature, - } + state.LocalPredecision.SignedPredecision.Signature = signature // Broadcast signed predecision to all participants (including oneself). transportpbdsl.SendMessage(m, mc.Net, accpbmsgs.SignedPredecision(mc.Self, sr.data, signature), maputil.GetKeys(params.Membership.Nodes)) @@ -134,16 +157,25 @@ func ApplySigVerified( // Once verified, if strong quorum, broadcast accpbdsl.FullCertificate. if state.DecidedCertificate == nil && membutil.HaveStrongQuorum(params.Membership, state.PredecisionNodeIDs[string(sp.Predecision)]) { - state.DecidedCertificate = maputil.Filter( - state.SignedPredecisions, - func( - nodeId t.NodeID, - predecision *accpbtypes.SignedPredecision, - ) bool { - return reflect.DeepEqual(predecision.Predecision, sp.Predecision) - }) + state.DecidedCertificate = &incommon.Certificate{ + Decision: sp.Predecision, + Signatures: maputil.Transform( + maputil.Filter( + state.SignedPredecisions, + func( + nodeId t.NodeID, + predecision *accpbtypes.SignedPredecision, + ) bool { + return reflect.DeepEqual(predecision.Predecision, sp.Predecision) + }), + func(nodeID t.NodeID, sp *accpbtypes.SignedPredecision) (t.NodeID, []byte) { + return nodeID, sp.Signature + }, + ), + } - accpbdsl.Decided(m, mc.App, sp.Predecision) + // Now decision is not just the bytes, need to retrieve actual decision. + decide(m, mc, state, sp.Predecision) if params.LightCertificates { transportpbdsl.SendMessage( @@ -157,10 +189,72 @@ func ApplySigVerified( m, mc.Net, accpbmsgs.FullCertificate(mc.Self, - state.DecidedCertificate), + state.DecidedCertificate.Decision, + state.DecidedCertificate.Signatures), maputil.GetKeys(params.Membership.Nodes)) } } + + accpbdsl.UponRequestSBMessageReceived(m, func(from t.NodeID, predecision []byte) error { + if reflect.DeepEqual(predecision, state.LocalPredecision.SignedPredecision.Predecision) { + transportpbdsl.SendMessage(m, + mc.Net, + accpbmsgs.ProvideSBMessage(mc.Self, state.LocalPredecision.SBDeliver), + []t.NodeID{from}) + } + return nil + }) + + accpbdsl.UponProvideSBMessageReceived(m, func(from t.NodeID, sbDeliver *isspbtypes.SBDeliver) error { + if state.DecidedCertificate == nil { + logger.Log(logging.LevelDebug, "Ignoring received SBDeliver message from node %v, no local decision yet", from) + return nil + } + + if reflect.DeepEqual(state.DecidedCertificate.Decision, serializePredecision(sbDeliver)) { + finishWithDecision(m, mc, sbDeliver) + } + + return nil + }) +} + +func decide(m dsl.Module, mc *common.ModuleConfig, state *incommon.State, predecision []byte) { + // Retrieve actual decision. + if reflect.DeepEqual(predecision, state.LocalPredecision.SignedPredecision.Predecision) { + sb := state.LocalPredecision.SBDeliver // convenience variable. + finishWithDecision(m, mc, sb) + return + } + + // Find the actual predecision from other nodes + transportpbdsl.SendMessage( + m, + mc.Net, + accpbmsgs.RequestSBMessage(mc.Self, + predecision), + state.PredecisionNodeIDs[string(predecision)]) + +} + +func finishWithDecision(m dsl.Module, mc *common.ModuleConfig, sb *isspbtypes.SBDeliver) { + isspbdsl.SBDeliver(m, mc.App, sb.Sn, sb.Data, sb.Aborted, sb.Leader, sb.InstanceId) +} + +func serializePredecision(sbDeliver *isspbtypes.SBDeliver) []byte { + b := make([]byte, 0) + b = append(b, sbDeliver.Sn.Bytes()...) + b = append(b, sbDeliver.Data...) + + abortedByte := uint8(0) + if sbDeliver.Aborted { + abortedByte = uint8(1) + } + + b = append(b, abortedByte) + b = append(b, sbDeliver.Leader...) + b = append(b, sbDeliver.InstanceId...) + return b } type signRequest struct { diff --git a/pkg/pb/accountabilitypb/accountabilitypb.pb.go b/pkg/pb/accountabilitypb/accountabilitypb.pb.go index 49284aff0..786fc581d 100644 --- a/pkg/pb/accountabilitypb/accountabilitypb.pb.go +++ b/pkg/pb/accountabilitypb/accountabilitypb.pb.go @@ -7,6 +7,7 @@ package accountabilitypb import ( + isspb "github.com/filecoin-project/mir/pkg/pb/isspb" _ "github.com/filecoin-project/mir/pkg/pb/mir" _ "github.com/filecoin-project/mir/pkg/pb/net" trantorpb "github.com/filecoin-project/mir/pkg/pb/trantorpb" @@ -29,8 +30,6 @@ type Event struct { unknownFields protoimpl.UnknownFields // Types that are assignable to Type: - // *Event_Predecided - // *Event_Decided // *Event_Poms Type isEvent_Type `protobuf_oneof:"type"` } @@ -74,20 +73,6 @@ func (m *Event) GetType() isEvent_Type { return nil } -func (x *Event) GetPredecided() *Predecided { - if x, ok := x.GetType().(*Event_Predecided); ok { - return x.Predecided - } - return nil -} - -func (x *Event) GetDecided() *Decided { - if x, ok := x.GetType().(*Event_Decided); ok { - return x.Decided - } - return nil -} - func (x *Event) GetPoms() *PoMs { if x, ok := x.GetType().(*Event_Poms); ok { return x.Poms @@ -99,118 +84,12 @@ type isEvent_Type interface { isEvent_Type() } -type Event_Predecided struct { - Predecided *Predecided `protobuf:"bytes,1,opt,name=predecided,proto3,oneof"` -} - -type Event_Decided struct { - Decided *Decided `protobuf:"bytes,2,opt,name=decided,proto3,oneof"` -} - type Event_Poms struct { Poms *PoMs `protobuf:"bytes,3,opt,name=poms,proto3,oneof"` } -func (*Event_Predecided) isEvent_Type() {} - -func (*Event_Decided) isEvent_Type() {} - func (*Event_Poms) isEvent_Type() {} -type Predecided struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` -} - -func (x *Predecided) Reset() { - *x = Predecided{} - if protoimpl.UnsafeEnabled { - mi := &file_accountabilitypb_accountabilitypb_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Predecided) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Predecided) ProtoMessage() {} - -func (x *Predecided) ProtoReflect() protoreflect.Message { - mi := &file_accountabilitypb_accountabilitypb_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Predecided.ProtoReflect.Descriptor instead. -func (*Predecided) Descriptor() ([]byte, []int) { - return file_accountabilitypb_accountabilitypb_proto_rawDescGZIP(), []int{1} -} - -func (x *Predecided) GetData() []byte { - if x != nil { - return x.Data - } - return nil -} - -type Decided struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` -} - -func (x *Decided) Reset() { - *x = Decided{} - if protoimpl.UnsafeEnabled { - mi := &file_accountabilitypb_accountabilitypb_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Decided) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Decided) ProtoMessage() {} - -func (x *Decided) ProtoReflect() protoreflect.Message { - mi := &file_accountabilitypb_accountabilitypb_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Decided.ProtoReflect.Descriptor instead. -func (*Decided) Descriptor() ([]byte, []int) { - return file_accountabilitypb_accountabilitypb_proto_rawDescGZIP(), []int{2} -} - -func (x *Decided) GetData() []byte { - if x != nil { - return x.Data - } - return nil -} - type PoM struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -224,7 +103,7 @@ type PoM struct { func (x *PoM) Reset() { *x = PoM{} if protoimpl.UnsafeEnabled { - mi := &file_accountabilitypb_accountabilitypb_proto_msgTypes[3] + mi := &file_accountabilitypb_accountabilitypb_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -237,7 +116,7 @@ func (x *PoM) String() string { func (*PoM) ProtoMessage() {} func (x *PoM) ProtoReflect() protoreflect.Message { - mi := &file_accountabilitypb_accountabilitypb_proto_msgTypes[3] + mi := &file_accountabilitypb_accountabilitypb_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -250,7 +129,7 @@ func (x *PoM) ProtoReflect() protoreflect.Message { // Deprecated: Use PoM.ProtoReflect.Descriptor instead. func (*PoM) Descriptor() ([]byte, []int) { - return file_accountabilitypb_accountabilitypb_proto_rawDescGZIP(), []int{3} + return file_accountabilitypb_accountabilitypb_proto_rawDescGZIP(), []int{1} } func (x *PoM) GetNodeId() string { @@ -285,7 +164,7 @@ type LightCertificate struct { func (x *LightCertificate) Reset() { *x = LightCertificate{} if protoimpl.UnsafeEnabled { - mi := &file_accountabilitypb_accountabilitypb_proto_msgTypes[4] + mi := &file_accountabilitypb_accountabilitypb_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -298,7 +177,7 @@ func (x *LightCertificate) String() string { func (*LightCertificate) ProtoMessage() {} func (x *LightCertificate) ProtoReflect() protoreflect.Message { - mi := &file_accountabilitypb_accountabilitypb_proto_msgTypes[4] + mi := &file_accountabilitypb_accountabilitypb_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -311,7 +190,7 @@ func (x *LightCertificate) ProtoReflect() protoreflect.Message { // Deprecated: Use LightCertificate.ProtoReflect.Descriptor instead. func (*LightCertificate) Descriptor() ([]byte, []int) { - return file_accountabilitypb_accountabilitypb_proto_rawDescGZIP(), []int{4} + return file_accountabilitypb_accountabilitypb_proto_rawDescGZIP(), []int{2} } func (x *LightCertificate) GetData() []byte { @@ -332,7 +211,7 @@ type PoMs struct { func (x *PoMs) Reset() { *x = PoMs{} if protoimpl.UnsafeEnabled { - mi := &file_accountabilitypb_accountabilitypb_proto_msgTypes[5] + mi := &file_accountabilitypb_accountabilitypb_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -345,7 +224,7 @@ func (x *PoMs) String() string { func (*PoMs) ProtoMessage() {} func (x *PoMs) ProtoReflect() protoreflect.Message { - mi := &file_accountabilitypb_accountabilitypb_proto_msgTypes[5] + mi := &file_accountabilitypb_accountabilitypb_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -358,7 +237,7 @@ func (x *PoMs) ProtoReflect() protoreflect.Message { // Deprecated: Use PoMs.ProtoReflect.Descriptor instead. func (*PoMs) Descriptor() ([]byte, []int) { - return file_accountabilitypb_accountabilitypb_proto_rawDescGZIP(), []int{5} + return file_accountabilitypb_accountabilitypb_proto_rawDescGZIP(), []int{3} } func (x *PoMs) GetPoms() []*PoM { @@ -378,13 +257,15 @@ type Message struct { // *Message_Certificate // *Message_Poms // *Message_LightCertificate + // *Message_RequestSbMessage + // *Message_ProvideSbMessage Type isMessage_Type `protobuf_oneof:"type"` } func (x *Message) Reset() { *x = Message{} if protoimpl.UnsafeEnabled { - mi := &file_accountabilitypb_accountabilitypb_proto_msgTypes[6] + mi := &file_accountabilitypb_accountabilitypb_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -397,7 +278,7 @@ func (x *Message) String() string { func (*Message) ProtoMessage() {} func (x *Message) ProtoReflect() protoreflect.Message { - mi := &file_accountabilitypb_accountabilitypb_proto_msgTypes[6] + mi := &file_accountabilitypb_accountabilitypb_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -410,7 +291,7 @@ func (x *Message) ProtoReflect() protoreflect.Message { // Deprecated: Use Message.ProtoReflect.Descriptor instead. func (*Message) Descriptor() ([]byte, []int) { - return file_accountabilitypb_accountabilitypb_proto_rawDescGZIP(), []int{6} + return file_accountabilitypb_accountabilitypb_proto_rawDescGZIP(), []int{4} } func (m *Message) GetType() isMessage_Type { @@ -448,6 +329,20 @@ func (x *Message) GetLightCertificate() *LightCertificate { return nil } +func (x *Message) GetRequestSbMessage() *RequestSBMessage { + if x, ok := x.GetType().(*Message_RequestSbMessage); ok { + return x.RequestSbMessage + } + return nil +} + +func (x *Message) GetProvideSbMessage() *ProvideSBMessage { + if x, ok := x.GetType().(*Message_ProvideSbMessage); ok { + return x.ProvideSbMessage + } + return nil +} + type isMessage_Type interface { isMessage_Type() } @@ -468,6 +363,14 @@ type Message_LightCertificate struct { LightCertificate *LightCertificate `protobuf:"bytes,4,opt,name=light_certificate,json=lightCertificate,proto3,oneof"` } +type Message_RequestSbMessage struct { + RequestSbMessage *RequestSBMessage `protobuf:"bytes,5,opt,name=request_sb_message,json=requestSbMessage,proto3,oneof"` +} + +type Message_ProvideSbMessage struct { + ProvideSbMessage *ProvideSBMessage `protobuf:"bytes,6,opt,name=provide_sb_message,json=provideSbMessage,proto3,oneof"` +} + func (*Message_SignedPredecision) isMessage_Type() {} func (*Message_Certificate) isMessage_Type() {} @@ -476,6 +379,10 @@ func (*Message_Poms) isMessage_Type() {} func (*Message_LightCertificate) isMessage_Type() {} +func (*Message_RequestSbMessage) isMessage_Type() {} + +func (*Message_ProvideSbMessage) isMessage_Type() {} + type SignedPredecision struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -488,7 +395,7 @@ type SignedPredecision struct { func (x *SignedPredecision) Reset() { *x = SignedPredecision{} if protoimpl.UnsafeEnabled { - mi := &file_accountabilitypb_accountabilitypb_proto_msgTypes[7] + mi := &file_accountabilitypb_accountabilitypb_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -501,7 +408,7 @@ func (x *SignedPredecision) String() string { func (*SignedPredecision) ProtoMessage() {} func (x *SignedPredecision) ProtoReflect() protoreflect.Message { - mi := &file_accountabilitypb_accountabilitypb_proto_msgTypes[7] + mi := &file_accountabilitypb_accountabilitypb_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -514,7 +421,7 @@ func (x *SignedPredecision) ProtoReflect() protoreflect.Message { // Deprecated: Use SignedPredecision.ProtoReflect.Descriptor instead. func (*SignedPredecision) Descriptor() ([]byte, []int) { - return file_accountabilitypb_accountabilitypb_proto_rawDescGZIP(), []int{7} + return file_accountabilitypb_accountabilitypb_proto_rawDescGZIP(), []int{5} } func (x *SignedPredecision) GetPredecision() []byte { @@ -536,13 +443,14 @@ type FullCertificate struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Certificate map[string]*SignedPredecision `protobuf:"bytes,1,rep,name=certificate,proto3" json:"certificate,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Decision []byte `protobuf:"bytes,1,opt,name=decision,proto3" json:"decision,omitempty"` + Certificate map[string][]byte `protobuf:"bytes,2,rep,name=certificate,proto3" json:"certificate,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } func (x *FullCertificate) Reset() { *x = FullCertificate{} if protoimpl.UnsafeEnabled { - mi := &file_accountabilitypb_accountabilitypb_proto_msgTypes[8] + mi := &file_accountabilitypb_accountabilitypb_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -555,7 +463,7 @@ func (x *FullCertificate) String() string { func (*FullCertificate) ProtoMessage() {} func (x *FullCertificate) ProtoReflect() protoreflect.Message { - mi := &file_accountabilitypb_accountabilitypb_proto_msgTypes[8] + mi := &file_accountabilitypb_accountabilitypb_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -568,10 +476,17 @@ func (x *FullCertificate) ProtoReflect() protoreflect.Message { // Deprecated: Use FullCertificate.ProtoReflect.Descriptor instead. func (*FullCertificate) Descriptor() ([]byte, []int) { - return file_accountabilitypb_accountabilitypb_proto_rawDescGZIP(), []int{8} + return file_accountabilitypb_accountabilitypb_proto_rawDescGZIP(), []int{6} } -func (x *FullCertificate) GetCertificate() map[string]*SignedPredecision { +func (x *FullCertificate) GetDecision() []byte { + if x != nil { + return x.Decision + } + return nil +} + +func (x *FullCertificate) GetCertificate() map[string][]byte { if x != nil { return x.Certificate } @@ -589,7 +504,7 @@ type InstanceParams struct { func (x *InstanceParams) Reset() { *x = InstanceParams{} if protoimpl.UnsafeEnabled { - mi := &file_accountabilitypb_accountabilitypb_proto_msgTypes[9] + mi := &file_accountabilitypb_accountabilitypb_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -602,7 +517,7 @@ func (x *InstanceParams) String() string { func (*InstanceParams) ProtoMessage() {} func (x *InstanceParams) ProtoReflect() protoreflect.Message { - mi := &file_accountabilitypb_accountabilitypb_proto_msgTypes[9] + mi := &file_accountabilitypb_accountabilitypb_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -615,7 +530,7 @@ func (x *InstanceParams) ProtoReflect() protoreflect.Message { // Deprecated: Use InstanceParams.ProtoReflect.Descriptor instead. func (*InstanceParams) Descriptor() ([]byte, []int) { - return file_accountabilitypb_accountabilitypb_proto_rawDescGZIP(), []int{9} + return file_accountabilitypb_accountabilitypb_proto_rawDescGZIP(), []int{7} } func (x *InstanceParams) GetMembership() *trantorpb.Membership { @@ -625,6 +540,100 @@ func (x *InstanceParams) GetMembership() *trantorpb.Membership { return nil } +type RequestSBMessage struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Predecision []byte `protobuf:"bytes,1,opt,name=predecision,proto3" json:"predecision,omitempty"` +} + +func (x *RequestSBMessage) Reset() { + *x = RequestSBMessage{} + if protoimpl.UnsafeEnabled { + mi := &file_accountabilitypb_accountabilitypb_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RequestSBMessage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RequestSBMessage) ProtoMessage() {} + +func (x *RequestSBMessage) ProtoReflect() protoreflect.Message { + mi := &file_accountabilitypb_accountabilitypb_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RequestSBMessage.ProtoReflect.Descriptor instead. +func (*RequestSBMessage) Descriptor() ([]byte, []int) { + return file_accountabilitypb_accountabilitypb_proto_rawDescGZIP(), []int{8} +} + +func (x *RequestSBMessage) GetPredecision() []byte { + if x != nil { + return x.Predecision + } + return nil +} + +type ProvideSBMessage struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SbDeliver *isspb.SBDeliver `protobuf:"bytes,1,opt,name=sb_deliver,json=sbDeliver,proto3" json:"sb_deliver,omitempty"` +} + +func (x *ProvideSBMessage) Reset() { + *x = ProvideSBMessage{} + if protoimpl.UnsafeEnabled { + mi := &file_accountabilitypb_accountabilitypb_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ProvideSBMessage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ProvideSBMessage) ProtoMessage() {} + +func (x *ProvideSBMessage) ProtoReflect() protoreflect.Message { + mi := &file_accountabilitypb_accountabilitypb_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ProvideSBMessage.ProtoReflect.Descriptor instead. +func (*ProvideSBMessage) Descriptor() ([]byte, []int) { + return file_accountabilitypb_accountabilitypb_proto_rawDescGZIP(), []int{9} +} + +func (x *ProvideSBMessage) GetSbDeliver() *isspb.SBDeliver { + if x != nil { + return x.SbDeliver + } + return nil +} + var File_accountabilitypb_accountabilitypb_proto protoreflect.FileDescriptor var file_accountabilitypb_accountabilitypb_proto_rawDesc = []byte{ @@ -633,102 +642,109 @@ var file_accountabilitypb_accountabilitypb_proto_rawDesc = []byte{ 0x79, 0x70, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x10, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x70, 0x62, 0x1a, 0x19, 0x74, 0x72, 0x61, 0x6e, 0x74, 0x6f, 0x72, 0x70, 0x62, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x74, 0x6f, 0x72, 0x70, 0x62, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x6e, 0x65, 0x74, 0x2f, 0x63, 0x6f, 0x64, 0x65, - 0x67, 0x65, 0x6e, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x6d, 0x69, 0x72, 0x2f, 0x63, 0x6f, 0x64, 0x65, 0x67, 0x65, - 0x6e, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x22, 0xc0, 0x01, 0x0a, 0x05, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x3e, 0x0a, 0x0a, - 0x70, 0x72, 0x65, 0x64, 0x65, 0x63, 0x69, 0x64, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1c, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, - 0x79, 0x70, 0x62, 0x2e, 0x50, 0x72, 0x65, 0x64, 0x65, 0x63, 0x69, 0x64, 0x65, 0x64, 0x48, 0x00, - 0x52, 0x0a, 0x70, 0x72, 0x65, 0x64, 0x65, 0x63, 0x69, 0x64, 0x65, 0x64, 0x12, 0x35, 0x0a, 0x07, - 0x64, 0x65, 0x63, 0x69, 0x64, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, - 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x70, 0x62, - 0x2e, 0x44, 0x65, 0x63, 0x69, 0x64, 0x65, 0x64, 0x48, 0x00, 0x52, 0x07, 0x64, 0x65, 0x63, 0x69, - 0x64, 0x65, 0x64, 0x12, 0x2c, 0x0a, 0x04, 0x70, 0x6f, 0x6d, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x11, 0x69, 0x73, 0x73, 0x70, 0x62, 0x2f, 0x69, 0x73, + 0x73, 0x70, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x6e, 0x65, 0x74, 0x2f, 0x63, + 0x6f, 0x64, 0x65, 0x67, 0x65, 0x6e, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x6d, 0x69, 0x72, 0x2f, 0x63, 0x6f, 0x64, + 0x65, 0x67, 0x65, 0x6e, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x49, 0x0a, 0x05, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x2c, + 0x0a, 0x04, 0x70, 0x6f, 0x6d, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x61, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x70, 0x62, 0x2e, + 0x50, 0x6f, 0x4d, 0x73, 0x48, 0x00, 0x52, 0x04, 0x70, 0x6f, 0x6d, 0x73, 0x3a, 0x04, 0x90, 0xa6, + 0x1d, 0x01, 0x42, 0x0c, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x04, 0x80, 0xa6, 0x1d, 0x01, + 0x22, 0xfc, 0x01, 0x0a, 0x03, 0x50, 0x6f, 0x4d, 0x12, 0x4d, 0x0a, 0x07, 0x6e, 0x6f, 0x64, 0x65, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x34, 0x82, 0xa6, 0x1d, 0x30, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x63, 0x6f, + 0x69, 0x6e, 0x2d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x6d, 0x69, 0x72, 0x2f, 0x70, + 0x6b, 0x67, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x44, 0x52, + 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x4f, 0x0a, 0x11, 0x63, 0x6f, 0x6e, 0x66, 0x6c, + 0x69, 0x63, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x6d, 0x73, 0x67, 0x5f, 0x31, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x62, 0x69, 0x6c, + 0x69, 0x74, 0x79, 0x70, 0x62, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x50, 0x72, 0x65, 0x64, + 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, + 0x74, 0x69, 0x6e, 0x67, 0x4d, 0x73, 0x67, 0x31, 0x12, 0x4f, 0x0a, 0x11, 0x63, 0x6f, 0x6e, 0x66, + 0x6c, 0x69, 0x63, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x6d, 0x73, 0x67, 0x5f, 0x32, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x62, 0x69, + 0x6c, 0x69, 0x74, 0x79, 0x70, 0x62, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x50, 0x72, 0x65, + 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x66, 0x6c, 0x69, + 0x63, 0x74, 0x69, 0x6e, 0x67, 0x4d, 0x73, 0x67, 0x32, 0x3a, 0x04, 0x80, 0xa6, 0x1d, 0x01, 0x22, + 0x2c, 0x0a, 0x10, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, + 0x61, 0x74, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x3a, 0x04, 0xd0, 0xe4, 0x1d, 0x01, 0x22, 0x3b, 0x0a, + 0x04, 0x50, 0x6f, 0x4d, 0x73, 0x12, 0x29, 0x0a, 0x04, 0x70, 0x6f, 0x6d, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x62, 0x69, + 0x6c, 0x69, 0x74, 0x79, 0x70, 0x62, 0x2e, 0x50, 0x6f, 0x4d, 0x52, 0x04, 0x70, 0x6f, 0x6d, 0x73, + 0x3a, 0x08, 0x98, 0xa6, 0x1d, 0x01, 0xd0, 0xe4, 0x1d, 0x01, 0x22, 0xe3, 0x03, 0x0a, 0x07, 0x4d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x54, 0x0a, 0x12, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, + 0x5f, 0x70, 0x72, 0x65, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x62, 0x69, 0x6c, + 0x69, 0x74, 0x79, 0x70, 0x62, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x50, 0x72, 0x65, 0x64, + 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x11, 0x73, 0x69, 0x67, 0x6e, 0x65, + 0x64, 0x50, 0x72, 0x65, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x45, 0x0a, 0x0b, + 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x21, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x62, 0x69, 0x6c, 0x69, + 0x74, 0x79, 0x70, 0x62, 0x2e, 0x46, 0x75, 0x6c, 0x6c, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, + 0x63, 0x61, 0x74, 0x65, 0x48, 0x00, 0x52, 0x0b, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, + 0x61, 0x74, 0x65, 0x12, 0x2c, 0x0a, 0x04, 0x70, 0x6f, 0x6d, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x70, 0x62, 0x2e, 0x50, 0x6f, 0x4d, 0x73, 0x48, 0x00, 0x52, 0x04, 0x70, 0x6f, 0x6d, - 0x73, 0x3a, 0x04, 0x90, 0xa6, 0x1d, 0x01, 0x42, 0x0c, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, - 0x04, 0x80, 0xa6, 0x1d, 0x01, 0x22, 0x26, 0x0a, 0x0a, 0x50, 0x72, 0x65, 0x64, 0x65, 0x63, 0x69, - 0x64, 0x65, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x3a, 0x04, 0x98, 0xa6, 0x1d, 0x01, 0x22, 0x23, 0x0a, - 0x07, 0x44, 0x65, 0x63, 0x69, 0x64, 0x65, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x3a, 0x04, 0x98, 0xa6, - 0x1d, 0x01, 0x22, 0xfc, 0x01, 0x0a, 0x03, 0x50, 0x6f, 0x4d, 0x12, 0x4d, 0x0a, 0x07, 0x6e, 0x6f, - 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x34, 0x82, 0xa6, 0x1d, - 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x66, 0x69, 0x6c, 0x65, - 0x63, 0x6f, 0x69, 0x6e, 0x2d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x6d, 0x69, 0x72, - 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x49, - 0x44, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x4f, 0x0a, 0x11, 0x63, 0x6f, 0x6e, - 0x66, 0x6c, 0x69, 0x63, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x6d, 0x73, 0x67, 0x5f, 0x31, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x62, - 0x69, 0x6c, 0x69, 0x74, 0x79, 0x70, 0x62, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x50, 0x72, - 0x65, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x66, 0x6c, - 0x69, 0x63, 0x74, 0x69, 0x6e, 0x67, 0x4d, 0x73, 0x67, 0x31, 0x12, 0x4f, 0x0a, 0x11, 0x63, 0x6f, - 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x6d, 0x73, 0x67, 0x5f, 0x32, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, - 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x70, 0x62, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x50, - 0x72, 0x65, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x66, - 0x6c, 0x69, 0x63, 0x74, 0x69, 0x6e, 0x67, 0x4d, 0x73, 0x67, 0x32, 0x3a, 0x04, 0x80, 0xa6, 0x1d, - 0x01, 0x22, 0x2c, 0x0a, 0x10, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, - 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x3a, 0x04, 0xd0, 0xe4, 0x1d, 0x01, 0x22, - 0x3b, 0x0a, 0x04, 0x50, 0x6f, 0x4d, 0x73, 0x12, 0x29, 0x0a, 0x04, 0x70, 0x6f, 0x6d, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, - 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x70, 0x62, 0x2e, 0x50, 0x6f, 0x4d, 0x52, 0x04, 0x70, 0x6f, - 0x6d, 0x73, 0x3a, 0x08, 0x98, 0xa6, 0x1d, 0x01, 0xd0, 0xe4, 0x1d, 0x01, 0x22, 0xbb, 0x02, 0x0a, - 0x07, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x54, 0x0a, 0x12, 0x73, 0x69, 0x67, 0x6e, - 0x65, 0x64, 0x5f, 0x70, 0x72, 0x65, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x62, - 0x69, 0x6c, 0x69, 0x74, 0x79, 0x70, 0x62, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x50, 0x72, - 0x65, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x11, 0x73, 0x69, 0x67, - 0x6e, 0x65, 0x64, 0x50, 0x72, 0x65, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x45, - 0x0a, 0x0b, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x62, 0x69, - 0x6c, 0x69, 0x74, 0x79, 0x70, 0x62, 0x2e, 0x46, 0x75, 0x6c, 0x6c, 0x43, 0x65, 0x72, 0x74, 0x69, - 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x48, 0x00, 0x52, 0x0b, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, - 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x2c, 0x0a, 0x04, 0x70, 0x6f, 0x6d, 0x73, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x62, 0x69, - 0x6c, 0x69, 0x74, 0x79, 0x70, 0x62, 0x2e, 0x50, 0x6f, 0x4d, 0x73, 0x48, 0x00, 0x52, 0x04, 0x70, - 0x6f, 0x6d, 0x73, 0x12, 0x51, 0x0a, 0x11, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x5f, 0x63, 0x65, 0x72, - 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, - 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x70, - 0x62, 0x2e, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, - 0x74, 0x65, 0x48, 0x00, 0x52, 0x10, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x43, 0x65, 0x72, 0x74, 0x69, - 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x3a, 0x04, 0xc8, 0xe4, 0x1d, 0x01, 0x42, 0x0c, 0x0a, 0x04, - 0x74, 0x79, 0x70, 0x65, 0x12, 0x04, 0xc8, 0xe4, 0x1d, 0x01, 0x22, 0x5d, 0x0a, 0x11, 0x53, 0x69, - 0x67, 0x6e, 0x65, 0x64, 0x50, 0x72, 0x65, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, - 0x20, 0x0a, 0x0b, 0x70, 0x72, 0x65, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x70, 0x72, 0x65, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, - 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x3a, - 0x08, 0xd0, 0xe4, 0x1d, 0x01, 0x80, 0xa6, 0x1d, 0x01, 0x22, 0x89, 0x02, 0x0a, 0x0f, 0x46, 0x75, - 0x6c, 0x6c, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x8a, 0x01, - 0x0a, 0x0b, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x62, 0x69, - 0x6c, 0x69, 0x74, 0x79, 0x70, 0x62, 0x2e, 0x46, 0x75, 0x6c, 0x6c, 0x43, 0x65, 0x72, 0x74, 0x69, - 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x2e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, - 0x74, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x34, 0xaa, 0xa6, 0x1d, 0x30, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x63, 0x6f, 0x69, 0x6e, - 0x2d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x6d, 0x69, 0x72, 0x2f, 0x70, 0x6b, 0x67, - 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x44, 0x52, 0x0b, 0x63, - 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x1a, 0x63, 0x0a, 0x10, 0x43, 0x65, - 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, - 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, - 0x12, 0x39, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x23, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, - 0x70, 0x62, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x50, 0x72, 0x65, 0x64, 0x65, 0x63, 0x69, - 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, - 0x04, 0xd0, 0xe4, 0x1d, 0x01, 0x22, 0x4d, 0x0a, 0x0e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, - 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x35, 0x0a, 0x0a, 0x6d, 0x65, 0x6d, 0x62, 0x65, - 0x72, 0x73, 0x68, 0x69, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x72, - 0x61, 0x6e, 0x74, 0x6f, 0x72, 0x70, 0x62, 0x2e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, - 0x69, 0x70, 0x52, 0x0a, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x3a, 0x04, - 0x80, 0xa6, 0x1d, 0x01, 0x42, 0x39, 0x5a, 0x37, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x63, 0x6f, 0x69, 0x6e, 0x2d, 0x70, 0x72, 0x6f, 0x6a, - 0x65, 0x63, 0x74, 0x2f, 0x6d, 0x69, 0x72, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x62, 0x2f, 0x61, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x70, 0x62, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x73, 0x12, 0x51, 0x0a, 0x11, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, + 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x61, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x70, 0x62, 0x2e, + 0x4c, 0x69, 0x67, 0x68, 0x74, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, + 0x48, 0x00, 0x52, 0x10, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, + 0x63, 0x61, 0x74, 0x65, 0x12, 0x52, 0x0a, 0x12, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, + 0x73, 0x62, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x22, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, + 0x79, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x53, 0x42, 0x4d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x48, 0x00, 0x52, 0x10, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x53, + 0x62, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x52, 0x0a, 0x12, 0x70, 0x72, 0x6f, 0x76, + 0x69, 0x64, 0x65, 0x5f, 0x73, 0x62, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x62, + 0x69, 0x6c, 0x69, 0x74, 0x79, 0x70, 0x62, 0x2e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x53, + 0x42, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x48, 0x00, 0x52, 0x10, 0x70, 0x72, 0x6f, 0x76, + 0x69, 0x64, 0x65, 0x53, 0x62, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x3a, 0x04, 0xc8, 0xe4, + 0x1d, 0x01, 0x42, 0x0c, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x04, 0xc8, 0xe4, 0x1d, 0x01, + 0x22, 0x5d, 0x0a, 0x11, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x50, 0x72, 0x65, 0x64, 0x65, 0x63, + 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x72, 0x65, 0x64, 0x65, 0x63, 0x69, + 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x70, 0x72, 0x65, 0x64, + 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, + 0x61, 0x74, 0x75, 0x72, 0x65, 0x3a, 0x08, 0xd0, 0xe4, 0x1d, 0x01, 0x80, 0xa6, 0x1d, 0x01, 0x22, + 0x80, 0x02, 0x0a, 0x0f, 0x46, 0x75, 0x6c, 0x6c, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, + 0x61, 0x74, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, + 0x8a, 0x01, 0x0a, 0x0b, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, + 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x70, 0x62, 0x2e, 0x46, 0x75, 0x6c, 0x6c, 0x43, 0x65, 0x72, + 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x2e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, + 0x63, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x34, 0xaa, 0xa6, 0x1d, 0x30, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x63, 0x6f, + 0x69, 0x6e, 0x2d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x6d, 0x69, 0x72, 0x2f, 0x70, + 0x6b, 0x67, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x44, 0x52, + 0x0b, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x1a, 0x3e, 0x0a, 0x10, + 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, + 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x04, 0xd0, 0xe4, + 0x1d, 0x01, 0x22, 0x4d, 0x0a, 0x0e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x50, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x12, 0x35, 0x0a, 0x0a, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, + 0x69, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x74, + 0x6f, 0x72, 0x70, 0x62, 0x2e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x52, + 0x0a, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x3a, 0x04, 0x80, 0xa6, 0x1d, + 0x01, 0x22, 0x3a, 0x0a, 0x10, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x53, 0x42, 0x4d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x72, 0x65, 0x64, 0x65, 0x63, 0x69, + 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x70, 0x72, 0x65, 0x64, + 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x3a, 0x04, 0xd0, 0xe4, 0x1d, 0x01, 0x22, 0x49, 0x0a, + 0x10, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x53, 0x42, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x12, 0x2f, 0x0a, 0x0a, 0x73, 0x62, 0x5f, 0x64, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x69, 0x73, 0x73, 0x70, 0x62, 0x2e, 0x53, 0x42, + 0x44, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x52, 0x09, 0x73, 0x62, 0x44, 0x65, 0x6c, 0x69, 0x76, + 0x65, 0x72, 0x3a, 0x04, 0xd0, 0xe4, 0x1d, 0x01, 0x42, 0x39, 0x5a, 0x37, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x63, 0x6f, 0x69, 0x6e, 0x2d, + 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x6d, 0x69, 0x72, 0x2f, 0x70, 0x6b, 0x67, 0x2f, + 0x70, 0x62, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, + 0x79, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -746,32 +762,33 @@ func file_accountabilitypb_accountabilitypb_proto_rawDescGZIP() []byte { var file_accountabilitypb_accountabilitypb_proto_msgTypes = make([]protoimpl.MessageInfo, 11) var file_accountabilitypb_accountabilitypb_proto_goTypes = []interface{}{ (*Event)(nil), // 0: accountabilitypb.Event - (*Predecided)(nil), // 1: accountabilitypb.Predecided - (*Decided)(nil), // 2: accountabilitypb.Decided - (*PoM)(nil), // 3: accountabilitypb.PoM - (*LightCertificate)(nil), // 4: accountabilitypb.LightCertificate - (*PoMs)(nil), // 5: accountabilitypb.PoMs - (*Message)(nil), // 6: accountabilitypb.Message - (*SignedPredecision)(nil), // 7: accountabilitypb.SignedPredecision - (*FullCertificate)(nil), // 8: accountabilitypb.FullCertificate - (*InstanceParams)(nil), // 9: accountabilitypb.InstanceParams + (*PoM)(nil), // 1: accountabilitypb.PoM + (*LightCertificate)(nil), // 2: accountabilitypb.LightCertificate + (*PoMs)(nil), // 3: accountabilitypb.PoMs + (*Message)(nil), // 4: accountabilitypb.Message + (*SignedPredecision)(nil), // 5: accountabilitypb.SignedPredecision + (*FullCertificate)(nil), // 6: accountabilitypb.FullCertificate + (*InstanceParams)(nil), // 7: accountabilitypb.InstanceParams + (*RequestSBMessage)(nil), // 8: accountabilitypb.RequestSBMessage + (*ProvideSBMessage)(nil), // 9: accountabilitypb.ProvideSBMessage nil, // 10: accountabilitypb.FullCertificate.CertificateEntry (*trantorpb.Membership)(nil), // 11: trantorpb.Membership + (*isspb.SBDeliver)(nil), // 12: isspb.SBDeliver } var file_accountabilitypb_accountabilitypb_proto_depIdxs = []int32{ - 1, // 0: accountabilitypb.Event.predecided:type_name -> accountabilitypb.Predecided - 2, // 1: accountabilitypb.Event.decided:type_name -> accountabilitypb.Decided - 5, // 2: accountabilitypb.Event.poms:type_name -> accountabilitypb.PoMs - 7, // 3: accountabilitypb.PoM.conflicting_msg_1:type_name -> accountabilitypb.SignedPredecision - 7, // 4: accountabilitypb.PoM.conflicting_msg_2:type_name -> accountabilitypb.SignedPredecision - 3, // 5: accountabilitypb.PoMs.poms:type_name -> accountabilitypb.PoM - 7, // 6: accountabilitypb.Message.signed_predecision:type_name -> accountabilitypb.SignedPredecision - 8, // 7: accountabilitypb.Message.certificate:type_name -> accountabilitypb.FullCertificate - 5, // 8: accountabilitypb.Message.poms:type_name -> accountabilitypb.PoMs - 4, // 9: accountabilitypb.Message.light_certificate:type_name -> accountabilitypb.LightCertificate + 3, // 0: accountabilitypb.Event.poms:type_name -> accountabilitypb.PoMs + 5, // 1: accountabilitypb.PoM.conflicting_msg_1:type_name -> accountabilitypb.SignedPredecision + 5, // 2: accountabilitypb.PoM.conflicting_msg_2:type_name -> accountabilitypb.SignedPredecision + 1, // 3: accountabilitypb.PoMs.poms:type_name -> accountabilitypb.PoM + 5, // 4: accountabilitypb.Message.signed_predecision:type_name -> accountabilitypb.SignedPredecision + 6, // 5: accountabilitypb.Message.certificate:type_name -> accountabilitypb.FullCertificate + 3, // 6: accountabilitypb.Message.poms:type_name -> accountabilitypb.PoMs + 2, // 7: accountabilitypb.Message.light_certificate:type_name -> accountabilitypb.LightCertificate + 8, // 8: accountabilitypb.Message.request_sb_message:type_name -> accountabilitypb.RequestSBMessage + 9, // 9: accountabilitypb.Message.provide_sb_message:type_name -> accountabilitypb.ProvideSBMessage 10, // 10: accountabilitypb.FullCertificate.certificate:type_name -> accountabilitypb.FullCertificate.CertificateEntry 11, // 11: accountabilitypb.InstanceParams.membership:type_name -> trantorpb.Membership - 7, // 12: accountabilitypb.FullCertificate.CertificateEntry.value:type_name -> accountabilitypb.SignedPredecision + 12, // 12: accountabilitypb.ProvideSBMessage.sb_deliver:type_name -> isspb.SBDeliver 13, // [13:13] is the sub-list for method output_type 13, // [13:13] is the sub-list for method input_type 13, // [13:13] is the sub-list for extension type_name @@ -798,7 +815,7 @@ func file_accountabilitypb_accountabilitypb_proto_init() { } } file_accountabilitypb_accountabilitypb_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Predecided); i { + switch v := v.(*PoM); i { case 0: return &v.state case 1: @@ -810,7 +827,7 @@ func file_accountabilitypb_accountabilitypb_proto_init() { } } file_accountabilitypb_accountabilitypb_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Decided); i { + switch v := v.(*LightCertificate); i { case 0: return &v.state case 1: @@ -822,7 +839,7 @@ func file_accountabilitypb_accountabilitypb_proto_init() { } } file_accountabilitypb_accountabilitypb_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PoM); i { + switch v := v.(*PoMs); i { case 0: return &v.state case 1: @@ -834,7 +851,7 @@ func file_accountabilitypb_accountabilitypb_proto_init() { } } file_accountabilitypb_accountabilitypb_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LightCertificate); i { + switch v := v.(*Message); i { case 0: return &v.state case 1: @@ -846,7 +863,7 @@ func file_accountabilitypb_accountabilitypb_proto_init() { } } file_accountabilitypb_accountabilitypb_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PoMs); i { + switch v := v.(*SignedPredecision); i { case 0: return &v.state case 1: @@ -858,7 +875,7 @@ func file_accountabilitypb_accountabilitypb_proto_init() { } } file_accountabilitypb_accountabilitypb_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Message); i { + switch v := v.(*FullCertificate); i { case 0: return &v.state case 1: @@ -870,7 +887,7 @@ func file_accountabilitypb_accountabilitypb_proto_init() { } } file_accountabilitypb_accountabilitypb_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SignedPredecision); i { + switch v := v.(*InstanceParams); i { case 0: return &v.state case 1: @@ -882,7 +899,7 @@ func file_accountabilitypb_accountabilitypb_proto_init() { } } file_accountabilitypb_accountabilitypb_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FullCertificate); i { + switch v := v.(*RequestSBMessage); i { case 0: return &v.state case 1: @@ -894,7 +911,7 @@ func file_accountabilitypb_accountabilitypb_proto_init() { } } file_accountabilitypb_accountabilitypb_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*InstanceParams); i { + switch v := v.(*ProvideSBMessage); i { case 0: return &v.state case 1: @@ -907,15 +924,15 @@ func file_accountabilitypb_accountabilitypb_proto_init() { } } file_accountabilitypb_accountabilitypb_proto_msgTypes[0].OneofWrappers = []interface{}{ - (*Event_Predecided)(nil), - (*Event_Decided)(nil), (*Event_Poms)(nil), } - file_accountabilitypb_accountabilitypb_proto_msgTypes[6].OneofWrappers = []interface{}{ + file_accountabilitypb_accountabilitypb_proto_msgTypes[4].OneofWrappers = []interface{}{ (*Message_SignedPredecision)(nil), (*Message_Certificate)(nil), (*Message_Poms)(nil), (*Message_LightCertificate)(nil), + (*Message_RequestSbMessage)(nil), + (*Message_ProvideSbMessage)(nil), } type x struct{} out := protoimpl.TypeBuilder{ diff --git a/pkg/pb/accountabilitypb/accountabilitypb.pb.mir.go b/pkg/pb/accountabilitypb/accountabilitypb.pb.mir.go index 74be284a0..96c673f22 100644 --- a/pkg/pb/accountabilitypb/accountabilitypb.pb.mir.go +++ b/pkg/pb/accountabilitypb/accountabilitypb.pb.mir.go @@ -8,8 +8,6 @@ import ( func (*Event) ReflectTypeOptions() []reflect.Type { return []reflect.Type{ - reflect.TypeOf((*Event_Predecided)(nil)), - reflect.TypeOf((*Event_Decided)(nil)), reflect.TypeOf((*Event_Poms)(nil)), } } @@ -20,5 +18,7 @@ func (*Message) ReflectTypeOptions() []reflect.Type { reflect.TypeOf((*Message_Certificate)(nil)), reflect.TypeOf((*Message_Poms)(nil)), reflect.TypeOf((*Message_LightCertificate)(nil)), + reflect.TypeOf((*Message_RequestSbMessage)(nil)), + reflect.TypeOf((*Message_ProvideSbMessage)(nil)), } } diff --git a/pkg/pb/accountabilitypb/dsl/emit.mir.go b/pkg/pb/accountabilitypb/dsl/emit.mir.go index 9987aa711..e94b9fbac 100644 --- a/pkg/pb/accountabilitypb/dsl/emit.mir.go +++ b/pkg/pb/accountabilitypb/dsl/emit.mir.go @@ -11,14 +11,6 @@ import ( // Module-specific dsl functions for emitting events. -func Predecided(m dsl.Module, destModule types.ModuleID, data []uint8) { - dsl.EmitMirEvent(m, events.Predecided(destModule, data)) -} - -func Decided(m dsl.Module, destModule types.ModuleID, data []uint8) { - dsl.EmitMirEvent(m, events.Decided(destModule, data)) -} - func PoMs(m dsl.Module, destModule types.ModuleID, poms []*types1.PoM) { dsl.EmitMirEvent(m, events.PoMs(destModule, poms)) } diff --git a/pkg/pb/accountabilitypb/dsl/messages.mir.go b/pkg/pb/accountabilitypb/dsl/messages.mir.go index 37e347186..968a9b783 100644 --- a/pkg/pb/accountabilitypb/dsl/messages.mir.go +++ b/pkg/pb/accountabilitypb/dsl/messages.mir.go @@ -5,6 +5,7 @@ package accountabilitypbdsl import ( dsl "github.com/filecoin-project/mir/pkg/dsl" types "github.com/filecoin-project/mir/pkg/pb/accountabilitypb/types" + types3 "github.com/filecoin-project/mir/pkg/pb/isspb/types" dsl1 "github.com/filecoin-project/mir/pkg/pb/messagepb/dsl" types2 "github.com/filecoin-project/mir/pkg/pb/messagepb/types" types1 "github.com/filecoin-project/mir/pkg/types" @@ -29,9 +30,9 @@ func UponSignedPredecisionReceived(m dsl.Module, handler func(from types1.NodeID }) } -func UponFullCertificateReceived(m dsl.Module, handler func(from types1.NodeID, certificate map[types1.NodeID]*types.SignedPredecision) error) { +func UponFullCertificateReceived(m dsl.Module, handler func(from types1.NodeID, decision []uint8, certificate map[types1.NodeID][]uint8) error) { UponMessageReceived[*types.Message_Certificate](m, func(from types1.NodeID, msg *types.FullCertificate) error { - return handler(from, msg.Certificate) + return handler(from, msg.Decision, msg.Certificate) }) } @@ -46,3 +47,15 @@ func UponLightCertificateReceived(m dsl.Module, handler func(from types1.NodeID, return handler(from, msg.Data) }) } + +func UponRequestSBMessageReceived(m dsl.Module, handler func(from types1.NodeID, predecision []uint8) error) { + UponMessageReceived[*types.Message_RequestSbMessage](m, func(from types1.NodeID, msg *types.RequestSBMessage) error { + return handler(from, msg.Predecision) + }) +} + +func UponProvideSBMessageReceived(m dsl.Module, handler func(from types1.NodeID, sbDeliver *types3.SBDeliver) error) { + UponMessageReceived[*types.Message_ProvideSbMessage](m, func(from types1.NodeID, msg *types.ProvideSBMessage) error { + return handler(from, msg.SbDeliver) + }) +} diff --git a/pkg/pb/accountabilitypb/dsl/upon.mir.go b/pkg/pb/accountabilitypb/dsl/upon.mir.go index 763c3bf94..8817af61b 100644 --- a/pkg/pb/accountabilitypb/dsl/upon.mir.go +++ b/pkg/pb/accountabilitypb/dsl/upon.mir.go @@ -21,18 +21,6 @@ func UponEvent[W types.Event_TypeWrapper[Ev], Ev any](m dsl.Module, handler func }) } -func UponPredecided(m dsl.Module, handler func(data []uint8) error) { - UponEvent[*types.Event_Predecided](m, func(ev *types.Predecided) error { - return handler(ev.Data) - }) -} - -func UponDecided(m dsl.Module, handler func(data []uint8) error) { - UponEvent[*types.Event_Decided](m, func(ev *types.Decided) error { - return handler(ev.Data) - }) -} - func UponPoMs(m dsl.Module, handler func(poms []*types.PoM) error) { UponEvent[*types.Event_Poms](m, func(ev *types.PoMs) error { return handler(ev.Poms) diff --git a/pkg/pb/accountabilitypb/events/events.mir.go b/pkg/pb/accountabilitypb/events/events.mir.go index a19f15a7b..91a7988c9 100644 --- a/pkg/pb/accountabilitypb/events/events.mir.go +++ b/pkg/pb/accountabilitypb/events/events.mir.go @@ -3,48 +3,18 @@ package accountabilitypbevents import ( - types2 "github.com/filecoin-project/mir/pkg/pb/accountabilitypb/types" - types1 "github.com/filecoin-project/mir/pkg/pb/eventpb/types" + types1 "github.com/filecoin-project/mir/pkg/pb/accountabilitypb/types" + types2 "github.com/filecoin-project/mir/pkg/pb/eventpb/types" types "github.com/filecoin-project/mir/pkg/types" ) -func Predecided(destModule types.ModuleID, data []uint8) *types1.Event { - return &types1.Event{ +func PoMs(destModule types.ModuleID, poms []*types1.PoM) *types2.Event { + return &types2.Event{ DestModule: destModule, - Type: &types1.Event_Accountability{ - Accountability: &types2.Event{ - Type: &types2.Event_Predecided{ - Predecided: &types2.Predecided{ - Data: data, - }, - }, - }, - }, - } -} - -func Decided(destModule types.ModuleID, data []uint8) *types1.Event { - return &types1.Event{ - DestModule: destModule, - Type: &types1.Event_Accountability{ - Accountability: &types2.Event{ - Type: &types2.Event_Decided{ - Decided: &types2.Decided{ - Data: data, - }, - }, - }, - }, - } -} - -func PoMs(destModule types.ModuleID, poms []*types2.PoM) *types1.Event { - return &types1.Event{ - DestModule: destModule, - Type: &types1.Event_Accountability{ - Accountability: &types2.Event{ - Type: &types2.Event_Poms{ - Poms: &types2.PoMs{ + Type: &types2.Event_Accountability{ + Accountability: &types1.Event{ + Type: &types1.Event_Poms{ + Poms: &types1.PoMs{ Poms: poms, }, }, diff --git a/pkg/pb/accountabilitypb/msgs/msgs.mir.go b/pkg/pb/accountabilitypb/msgs/msgs.mir.go index a411a0d12..06d811c5c 100644 --- a/pkg/pb/accountabilitypb/msgs/msgs.mir.go +++ b/pkg/pb/accountabilitypb/msgs/msgs.mir.go @@ -4,6 +4,7 @@ package accountabilitypbmsgs import ( types2 "github.com/filecoin-project/mir/pkg/pb/accountabilitypb/types" + types3 "github.com/filecoin-project/mir/pkg/pb/isspb/types" types1 "github.com/filecoin-project/mir/pkg/pb/messagepb/types" types "github.com/filecoin-project/mir/pkg/types" ) @@ -24,13 +25,14 @@ func SignedPredecision(destModule types.ModuleID, predecision []uint8, signature } } -func FullCertificate(destModule types.ModuleID, certificate map[types.NodeID]*types2.SignedPredecision) *types1.Message { +func FullCertificate(destModule types.ModuleID, decision []uint8, certificate map[types.NodeID][]uint8) *types1.Message { return &types1.Message{ DestModule: destModule, Type: &types1.Message_Accountability{ Accountability: &types2.Message{ Type: &types2.Message_Certificate{ Certificate: &types2.FullCertificate{ + Decision: decision, Certificate: certificate, }, }, @@ -68,3 +70,33 @@ func LightCertificate(destModule types.ModuleID, data []uint8) *types1.Message { }, } } + +func RequestSBMessage(destModule types.ModuleID, predecision []uint8) *types1.Message { + return &types1.Message{ + DestModule: destModule, + Type: &types1.Message_Accountability{ + Accountability: &types2.Message{ + Type: &types2.Message_RequestSbMessage{ + RequestSbMessage: &types2.RequestSBMessage{ + Predecision: predecision, + }, + }, + }, + }, + } +} + +func ProvideSBMessage(destModule types.ModuleID, sbDeliver *types3.SBDeliver) *types1.Message { + return &types1.Message{ + DestModule: destModule, + Type: &types1.Message_Accountability{ + Accountability: &types2.Message{ + Type: &types2.Message_ProvideSbMessage{ + ProvideSbMessage: &types2.ProvideSBMessage{ + SbDeliver: sbDeliver, + }, + }, + }, + }, + } +} diff --git a/pkg/pb/accountabilitypb/oneof_interfaces.mir.go b/pkg/pb/accountabilitypb/oneof_interfaces.mir.go index 0cd3a5109..472ee6739 100644 --- a/pkg/pb/accountabilitypb/oneof_interfaces.mir.go +++ b/pkg/pb/accountabilitypb/oneof_interfaces.mir.go @@ -9,14 +9,6 @@ type Event_TypeWrapper[T any] interface { Unwrap() *T } -func (w *Event_Predecided) Unwrap() *Predecided { - return w.Predecided -} - -func (w *Event_Decided) Unwrap() *Decided { - return w.Decided -} - func (w *Event_Poms) Unwrap() *PoMs { return w.Poms } @@ -43,3 +35,11 @@ func (w *Message_Poms) Unwrap() *PoMs { func (w *Message_LightCertificate) Unwrap() *LightCertificate { return w.LightCertificate } + +func (w *Message_RequestSbMessage) Unwrap() *RequestSBMessage { + return w.RequestSbMessage +} + +func (w *Message_ProvideSbMessage) Unwrap() *ProvideSBMessage { + return w.ProvideSbMessage +} diff --git a/pkg/pb/accountabilitypb/types/types.mir.go b/pkg/pb/accountabilitypb/types/types.mir.go index 80d8567db..7686b7f94 100644 --- a/pkg/pb/accountabilitypb/types/types.mir.go +++ b/pkg/pb/accountabilitypb/types/types.mir.go @@ -6,6 +6,7 @@ import ( mirreflect "github.com/filecoin-project/mir/codegen/mirreflect" types1 "github.com/filecoin-project/mir/codegen/model/types" accountabilitypb "github.com/filecoin-project/mir/pkg/pb/accountabilitypb" + types3 "github.com/filecoin-project/mir/pkg/pb/isspb/types" types2 "github.com/filecoin-project/mir/pkg/pb/trantorpb/types" types "github.com/filecoin-project/mir/pkg/types" reflectutil "github.com/filecoin-project/mir/pkg/util/reflectutil" @@ -31,64 +32,12 @@ func Event_TypeFromPb(pb accountabilitypb.Event_Type) Event_Type { return nil } switch pb := pb.(type) { - case *accountabilitypb.Event_Predecided: - return &Event_Predecided{Predecided: PredecidedFromPb(pb.Predecided)} - case *accountabilitypb.Event_Decided: - return &Event_Decided{Decided: DecidedFromPb(pb.Decided)} case *accountabilitypb.Event_Poms: return &Event_Poms{Poms: PoMsFromPb(pb.Poms)} } return nil } -type Event_Predecided struct { - Predecided *Predecided -} - -func (*Event_Predecided) isEvent_Type() {} - -func (w *Event_Predecided) Unwrap() *Predecided { - return w.Predecided -} - -func (w *Event_Predecided) Pb() accountabilitypb.Event_Type { - if w == nil { - return nil - } - if w.Predecided == nil { - return &accountabilitypb.Event_Predecided{} - } - return &accountabilitypb.Event_Predecided{Predecided: (w.Predecided).Pb()} -} - -func (*Event_Predecided) MirReflect() mirreflect.Type { - return mirreflect.TypeImpl{PbType_: reflectutil.TypeOf[*accountabilitypb.Event_Predecided]()} -} - -type Event_Decided struct { - Decided *Decided -} - -func (*Event_Decided) isEvent_Type() {} - -func (w *Event_Decided) Unwrap() *Decided { - return w.Decided -} - -func (w *Event_Decided) Pb() accountabilitypb.Event_Type { - if w == nil { - return nil - } - if w.Decided == nil { - return &accountabilitypb.Event_Decided{} - } - return &accountabilitypb.Event_Decided{Decided: (w.Decided).Pb()} -} - -func (*Event_Decided) MirReflect() mirreflect.Type { - return mirreflect.TypeImpl{PbType_: reflectutil.TypeOf[*accountabilitypb.Event_Decided]()} -} - type Event_Poms struct { Poms *PoMs } @@ -140,64 +89,6 @@ func (*Event) MirReflect() mirreflect.Type { return mirreflect.TypeImpl{PbType_: reflectutil.TypeOf[*accountabilitypb.Event]()} } -type Predecided struct { - Data []uint8 -} - -func PredecidedFromPb(pb *accountabilitypb.Predecided) *Predecided { - if pb == nil { - return nil - } - return &Predecided{ - Data: pb.Data, - } -} - -func (m *Predecided) Pb() *accountabilitypb.Predecided { - if m == nil { - return nil - } - pbMessage := &accountabilitypb.Predecided{} - { - pbMessage.Data = m.Data - } - - return pbMessage -} - -func (*Predecided) MirReflect() mirreflect.Type { - return mirreflect.TypeImpl{PbType_: reflectutil.TypeOf[*accountabilitypb.Predecided]()} -} - -type Decided struct { - Data []uint8 -} - -func DecidedFromPb(pb *accountabilitypb.Decided) *Decided { - if pb == nil { - return nil - } - return &Decided{ - Data: pb.Data, - } -} - -func (m *Decided) Pb() *accountabilitypb.Decided { - if m == nil { - return nil - } - pbMessage := &accountabilitypb.Decided{} - { - pbMessage.Data = m.Data - } - - return pbMessage -} - -func (*Decided) MirReflect() mirreflect.Type { - return mirreflect.TypeImpl{PbType_: reflectutil.TypeOf[*accountabilitypb.Decided]()} -} - type PoM struct { NodeId types.NodeID ConflictingMsg_1 *SignedPredecision @@ -327,6 +218,10 @@ func Message_TypeFromPb(pb accountabilitypb.Message_Type) Message_Type { return &Message_Poms{Poms: PoMsFromPb(pb.Poms)} case *accountabilitypb.Message_LightCertificate: return &Message_LightCertificate{LightCertificate: LightCertificateFromPb(pb.LightCertificate)} + case *accountabilitypb.Message_RequestSbMessage: + return &Message_RequestSbMessage{RequestSbMessage: RequestSBMessageFromPb(pb.RequestSbMessage)} + case *accountabilitypb.Message_ProvideSbMessage: + return &Message_ProvideSbMessage{ProvideSbMessage: ProvideSBMessageFromPb(pb.ProvideSbMessage)} } return nil } @@ -427,6 +322,54 @@ func (*Message_LightCertificate) MirReflect() mirreflect.Type { return mirreflect.TypeImpl{PbType_: reflectutil.TypeOf[*accountabilitypb.Message_LightCertificate]()} } +type Message_RequestSbMessage struct { + RequestSbMessage *RequestSBMessage +} + +func (*Message_RequestSbMessage) isMessage_Type() {} + +func (w *Message_RequestSbMessage) Unwrap() *RequestSBMessage { + return w.RequestSbMessage +} + +func (w *Message_RequestSbMessage) Pb() accountabilitypb.Message_Type { + if w == nil { + return nil + } + if w.RequestSbMessage == nil { + return &accountabilitypb.Message_RequestSbMessage{} + } + return &accountabilitypb.Message_RequestSbMessage{RequestSbMessage: (w.RequestSbMessage).Pb()} +} + +func (*Message_RequestSbMessage) MirReflect() mirreflect.Type { + return mirreflect.TypeImpl{PbType_: reflectutil.TypeOf[*accountabilitypb.Message_RequestSbMessage]()} +} + +type Message_ProvideSbMessage struct { + ProvideSbMessage *ProvideSBMessage +} + +func (*Message_ProvideSbMessage) isMessage_Type() {} + +func (w *Message_ProvideSbMessage) Unwrap() *ProvideSBMessage { + return w.ProvideSbMessage +} + +func (w *Message_ProvideSbMessage) Pb() accountabilitypb.Message_Type { + if w == nil { + return nil + } + if w.ProvideSbMessage == nil { + return &accountabilitypb.Message_ProvideSbMessage{} + } + return &accountabilitypb.Message_ProvideSbMessage{ProvideSbMessage: (w.ProvideSbMessage).Pb()} +} + +func (*Message_ProvideSbMessage) MirReflect() mirreflect.Type { + return mirreflect.TypeImpl{PbType_: reflectutil.TypeOf[*accountabilitypb.Message_ProvideSbMessage]()} +} + func MessageFromPb(pb *accountabilitypb.Message) *Message { if pb == nil { return nil @@ -487,7 +430,8 @@ func (*SignedPredecision) MirReflect() mirreflect.Type { } type FullCertificate struct { - Certificate map[types.NodeID]*SignedPredecision + Decision []uint8 + Certificate map[types.NodeID][]uint8 } func FullCertificateFromPb(pb *accountabilitypb.FullCertificate) *FullCertificate { @@ -495,8 +439,9 @@ func FullCertificateFromPb(pb *accountabilitypb.FullCertificate) *FullCertificat return nil } return &FullCertificate{ - Certificate: types1.ConvertMap(pb.Certificate, func(k string, v *accountabilitypb.SignedPredecision) (types.NodeID, *SignedPredecision) { - return (types.NodeID)(k), SignedPredecisionFromPb(v) + Decision: pb.Decision, + Certificate: types1.ConvertMap(pb.Certificate, func(k string, v []uint8) (types.NodeID, []uint8) { + return (types.NodeID)(k), v }), } } @@ -507,8 +452,9 @@ func (m *FullCertificate) Pb() *accountabilitypb.FullCertificate { } pbMessage := &accountabilitypb.FullCertificate{} { - pbMessage.Certificate = types1.ConvertMap(m.Certificate, func(k types.NodeID, v *SignedPredecision) (string, *accountabilitypb.SignedPredecision) { - return (string)(k), (v).Pb() + pbMessage.Decision = m.Decision + pbMessage.Certificate = types1.ConvertMap(m.Certificate, func(k types.NodeID, v []uint8) (string, []uint8) { + return (string)(k), v }) } @@ -549,3 +495,63 @@ func (m *InstanceParams) Pb() *accountabilitypb.InstanceParams { func (*InstanceParams) MirReflect() mirreflect.Type { return mirreflect.TypeImpl{PbType_: reflectutil.TypeOf[*accountabilitypb.InstanceParams]()} } + +type RequestSBMessage struct { + Predecision []uint8 +} + +func RequestSBMessageFromPb(pb *accountabilitypb.RequestSBMessage) *RequestSBMessage { + if pb == nil { + return nil + } + return &RequestSBMessage{ + Predecision: pb.Predecision, + } +} + +func (m *RequestSBMessage) Pb() *accountabilitypb.RequestSBMessage { + if m == nil { + return nil + } + pbMessage := &accountabilitypb.RequestSBMessage{} + { + pbMessage.Predecision = m.Predecision + } + + return pbMessage +} + +func (*RequestSBMessage) MirReflect() mirreflect.Type { + return mirreflect.TypeImpl{PbType_: reflectutil.TypeOf[*accountabilitypb.RequestSBMessage]()} +} + +type ProvideSBMessage struct { + SbDeliver *types3.SBDeliver +} + +func ProvideSBMessageFromPb(pb *accountabilitypb.ProvideSBMessage) *ProvideSBMessage { + if pb == nil { + return nil + } + return &ProvideSBMessage{ + SbDeliver: types3.SBDeliverFromPb(pb.SbDeliver), + } +} + +func (m *ProvideSBMessage) Pb() *accountabilitypb.ProvideSBMessage { + if m == nil { + return nil + } + pbMessage := &accountabilitypb.ProvideSBMessage{} + { + if m.SbDeliver != nil { + pbMessage.SbDeliver = (m.SbDeliver).Pb() + } + } + + return pbMessage +} + +func (*ProvideSBMessage) MirReflect() mirreflect.Type { + return mirreflect.TypeImpl{PbType_: reflectutil.TypeOf[*accountabilitypb.ProvideSBMessage]()} +} diff --git a/protos/accountabilitypb/accountabilitypb.proto b/protos/accountabilitypb/accountabilitypb.proto index 7af9e7fb6..4c82d9392 100644 --- a/protos/accountabilitypb/accountabilitypb.proto +++ b/protos/accountabilitypb/accountabilitypb.proto @@ -5,6 +5,7 @@ package accountabilitypb; option go_package = "github.com/filecoin-project/mir/pkg/pb/accountabilitypb"; import "trantorpb/trantorpb.proto"; +import "isspb/isspb.proto"; import "net/codegen_extensions.proto"; import "mir/codegen_extensions.proto"; @@ -15,24 +16,10 @@ message Event{ oneof type { option (mir.event_type) = true; - Predecided predecided = 1; - Decided decided = 2; PoMs poms = 3; } } -message Predecided { - option (mir.event) = true; - - bytes data = 1; -} - -message Decided { - option (mir.event) = true; - - bytes data = 1; -} - message PoM { option (mir.struct) = true; @@ -61,9 +48,11 @@ message Message { option (net.message_type) = true; SignedPredecision signed_predecision = 1; - FullCertificate certificate = 2; - PoMs poms = 3; - LightCertificate light_certificate = 4; + FullCertificate certificate = 2; + PoMs poms = 3; + LightCertificate light_certificate = 4; + RequestSBMessage request_sb_message = 5; + ProvideSBMessage provide_sb_message = 6; } } @@ -78,7 +67,8 @@ message SignedPredecision { message FullCertificate { option (net.message) = true; - map certificate = 1 [(mir.key_type) = "github.com/filecoin-project/mir/pkg/types.NodeID"]; + bytes decision = 1; + map certificate = 2 [(mir.key_type) = "github.com/filecoin-project/mir/pkg/types.NodeID"]; } message InstanceParams { @@ -86,3 +76,16 @@ message InstanceParams { trantorpb.Membership membership = 3; } + + +message RequestSBMessage { + option (net.message) = true; + + bytes predecision = 1; +} + +message ProvideSBMessage { + option (net.message) = true; + + isspb.SBDeliver sb_deliver = 1; +} \ No newline at end of file From c8929d2f4906cae57a6df4d028594adf6b06bfc7 Mon Sep 17 00:00:00 2001 From: Alejandro Ranchal-Pedrosa Date: Mon, 7 Aug 2023 17:39:27 +0200 Subject: [PATCH 08/14] Remove all events from accountability module (only messages) --- .../accountabilitypb/accountabilitypb.pb.go | 404 +++++++----------- .../accountabilitypb.pb.mir.go | 6 - pkg/pb/accountabilitypb/dsl/emit.mir.go | 16 - pkg/pb/accountabilitypb/dsl/upon.mir.go | 28 -- pkg/pb/accountabilitypb/events/events.mir.go | 24 -- .../accountabilitypb/oneof_interfaces.mir.go | 11 - pkg/pb/accountabilitypb/types/types.mir.go | 77 ---- pkg/pb/eventpb/eventpb.pb.go | 323 +++++++------- pkg/pb/eventpb/eventpb.pb.mir.go | 1 - pkg/pb/eventpb/oneof_interfaces.mir.go | 5 - pkg/pb/eventpb/types/types.mir.go | 77 ++-- .../accountabilitypb/accountabilitypb.proto | 11 - protos/eventpb/eventpb.proto | 2 - 13 files changed, 332 insertions(+), 653 deletions(-) delete mode 100644 pkg/pb/accountabilitypb/dsl/emit.mir.go delete mode 100644 pkg/pb/accountabilitypb/dsl/upon.mir.go delete mode 100644 pkg/pb/accountabilitypb/events/events.mir.go diff --git a/pkg/pb/accountabilitypb/accountabilitypb.pb.go b/pkg/pb/accountabilitypb/accountabilitypb.pb.go index 786fc581d..3779b5a7d 100644 --- a/pkg/pb/accountabilitypb/accountabilitypb.pb.go +++ b/pkg/pb/accountabilitypb/accountabilitypb.pb.go @@ -24,72 +24,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -type Event struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Type: - // *Event_Poms - Type isEvent_Type `protobuf_oneof:"type"` -} - -func (x *Event) Reset() { - *x = Event{} - if protoimpl.UnsafeEnabled { - mi := &file_accountabilitypb_accountabilitypb_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Event) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Event) ProtoMessage() {} - -func (x *Event) ProtoReflect() protoreflect.Message { - mi := &file_accountabilitypb_accountabilitypb_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Event.ProtoReflect.Descriptor instead. -func (*Event) Descriptor() ([]byte, []int) { - return file_accountabilitypb_accountabilitypb_proto_rawDescGZIP(), []int{0} -} - -func (m *Event) GetType() isEvent_Type { - if m != nil { - return m.Type - } - return nil -} - -func (x *Event) GetPoms() *PoMs { - if x, ok := x.GetType().(*Event_Poms); ok { - return x.Poms - } - return nil -} - -type isEvent_Type interface { - isEvent_Type() -} - -type Event_Poms struct { - Poms *PoMs `protobuf:"bytes,3,opt,name=poms,proto3,oneof"` -} - -func (*Event_Poms) isEvent_Type() {} - type PoM struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -103,7 +37,7 @@ type PoM struct { func (x *PoM) Reset() { *x = PoM{} if protoimpl.UnsafeEnabled { - mi := &file_accountabilitypb_accountabilitypb_proto_msgTypes[1] + mi := &file_accountabilitypb_accountabilitypb_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -116,7 +50,7 @@ func (x *PoM) String() string { func (*PoM) ProtoMessage() {} func (x *PoM) ProtoReflect() protoreflect.Message { - mi := &file_accountabilitypb_accountabilitypb_proto_msgTypes[1] + mi := &file_accountabilitypb_accountabilitypb_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -129,7 +63,7 @@ func (x *PoM) ProtoReflect() protoreflect.Message { // Deprecated: Use PoM.ProtoReflect.Descriptor instead. func (*PoM) Descriptor() ([]byte, []int) { - return file_accountabilitypb_accountabilitypb_proto_rawDescGZIP(), []int{1} + return file_accountabilitypb_accountabilitypb_proto_rawDescGZIP(), []int{0} } func (x *PoM) GetNodeId() string { @@ -164,7 +98,7 @@ type LightCertificate struct { func (x *LightCertificate) Reset() { *x = LightCertificate{} if protoimpl.UnsafeEnabled { - mi := &file_accountabilitypb_accountabilitypb_proto_msgTypes[2] + mi := &file_accountabilitypb_accountabilitypb_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -177,7 +111,7 @@ func (x *LightCertificate) String() string { func (*LightCertificate) ProtoMessage() {} func (x *LightCertificate) ProtoReflect() protoreflect.Message { - mi := &file_accountabilitypb_accountabilitypb_proto_msgTypes[2] + mi := &file_accountabilitypb_accountabilitypb_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -190,7 +124,7 @@ func (x *LightCertificate) ProtoReflect() protoreflect.Message { // Deprecated: Use LightCertificate.ProtoReflect.Descriptor instead. func (*LightCertificate) Descriptor() ([]byte, []int) { - return file_accountabilitypb_accountabilitypb_proto_rawDescGZIP(), []int{2} + return file_accountabilitypb_accountabilitypb_proto_rawDescGZIP(), []int{1} } func (x *LightCertificate) GetData() []byte { @@ -211,7 +145,7 @@ type PoMs struct { func (x *PoMs) Reset() { *x = PoMs{} if protoimpl.UnsafeEnabled { - mi := &file_accountabilitypb_accountabilitypb_proto_msgTypes[3] + mi := &file_accountabilitypb_accountabilitypb_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -224,7 +158,7 @@ func (x *PoMs) String() string { func (*PoMs) ProtoMessage() {} func (x *PoMs) ProtoReflect() protoreflect.Message { - mi := &file_accountabilitypb_accountabilitypb_proto_msgTypes[3] + mi := &file_accountabilitypb_accountabilitypb_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -237,7 +171,7 @@ func (x *PoMs) ProtoReflect() protoreflect.Message { // Deprecated: Use PoMs.ProtoReflect.Descriptor instead. func (*PoMs) Descriptor() ([]byte, []int) { - return file_accountabilitypb_accountabilitypb_proto_rawDescGZIP(), []int{3} + return file_accountabilitypb_accountabilitypb_proto_rawDescGZIP(), []int{2} } func (x *PoMs) GetPoms() []*PoM { @@ -265,7 +199,7 @@ type Message struct { func (x *Message) Reset() { *x = Message{} if protoimpl.UnsafeEnabled { - mi := &file_accountabilitypb_accountabilitypb_proto_msgTypes[4] + mi := &file_accountabilitypb_accountabilitypb_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -278,7 +212,7 @@ func (x *Message) String() string { func (*Message) ProtoMessage() {} func (x *Message) ProtoReflect() protoreflect.Message { - mi := &file_accountabilitypb_accountabilitypb_proto_msgTypes[4] + mi := &file_accountabilitypb_accountabilitypb_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -291,7 +225,7 @@ func (x *Message) ProtoReflect() protoreflect.Message { // Deprecated: Use Message.ProtoReflect.Descriptor instead. func (*Message) Descriptor() ([]byte, []int) { - return file_accountabilitypb_accountabilitypb_proto_rawDescGZIP(), []int{4} + return file_accountabilitypb_accountabilitypb_proto_rawDescGZIP(), []int{3} } func (m *Message) GetType() isMessage_Type { @@ -395,7 +329,7 @@ type SignedPredecision struct { func (x *SignedPredecision) Reset() { *x = SignedPredecision{} if protoimpl.UnsafeEnabled { - mi := &file_accountabilitypb_accountabilitypb_proto_msgTypes[5] + mi := &file_accountabilitypb_accountabilitypb_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -408,7 +342,7 @@ func (x *SignedPredecision) String() string { func (*SignedPredecision) ProtoMessage() {} func (x *SignedPredecision) ProtoReflect() protoreflect.Message { - mi := &file_accountabilitypb_accountabilitypb_proto_msgTypes[5] + mi := &file_accountabilitypb_accountabilitypb_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -421,7 +355,7 @@ func (x *SignedPredecision) ProtoReflect() protoreflect.Message { // Deprecated: Use SignedPredecision.ProtoReflect.Descriptor instead. func (*SignedPredecision) Descriptor() ([]byte, []int) { - return file_accountabilitypb_accountabilitypb_proto_rawDescGZIP(), []int{5} + return file_accountabilitypb_accountabilitypb_proto_rawDescGZIP(), []int{4} } func (x *SignedPredecision) GetPredecision() []byte { @@ -450,7 +384,7 @@ type FullCertificate struct { func (x *FullCertificate) Reset() { *x = FullCertificate{} if protoimpl.UnsafeEnabled { - mi := &file_accountabilitypb_accountabilitypb_proto_msgTypes[6] + mi := &file_accountabilitypb_accountabilitypb_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -463,7 +397,7 @@ func (x *FullCertificate) String() string { func (*FullCertificate) ProtoMessage() {} func (x *FullCertificate) ProtoReflect() protoreflect.Message { - mi := &file_accountabilitypb_accountabilitypb_proto_msgTypes[6] + mi := &file_accountabilitypb_accountabilitypb_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -476,7 +410,7 @@ func (x *FullCertificate) ProtoReflect() protoreflect.Message { // Deprecated: Use FullCertificate.ProtoReflect.Descriptor instead. func (*FullCertificate) Descriptor() ([]byte, []int) { - return file_accountabilitypb_accountabilitypb_proto_rawDescGZIP(), []int{6} + return file_accountabilitypb_accountabilitypb_proto_rawDescGZIP(), []int{5} } func (x *FullCertificate) GetDecision() []byte { @@ -504,7 +438,7 @@ type InstanceParams struct { func (x *InstanceParams) Reset() { *x = InstanceParams{} if protoimpl.UnsafeEnabled { - mi := &file_accountabilitypb_accountabilitypb_proto_msgTypes[7] + mi := &file_accountabilitypb_accountabilitypb_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -517,7 +451,7 @@ func (x *InstanceParams) String() string { func (*InstanceParams) ProtoMessage() {} func (x *InstanceParams) ProtoReflect() protoreflect.Message { - mi := &file_accountabilitypb_accountabilitypb_proto_msgTypes[7] + mi := &file_accountabilitypb_accountabilitypb_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -530,7 +464,7 @@ func (x *InstanceParams) ProtoReflect() protoreflect.Message { // Deprecated: Use InstanceParams.ProtoReflect.Descriptor instead. func (*InstanceParams) Descriptor() ([]byte, []int) { - return file_accountabilitypb_accountabilitypb_proto_rawDescGZIP(), []int{7} + return file_accountabilitypb_accountabilitypb_proto_rawDescGZIP(), []int{6} } func (x *InstanceParams) GetMembership() *trantorpb.Membership { @@ -551,7 +485,7 @@ type RequestSBMessage struct { func (x *RequestSBMessage) Reset() { *x = RequestSBMessage{} if protoimpl.UnsafeEnabled { - mi := &file_accountabilitypb_accountabilitypb_proto_msgTypes[8] + mi := &file_accountabilitypb_accountabilitypb_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -564,7 +498,7 @@ func (x *RequestSBMessage) String() string { func (*RequestSBMessage) ProtoMessage() {} func (x *RequestSBMessage) ProtoReflect() protoreflect.Message { - mi := &file_accountabilitypb_accountabilitypb_proto_msgTypes[8] + mi := &file_accountabilitypb_accountabilitypb_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -577,7 +511,7 @@ func (x *RequestSBMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use RequestSBMessage.ProtoReflect.Descriptor instead. func (*RequestSBMessage) Descriptor() ([]byte, []int) { - return file_accountabilitypb_accountabilitypb_proto_rawDescGZIP(), []int{8} + return file_accountabilitypb_accountabilitypb_proto_rawDescGZIP(), []int{7} } func (x *RequestSBMessage) GetPredecision() []byte { @@ -598,7 +532,7 @@ type ProvideSBMessage struct { func (x *ProvideSBMessage) Reset() { *x = ProvideSBMessage{} if protoimpl.UnsafeEnabled { - mi := &file_accountabilitypb_accountabilitypb_proto_msgTypes[9] + mi := &file_accountabilitypb_accountabilitypb_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -611,7 +545,7 @@ func (x *ProvideSBMessage) String() string { func (*ProvideSBMessage) ProtoMessage() {} func (x *ProvideSBMessage) ProtoReflect() protoreflect.Message { - mi := &file_accountabilitypb_accountabilitypb_proto_msgTypes[9] + mi := &file_accountabilitypb_accountabilitypb_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -624,7 +558,7 @@ func (x *ProvideSBMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use ProvideSBMessage.ProtoReflect.Descriptor instead. func (*ProvideSBMessage) Descriptor() ([]byte, []int) { - return file_accountabilitypb_accountabilitypb_proto_rawDescGZIP(), []int{9} + return file_accountabilitypb_accountabilitypb_proto_rawDescGZIP(), []int{8} } func (x *ProvideSBMessage) GetSbDeliver() *isspb.SBDeliver { @@ -647,104 +581,99 @@ var file_accountabilitypb_accountabilitypb_proto_rawDesc = []byte{ 0x6f, 0x64, 0x65, 0x67, 0x65, 0x6e, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x6d, 0x69, 0x72, 0x2f, 0x63, 0x6f, 0x64, 0x65, 0x67, 0x65, 0x6e, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x49, 0x0a, 0x05, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x2c, - 0x0a, 0x04, 0x70, 0x6f, 0x6d, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x61, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x70, 0x62, 0x2e, - 0x50, 0x6f, 0x4d, 0x73, 0x48, 0x00, 0x52, 0x04, 0x70, 0x6f, 0x6d, 0x73, 0x3a, 0x04, 0x90, 0xa6, - 0x1d, 0x01, 0x42, 0x0c, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x04, 0x80, 0xa6, 0x1d, 0x01, - 0x22, 0xfc, 0x01, 0x0a, 0x03, 0x50, 0x6f, 0x4d, 0x12, 0x4d, 0x0a, 0x07, 0x6e, 0x6f, 0x64, 0x65, - 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x34, 0x82, 0xa6, 0x1d, 0x30, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x63, 0x6f, - 0x69, 0x6e, 0x2d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x6d, 0x69, 0x72, 0x2f, 0x70, - 0x6b, 0x67, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x44, 0x52, - 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x4f, 0x0a, 0x11, 0x63, 0x6f, 0x6e, 0x66, 0x6c, - 0x69, 0x63, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x6d, 0x73, 0x67, 0x5f, 0x31, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x62, 0x69, 0x6c, - 0x69, 0x74, 0x79, 0x70, 0x62, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x50, 0x72, 0x65, 0x64, - 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, - 0x74, 0x69, 0x6e, 0x67, 0x4d, 0x73, 0x67, 0x31, 0x12, 0x4f, 0x0a, 0x11, 0x63, 0x6f, 0x6e, 0x66, - 0x6c, 0x69, 0x63, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x6d, 0x73, 0x67, 0x5f, 0x32, 0x18, 0x03, 0x20, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xfc, 0x01, 0x0a, 0x03, 0x50, 0x6f, 0x4d, 0x12, 0x4d, 0x0a, + 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x34, + 0x82, 0xa6, 0x1d, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x66, + 0x69, 0x6c, 0x65, 0x63, 0x6f, 0x69, 0x6e, 0x2d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, + 0x6d, 0x69, 0x72, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x4e, 0x6f, + 0x64, 0x65, 0x49, 0x44, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x4f, 0x0a, 0x11, + 0x63, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x6d, 0x73, 0x67, 0x5f, + 0x31, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x70, 0x62, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, + 0x64, 0x50, 0x72, 0x65, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0f, 0x63, 0x6f, + 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x69, 0x6e, 0x67, 0x4d, 0x73, 0x67, 0x31, 0x12, 0x4f, 0x0a, + 0x11, 0x63, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x6d, 0x73, 0x67, + 0x5f, 0x32, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x70, 0x62, 0x2e, 0x53, 0x69, 0x67, 0x6e, + 0x65, 0x64, 0x50, 0x72, 0x65, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0f, 0x63, + 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x69, 0x6e, 0x67, 0x4d, 0x73, 0x67, 0x32, 0x3a, 0x04, + 0x80, 0xa6, 0x1d, 0x01, 0x22, 0x2c, 0x0a, 0x10, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x43, 0x65, 0x72, + 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x3a, 0x04, 0xd0, 0xe4, + 0x1d, 0x01, 0x22, 0x37, 0x0a, 0x04, 0x50, 0x6f, 0x4d, 0x73, 0x12, 0x29, 0x0a, 0x04, 0x70, 0x6f, + 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x70, 0x62, 0x2e, 0x50, 0x6f, 0x4d, 0x52, + 0x04, 0x70, 0x6f, 0x6d, 0x73, 0x3a, 0x04, 0xd0, 0xe4, 0x1d, 0x01, 0x22, 0xe3, 0x03, 0x0a, 0x07, + 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x54, 0x0a, 0x12, 0x73, 0x69, 0x67, 0x6e, 0x65, + 0x64, 0x5f, 0x70, 0x72, 0x65, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x70, 0x62, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x50, 0x72, 0x65, - 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x66, 0x6c, 0x69, - 0x63, 0x74, 0x69, 0x6e, 0x67, 0x4d, 0x73, 0x67, 0x32, 0x3a, 0x04, 0x80, 0xa6, 0x1d, 0x01, 0x22, - 0x2c, 0x0a, 0x10, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, - 0x61, 0x74, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x3a, 0x04, 0xd0, 0xe4, 0x1d, 0x01, 0x22, 0x3b, 0x0a, - 0x04, 0x50, 0x6f, 0x4d, 0x73, 0x12, 0x29, 0x0a, 0x04, 0x70, 0x6f, 0x6d, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x62, 0x69, - 0x6c, 0x69, 0x74, 0x79, 0x70, 0x62, 0x2e, 0x50, 0x6f, 0x4d, 0x52, 0x04, 0x70, 0x6f, 0x6d, 0x73, - 0x3a, 0x08, 0x98, 0xa6, 0x1d, 0x01, 0xd0, 0xe4, 0x1d, 0x01, 0x22, 0xe3, 0x03, 0x0a, 0x07, 0x4d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x54, 0x0a, 0x12, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, - 0x5f, 0x70, 0x72, 0x65, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x62, 0x69, 0x6c, - 0x69, 0x74, 0x79, 0x70, 0x62, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x50, 0x72, 0x65, 0x64, - 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x11, 0x73, 0x69, 0x67, 0x6e, 0x65, - 0x64, 0x50, 0x72, 0x65, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x45, 0x0a, 0x0b, - 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x21, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x62, 0x69, 0x6c, 0x69, - 0x74, 0x79, 0x70, 0x62, 0x2e, 0x46, 0x75, 0x6c, 0x6c, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, - 0x63, 0x61, 0x74, 0x65, 0x48, 0x00, 0x52, 0x0b, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, - 0x61, 0x74, 0x65, 0x12, 0x2c, 0x0a, 0x04, 0x70, 0x6f, 0x6d, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x16, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x62, 0x69, 0x6c, 0x69, - 0x74, 0x79, 0x70, 0x62, 0x2e, 0x50, 0x6f, 0x4d, 0x73, 0x48, 0x00, 0x52, 0x04, 0x70, 0x6f, 0x6d, - 0x73, 0x12, 0x51, 0x0a, 0x11, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, - 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x61, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x70, 0x62, 0x2e, - 0x4c, 0x69, 0x67, 0x68, 0x74, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, - 0x48, 0x00, 0x52, 0x10, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, - 0x63, 0x61, 0x74, 0x65, 0x12, 0x52, 0x0a, 0x12, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, - 0x73, 0x62, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x22, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, - 0x79, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x53, 0x42, 0x4d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x48, 0x00, 0x52, 0x10, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x53, - 0x62, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x52, 0x0a, 0x12, 0x70, 0x72, 0x6f, 0x76, - 0x69, 0x64, 0x65, 0x5f, 0x73, 0x62, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x62, - 0x69, 0x6c, 0x69, 0x74, 0x79, 0x70, 0x62, 0x2e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x53, - 0x42, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x48, 0x00, 0x52, 0x10, 0x70, 0x72, 0x6f, 0x76, - 0x69, 0x64, 0x65, 0x53, 0x62, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x3a, 0x04, 0xc8, 0xe4, - 0x1d, 0x01, 0x42, 0x0c, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x04, 0xc8, 0xe4, 0x1d, 0x01, - 0x22, 0x5d, 0x0a, 0x11, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x50, 0x72, 0x65, 0x64, 0x65, 0x63, - 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x72, 0x65, 0x64, 0x65, 0x63, 0x69, - 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x70, 0x72, 0x65, 0x64, - 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, - 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, - 0x61, 0x74, 0x75, 0x72, 0x65, 0x3a, 0x08, 0xd0, 0xe4, 0x1d, 0x01, 0x80, 0xa6, 0x1d, 0x01, 0x22, - 0x80, 0x02, 0x0a, 0x0f, 0x46, 0x75, 0x6c, 0x6c, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, - 0x61, 0x74, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, - 0x8a, 0x01, 0x0a, 0x0b, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x18, - 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, - 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x70, 0x62, 0x2e, 0x46, 0x75, 0x6c, 0x6c, 0x43, 0x65, 0x72, - 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x2e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, - 0x63, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x34, 0xaa, 0xa6, 0x1d, 0x30, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x63, 0x6f, - 0x69, 0x6e, 0x2d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x6d, 0x69, 0x72, 0x2f, 0x70, - 0x6b, 0x67, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x44, 0x52, - 0x0b, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x1a, 0x3e, 0x0a, 0x10, - 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, - 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x04, 0xd0, 0xe4, - 0x1d, 0x01, 0x22, 0x4d, 0x0a, 0x0e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x50, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x12, 0x35, 0x0a, 0x0a, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, - 0x69, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x74, - 0x6f, 0x72, 0x70, 0x62, 0x2e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x52, - 0x0a, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x3a, 0x04, 0x80, 0xa6, 0x1d, - 0x01, 0x22, 0x3a, 0x0a, 0x10, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x53, 0x42, 0x4d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x72, 0x65, 0x64, 0x65, 0x63, 0x69, - 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x70, 0x72, 0x65, 0x64, - 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x3a, 0x04, 0xd0, 0xe4, 0x1d, 0x01, 0x22, 0x49, 0x0a, - 0x10, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x53, 0x42, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x12, 0x2f, 0x0a, 0x0a, 0x73, 0x62, 0x5f, 0x64, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x69, 0x73, 0x73, 0x70, 0x62, 0x2e, 0x53, 0x42, - 0x44, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x52, 0x09, 0x73, 0x62, 0x44, 0x65, 0x6c, 0x69, 0x76, - 0x65, 0x72, 0x3a, 0x04, 0xd0, 0xe4, 0x1d, 0x01, 0x42, 0x39, 0x5a, 0x37, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x63, 0x6f, 0x69, 0x6e, 0x2d, - 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x6d, 0x69, 0x72, 0x2f, 0x70, 0x6b, 0x67, 0x2f, - 0x70, 0x62, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, - 0x79, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x11, 0x73, 0x69, 0x67, 0x6e, + 0x65, 0x64, 0x50, 0x72, 0x65, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x45, 0x0a, + 0x0b, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x62, 0x69, 0x6c, + 0x69, 0x74, 0x79, 0x70, 0x62, 0x2e, 0x46, 0x75, 0x6c, 0x6c, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, + 0x69, 0x63, 0x61, 0x74, 0x65, 0x48, 0x00, 0x52, 0x0b, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, + 0x63, 0x61, 0x74, 0x65, 0x12, 0x2c, 0x0a, 0x04, 0x70, 0x6f, 0x6d, 0x73, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x62, 0x69, 0x6c, + 0x69, 0x74, 0x79, 0x70, 0x62, 0x2e, 0x50, 0x6f, 0x4d, 0x73, 0x48, 0x00, 0x52, 0x04, 0x70, 0x6f, + 0x6d, 0x73, 0x12, 0x51, 0x0a, 0x11, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x5f, 0x63, 0x65, 0x72, 0x74, + 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, + 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x70, 0x62, + 0x2e, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, + 0x65, 0x48, 0x00, 0x52, 0x10, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, + 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x52, 0x0a, 0x12, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x5f, 0x73, 0x62, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x22, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x62, 0x69, 0x6c, 0x69, + 0x74, 0x79, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x53, 0x42, 0x4d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x48, 0x00, 0x52, 0x10, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x53, 0x62, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x52, 0x0a, 0x12, 0x70, 0x72, 0x6f, + 0x76, 0x69, 0x64, 0x65, 0x5f, 0x73, 0x62, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, + 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x70, 0x62, 0x2e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, + 0x53, 0x42, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x48, 0x00, 0x52, 0x10, 0x70, 0x72, 0x6f, + 0x76, 0x69, 0x64, 0x65, 0x53, 0x62, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x3a, 0x04, 0xc8, + 0xe4, 0x1d, 0x01, 0x42, 0x0c, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x04, 0xc8, 0xe4, 0x1d, + 0x01, 0x22, 0x5d, 0x0a, 0x11, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x50, 0x72, 0x65, 0x64, 0x65, + 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x72, 0x65, 0x64, 0x65, 0x63, + 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x70, 0x72, 0x65, + 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, + 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x69, 0x67, + 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x3a, 0x08, 0xd0, 0xe4, 0x1d, 0x01, 0x80, 0xa6, 0x1d, 0x01, + 0x22, 0x80, 0x02, 0x0a, 0x0f, 0x46, 0x75, 0x6c, 0x6c, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, + 0x63, 0x61, 0x74, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, + 0x12, 0x8a, 0x01, 0x0a, 0x0b, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x70, 0x62, 0x2e, 0x46, 0x75, 0x6c, 0x6c, 0x43, 0x65, + 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x2e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, + 0x69, 0x63, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x34, 0xaa, 0xa6, 0x1d, 0x30, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x63, + 0x6f, 0x69, 0x6e, 0x2d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x6d, 0x69, 0x72, 0x2f, + 0x70, 0x6b, 0x67, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x44, + 0x52, 0x0b, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x1a, 0x3e, 0x0a, + 0x10, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x04, 0xd0, + 0xe4, 0x1d, 0x01, 0x22, 0x4d, 0x0a, 0x0e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x35, 0x0a, 0x0a, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, + 0x68, 0x69, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x72, 0x61, 0x6e, + 0x74, 0x6f, 0x72, 0x70, 0x62, 0x2e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, + 0x52, 0x0a, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x3a, 0x04, 0x80, 0xa6, + 0x1d, 0x01, 0x22, 0x3a, 0x0a, 0x10, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x53, 0x42, 0x4d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x72, 0x65, 0x64, 0x65, 0x63, + 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x70, 0x72, 0x65, + 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x3a, 0x04, 0xd0, 0xe4, 0x1d, 0x01, 0x22, 0x49, + 0x0a, 0x10, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x53, 0x42, 0x4d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x12, 0x2f, 0x0a, 0x0a, 0x73, 0x62, 0x5f, 0x64, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x69, 0x73, 0x73, 0x70, 0x62, 0x2e, 0x53, + 0x42, 0x44, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x52, 0x09, 0x73, 0x62, 0x44, 0x65, 0x6c, 0x69, + 0x76, 0x65, 0x72, 0x3a, 0x04, 0xd0, 0xe4, 0x1d, 0x01, 0x42, 0x39, 0x5a, 0x37, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x63, 0x6f, 0x69, 0x6e, + 0x2d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x6d, 0x69, 0x72, 0x2f, 0x70, 0x6b, 0x67, + 0x2f, 0x70, 0x62, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x62, 0x69, 0x6c, 0x69, + 0x74, 0x79, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -759,41 +688,39 @@ func file_accountabilitypb_accountabilitypb_proto_rawDescGZIP() []byte { return file_accountabilitypb_accountabilitypb_proto_rawDescData } -var file_accountabilitypb_accountabilitypb_proto_msgTypes = make([]protoimpl.MessageInfo, 11) +var file_accountabilitypb_accountabilitypb_proto_msgTypes = make([]protoimpl.MessageInfo, 10) var file_accountabilitypb_accountabilitypb_proto_goTypes = []interface{}{ - (*Event)(nil), // 0: accountabilitypb.Event - (*PoM)(nil), // 1: accountabilitypb.PoM - (*LightCertificate)(nil), // 2: accountabilitypb.LightCertificate - (*PoMs)(nil), // 3: accountabilitypb.PoMs - (*Message)(nil), // 4: accountabilitypb.Message - (*SignedPredecision)(nil), // 5: accountabilitypb.SignedPredecision - (*FullCertificate)(nil), // 6: accountabilitypb.FullCertificate - (*InstanceParams)(nil), // 7: accountabilitypb.InstanceParams - (*RequestSBMessage)(nil), // 8: accountabilitypb.RequestSBMessage - (*ProvideSBMessage)(nil), // 9: accountabilitypb.ProvideSBMessage - nil, // 10: accountabilitypb.FullCertificate.CertificateEntry - (*trantorpb.Membership)(nil), // 11: trantorpb.Membership - (*isspb.SBDeliver)(nil), // 12: isspb.SBDeliver + (*PoM)(nil), // 0: accountabilitypb.PoM + (*LightCertificate)(nil), // 1: accountabilitypb.LightCertificate + (*PoMs)(nil), // 2: accountabilitypb.PoMs + (*Message)(nil), // 3: accountabilitypb.Message + (*SignedPredecision)(nil), // 4: accountabilitypb.SignedPredecision + (*FullCertificate)(nil), // 5: accountabilitypb.FullCertificate + (*InstanceParams)(nil), // 6: accountabilitypb.InstanceParams + (*RequestSBMessage)(nil), // 7: accountabilitypb.RequestSBMessage + (*ProvideSBMessage)(nil), // 8: accountabilitypb.ProvideSBMessage + nil, // 9: accountabilitypb.FullCertificate.CertificateEntry + (*trantorpb.Membership)(nil), // 10: trantorpb.Membership + (*isspb.SBDeliver)(nil), // 11: isspb.SBDeliver } var file_accountabilitypb_accountabilitypb_proto_depIdxs = []int32{ - 3, // 0: accountabilitypb.Event.poms:type_name -> accountabilitypb.PoMs - 5, // 1: accountabilitypb.PoM.conflicting_msg_1:type_name -> accountabilitypb.SignedPredecision - 5, // 2: accountabilitypb.PoM.conflicting_msg_2:type_name -> accountabilitypb.SignedPredecision - 1, // 3: accountabilitypb.PoMs.poms:type_name -> accountabilitypb.PoM - 5, // 4: accountabilitypb.Message.signed_predecision:type_name -> accountabilitypb.SignedPredecision - 6, // 5: accountabilitypb.Message.certificate:type_name -> accountabilitypb.FullCertificate - 3, // 6: accountabilitypb.Message.poms:type_name -> accountabilitypb.PoMs - 2, // 7: accountabilitypb.Message.light_certificate:type_name -> accountabilitypb.LightCertificate - 8, // 8: accountabilitypb.Message.request_sb_message:type_name -> accountabilitypb.RequestSBMessage - 9, // 9: accountabilitypb.Message.provide_sb_message:type_name -> accountabilitypb.ProvideSBMessage - 10, // 10: accountabilitypb.FullCertificate.certificate:type_name -> accountabilitypb.FullCertificate.CertificateEntry - 11, // 11: accountabilitypb.InstanceParams.membership:type_name -> trantorpb.Membership - 12, // 12: accountabilitypb.ProvideSBMessage.sb_deliver:type_name -> isspb.SBDeliver - 13, // [13:13] is the sub-list for method output_type - 13, // [13:13] is the sub-list for method input_type - 13, // [13:13] is the sub-list for extension type_name - 13, // [13:13] is the sub-list for extension extendee - 0, // [0:13] is the sub-list for field type_name + 4, // 0: accountabilitypb.PoM.conflicting_msg_1:type_name -> accountabilitypb.SignedPredecision + 4, // 1: accountabilitypb.PoM.conflicting_msg_2:type_name -> accountabilitypb.SignedPredecision + 0, // 2: accountabilitypb.PoMs.poms:type_name -> accountabilitypb.PoM + 4, // 3: accountabilitypb.Message.signed_predecision:type_name -> accountabilitypb.SignedPredecision + 5, // 4: accountabilitypb.Message.certificate:type_name -> accountabilitypb.FullCertificate + 2, // 5: accountabilitypb.Message.poms:type_name -> accountabilitypb.PoMs + 1, // 6: accountabilitypb.Message.light_certificate:type_name -> accountabilitypb.LightCertificate + 7, // 7: accountabilitypb.Message.request_sb_message:type_name -> accountabilitypb.RequestSBMessage + 8, // 8: accountabilitypb.Message.provide_sb_message:type_name -> accountabilitypb.ProvideSBMessage + 9, // 9: accountabilitypb.FullCertificate.certificate:type_name -> accountabilitypb.FullCertificate.CertificateEntry + 10, // 10: accountabilitypb.InstanceParams.membership:type_name -> trantorpb.Membership + 11, // 11: accountabilitypb.ProvideSBMessage.sb_deliver:type_name -> isspb.SBDeliver + 12, // [12:12] is the sub-list for method output_type + 12, // [12:12] is the sub-list for method input_type + 12, // [12:12] is the sub-list for extension type_name + 12, // [12:12] is the sub-list for extension extendee + 0, // [0:12] is the sub-list for field type_name } func init() { file_accountabilitypb_accountabilitypb_proto_init() } @@ -803,18 +730,6 @@ func file_accountabilitypb_accountabilitypb_proto_init() { } if !protoimpl.UnsafeEnabled { file_accountabilitypb_accountabilitypb_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Event); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_accountabilitypb_accountabilitypb_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PoM); i { case 0: return &v.state @@ -826,7 +741,7 @@ func file_accountabilitypb_accountabilitypb_proto_init() { return nil } } - file_accountabilitypb_accountabilitypb_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_accountabilitypb_accountabilitypb_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*LightCertificate); i { case 0: return &v.state @@ -838,7 +753,7 @@ func file_accountabilitypb_accountabilitypb_proto_init() { return nil } } - file_accountabilitypb_accountabilitypb_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_accountabilitypb_accountabilitypb_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PoMs); i { case 0: return &v.state @@ -850,7 +765,7 @@ func file_accountabilitypb_accountabilitypb_proto_init() { return nil } } - file_accountabilitypb_accountabilitypb_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_accountabilitypb_accountabilitypb_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Message); i { case 0: return &v.state @@ -862,7 +777,7 @@ func file_accountabilitypb_accountabilitypb_proto_init() { return nil } } - file_accountabilitypb_accountabilitypb_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_accountabilitypb_accountabilitypb_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SignedPredecision); i { case 0: return &v.state @@ -874,7 +789,7 @@ func file_accountabilitypb_accountabilitypb_proto_init() { return nil } } - file_accountabilitypb_accountabilitypb_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_accountabilitypb_accountabilitypb_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FullCertificate); i { case 0: return &v.state @@ -886,7 +801,7 @@ func file_accountabilitypb_accountabilitypb_proto_init() { return nil } } - file_accountabilitypb_accountabilitypb_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_accountabilitypb_accountabilitypb_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*InstanceParams); i { case 0: return &v.state @@ -898,7 +813,7 @@ func file_accountabilitypb_accountabilitypb_proto_init() { return nil } } - file_accountabilitypb_accountabilitypb_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_accountabilitypb_accountabilitypb_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RequestSBMessage); i { case 0: return &v.state @@ -910,7 +825,7 @@ func file_accountabilitypb_accountabilitypb_proto_init() { return nil } } - file_accountabilitypb_accountabilitypb_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + file_accountabilitypb_accountabilitypb_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ProvideSBMessage); i { case 0: return &v.state @@ -923,10 +838,7 @@ func file_accountabilitypb_accountabilitypb_proto_init() { } } } - file_accountabilitypb_accountabilitypb_proto_msgTypes[0].OneofWrappers = []interface{}{ - (*Event_Poms)(nil), - } - file_accountabilitypb_accountabilitypb_proto_msgTypes[4].OneofWrappers = []interface{}{ + file_accountabilitypb_accountabilitypb_proto_msgTypes[3].OneofWrappers = []interface{}{ (*Message_SignedPredecision)(nil), (*Message_Certificate)(nil), (*Message_Poms)(nil), @@ -940,7 +852,7 @@ func file_accountabilitypb_accountabilitypb_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_accountabilitypb_accountabilitypb_proto_rawDesc, NumEnums: 0, - NumMessages: 11, + NumMessages: 10, NumExtensions: 0, NumServices: 0, }, diff --git a/pkg/pb/accountabilitypb/accountabilitypb.pb.mir.go b/pkg/pb/accountabilitypb/accountabilitypb.pb.mir.go index 96c673f22..c5ca689d3 100644 --- a/pkg/pb/accountabilitypb/accountabilitypb.pb.mir.go +++ b/pkg/pb/accountabilitypb/accountabilitypb.pb.mir.go @@ -6,12 +6,6 @@ import ( reflect "reflect" ) -func (*Event) ReflectTypeOptions() []reflect.Type { - return []reflect.Type{ - reflect.TypeOf((*Event_Poms)(nil)), - } -} - func (*Message) ReflectTypeOptions() []reflect.Type { return []reflect.Type{ reflect.TypeOf((*Message_SignedPredecision)(nil)), diff --git a/pkg/pb/accountabilitypb/dsl/emit.mir.go b/pkg/pb/accountabilitypb/dsl/emit.mir.go deleted file mode 100644 index e94b9fbac..000000000 --- a/pkg/pb/accountabilitypb/dsl/emit.mir.go +++ /dev/null @@ -1,16 +0,0 @@ -// Code generated by Mir codegen. DO NOT EDIT. - -package accountabilitypbdsl - -import ( - dsl "github.com/filecoin-project/mir/pkg/dsl" - events "github.com/filecoin-project/mir/pkg/pb/accountabilitypb/events" - types1 "github.com/filecoin-project/mir/pkg/pb/accountabilitypb/types" - types "github.com/filecoin-project/mir/pkg/types" -) - -// Module-specific dsl functions for emitting events. - -func PoMs(m dsl.Module, destModule types.ModuleID, poms []*types1.PoM) { - dsl.EmitMirEvent(m, events.PoMs(destModule, poms)) -} diff --git a/pkg/pb/accountabilitypb/dsl/upon.mir.go b/pkg/pb/accountabilitypb/dsl/upon.mir.go deleted file mode 100644 index 8817af61b..000000000 --- a/pkg/pb/accountabilitypb/dsl/upon.mir.go +++ /dev/null @@ -1,28 +0,0 @@ -// Code generated by Mir codegen. DO NOT EDIT. - -package accountabilitypbdsl - -import ( - dsl "github.com/filecoin-project/mir/pkg/dsl" - types "github.com/filecoin-project/mir/pkg/pb/accountabilitypb/types" - types1 "github.com/filecoin-project/mir/pkg/pb/eventpb/types" -) - -// Module-specific dsl functions for processing events. - -func UponEvent[W types.Event_TypeWrapper[Ev], Ev any](m dsl.Module, handler func(ev *Ev) error) { - dsl.UponMirEvent[*types1.Event_Accountability](m, func(ev *types.Event) error { - w, ok := ev.Type.(W) - if !ok { - return nil - } - - return handler(w.Unwrap()) - }) -} - -func UponPoMs(m dsl.Module, handler func(poms []*types.PoM) error) { - UponEvent[*types.Event_Poms](m, func(ev *types.PoMs) error { - return handler(ev.Poms) - }) -} diff --git a/pkg/pb/accountabilitypb/events/events.mir.go b/pkg/pb/accountabilitypb/events/events.mir.go deleted file mode 100644 index 91a7988c9..000000000 --- a/pkg/pb/accountabilitypb/events/events.mir.go +++ /dev/null @@ -1,24 +0,0 @@ -// Code generated by Mir codegen. DO NOT EDIT. - -package accountabilitypbevents - -import ( - types1 "github.com/filecoin-project/mir/pkg/pb/accountabilitypb/types" - types2 "github.com/filecoin-project/mir/pkg/pb/eventpb/types" - types "github.com/filecoin-project/mir/pkg/types" -) - -func PoMs(destModule types.ModuleID, poms []*types1.PoM) *types2.Event { - return &types2.Event{ - DestModule: destModule, - Type: &types2.Event_Accountability{ - Accountability: &types1.Event{ - Type: &types1.Event_Poms{ - Poms: &types1.PoMs{ - Poms: poms, - }, - }, - }, - }, - } -} diff --git a/pkg/pb/accountabilitypb/oneof_interfaces.mir.go b/pkg/pb/accountabilitypb/oneof_interfaces.mir.go index 472ee6739..a88d3a005 100644 --- a/pkg/pb/accountabilitypb/oneof_interfaces.mir.go +++ b/pkg/pb/accountabilitypb/oneof_interfaces.mir.go @@ -2,17 +2,6 @@ package accountabilitypb -type Event_Type = isEvent_Type - -type Event_TypeWrapper[T any] interface { - Event_Type - Unwrap() *T -} - -func (w *Event_Poms) Unwrap() *PoMs { - return w.Poms -} - type Message_Type = isMessage_Type type Message_TypeWrapper[T any] interface { diff --git a/pkg/pb/accountabilitypb/types/types.mir.go b/pkg/pb/accountabilitypb/types/types.mir.go index 7686b7f94..aa14087ae 100644 --- a/pkg/pb/accountabilitypb/types/types.mir.go +++ b/pkg/pb/accountabilitypb/types/types.mir.go @@ -12,83 +12,6 @@ import ( reflectutil "github.com/filecoin-project/mir/pkg/util/reflectutil" ) -type Event struct { - Type Event_Type -} - -type Event_Type interface { - mirreflect.GeneratedType - isEvent_Type() - Pb() accountabilitypb.Event_Type -} - -type Event_TypeWrapper[T any] interface { - Event_Type - Unwrap() *T -} - -func Event_TypeFromPb(pb accountabilitypb.Event_Type) Event_Type { - if pb == nil { - return nil - } - switch pb := pb.(type) { - case *accountabilitypb.Event_Poms: - return &Event_Poms{Poms: PoMsFromPb(pb.Poms)} - } - return nil -} - -type Event_Poms struct { - Poms *PoMs -} - -func (*Event_Poms) isEvent_Type() {} - -func (w *Event_Poms) Unwrap() *PoMs { - return w.Poms -} - -func (w *Event_Poms) Pb() accountabilitypb.Event_Type { - if w == nil { - return nil - } - if w.Poms == nil { - return &accountabilitypb.Event_Poms{} - } - return &accountabilitypb.Event_Poms{Poms: (w.Poms).Pb()} -} - -func (*Event_Poms) MirReflect() mirreflect.Type { - return mirreflect.TypeImpl{PbType_: reflectutil.TypeOf[*accountabilitypb.Event_Poms]()} -} - -func EventFromPb(pb *accountabilitypb.Event) *Event { - if pb == nil { - return nil - } - return &Event{ - Type: Event_TypeFromPb(pb.Type), - } -} - -func (m *Event) Pb() *accountabilitypb.Event { - if m == nil { - return nil - } - pbMessage := &accountabilitypb.Event{} - { - if m.Type != nil { - pbMessage.Type = (m.Type).Pb() - } - } - - return pbMessage -} - -func (*Event) MirReflect() mirreflect.Type { - return mirreflect.TypeImpl{PbType_: reflectutil.TypeOf[*accountabilitypb.Event]()} -} - type PoM struct { NodeId types.NodeID ConflictingMsg_1 *SignedPredecision diff --git a/pkg/pb/eventpb/eventpb.pb.go b/pkg/pb/eventpb/eventpb.pb.go index 82ce1470a..3a05b4fdf 100644 --- a/pkg/pb/eventpb/eventpb.pb.go +++ b/pkg/pb/eventpb/eventpb.pb.go @@ -7,7 +7,6 @@ package eventpb import ( - accountabilitypb "github.com/filecoin-project/mir/pkg/pb/accountabilitypb" apppb "github.com/filecoin-project/mir/pkg/pb/apppb" availabilitypb "github.com/filecoin-project/mir/pkg/pb/availabilitypb" batchdbpb "github.com/filecoin-project/mir/pkg/pb/availabilitypb/batchdbpb" @@ -67,7 +66,6 @@ type Event struct { // *Event_Transport // *Event_ChkpValidator // *Event_PprepValiadtor - // *Event_Accountability // *Event_PingPong // *Event_TestingString // *Event_TestingUint @@ -255,13 +253,6 @@ func (x *Event) GetPprepValiadtor() *pprepvalidatorpb.Event { return nil } -func (x *Event) GetAccountability() *accountabilitypb.Event { - if x, ok := x.GetType().(*Event_Accountability); ok { - return x.Accountability - } - return nil -} - func (x *Event) GetPingPong() *pingpongpb.Event { if x, ok := x.GetType().(*Event_PingPong); ok { return x.PingPong @@ -376,10 +367,6 @@ type Event_PprepValiadtor struct { PprepValiadtor *pprepvalidatorpb.Event `protobuf:"bytes,25,opt,name=pprep_valiadtor,json=pprepValiadtor,proto3,oneof"` } -type Event_Accountability struct { - Accountability *accountabilitypb.Event `protobuf:"bytes,26,opt,name=accountability,proto3,oneof"` -} - type Event_PingPong struct { // Events for code samples PingPong *pingpongpb.Event `protobuf:"bytes,200,opt,name=ping_pong,json=pingPong,proto3,oneof"` @@ -434,8 +421,6 @@ func (*Event_ChkpValidator) isEvent_Type() {} func (*Event_PprepValiadtor) isEvent_Type() {} -func (*Event_Accountability) isEvent_Type() {} - func (*Event_PingPong) isEvent_Type() {} func (*Event_TestingString) isEvent_Type() {} @@ -785,148 +770,141 @@ var file_eventpb_eventpb_proto_rawDesc = []byte{ 0x73, 0x70, 0x6f, 0x72, 0x74, 0x70, 0x62, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x70, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, 0x70, 0x62, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, 0x70, 0x62, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x27, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x62, 0x69, 0x6c, 0x69, - 0x74, 0x79, 0x70, 0x62, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x62, 0x69, 0x6c, - 0x69, 0x74, 0x79, 0x70, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x6d, 0x69, 0x72, - 0x2f, 0x63, 0x6f, 0x64, 0x65, 0x67, 0x65, 0x6e, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xbc, 0x0a, 0x0a, 0x05, 0x45, 0x76, - 0x65, 0x6e, 0x74, 0x12, 0x57, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x6f, 0x64, 0x75, - 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x36, 0x82, 0xa6, 0x1d, 0x32, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x63, 0x6f, 0x69, - 0x6e, 0x2d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x6d, 0x69, 0x72, 0x2f, 0x70, 0x6b, - 0x67, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x49, 0x44, - 0x52, 0x0a, 0x64, 0x65, 0x73, 0x74, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x23, 0x0a, 0x04, - 0x69, 0x6e, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x65, 0x76, 0x65, - 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x49, 0x6e, 0x69, 0x74, 0x48, 0x00, 0x52, 0x04, 0x69, 0x6e, 0x69, - 0x74, 0x12, 0x2b, 0x0a, 0x05, 0x74, 0x69, 0x6d, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x13, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x72, - 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x05, 0x74, 0x69, 0x6d, 0x65, 0x72, 0x12, 0x29, - 0x0a, 0x06, 0x68, 0x61, 0x73, 0x68, 0x65, 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, - 0x2e, 0x68, 0x61, 0x73, 0x68, 0x65, 0x72, 0x70, 0x62, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, - 0x00, 0x52, 0x06, 0x68, 0x61, 0x73, 0x68, 0x65, 0x72, 0x12, 0x20, 0x0a, 0x03, 0x62, 0x63, 0x62, - 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x62, 0x63, 0x62, 0x70, 0x62, 0x2e, 0x45, - 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x03, 0x62, 0x63, 0x62, 0x12, 0x2c, 0x0a, 0x07, 0x6d, - 0x65, 0x6d, 0x70, 0x6f, 0x6f, 0x6c, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6d, - 0x65, 0x6d, 0x70, 0x6f, 0x6f, 0x6c, 0x70, 0x62, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, - 0x52, 0x07, 0x6d, 0x65, 0x6d, 0x70, 0x6f, 0x6f, 0x6c, 0x12, 0x3b, 0x0a, 0x0c, 0x61, 0x76, 0x61, - 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x15, 0x2e, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x70, 0x62, - 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0c, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, - 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x2d, 0x0a, 0x08, 0x62, 0x61, 0x74, 0x63, 0x68, 0x5f, - 0x64, 0x62, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x62, 0x61, 0x74, 0x63, 0x68, - 0x64, 0x62, 0x70, 0x62, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x07, 0x62, 0x61, - 0x74, 0x63, 0x68, 0x44, 0x62, 0x12, 0x3c, 0x0a, 0x0d, 0x62, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x66, - 0x65, 0x74, 0x63, 0x68, 0x65, 0x72, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x62, - 0x61, 0x74, 0x63, 0x68, 0x66, 0x65, 0x74, 0x63, 0x68, 0x65, 0x72, 0x70, 0x62, 0x2e, 0x45, 0x76, - 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0c, 0x62, 0x61, 0x74, 0x63, 0x68, 0x46, 0x65, 0x74, 0x63, - 0x68, 0x65, 0x72, 0x12, 0x3c, 0x0a, 0x0d, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x5f, 0x63, 0x72, - 0x79, 0x70, 0x74, 0x6f, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x68, 0x72, - 0x65, 0x73, 0x68, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x70, 0x62, 0x2e, 0x45, 0x76, 0x65, 0x6e, - 0x74, 0x48, 0x00, 0x52, 0x0c, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x43, 0x72, 0x79, 0x70, 0x74, - 0x6f, 0x12, 0x35, 0x0a, 0x0a, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, - 0x11, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, - 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0a, 0x63, 0x68, - 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x2c, 0x0a, 0x07, 0x66, 0x61, 0x63, 0x74, - 0x6f, 0x72, 0x79, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x66, 0x61, 0x63, 0x74, - 0x6f, 0x72, 0x79, 0x70, 0x62, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x07, 0x66, - 0x61, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x20, 0x0a, 0x03, 0x69, 0x73, 0x73, 0x18, 0x13, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x69, 0x73, 0x73, 0x70, 0x62, 0x2e, 0x45, 0x76, 0x65, 0x6e, - 0x74, 0x48, 0x00, 0x52, 0x03, 0x69, 0x73, 0x73, 0x12, 0x2c, 0x0a, 0x07, 0x6f, 0x72, 0x64, 0x65, - 0x72, 0x65, 0x72, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6f, 0x72, 0x64, 0x65, - 0x72, 0x65, 0x72, 0x70, 0x62, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x07, 0x6f, - 0x72, 0x64, 0x65, 0x72, 0x65, 0x72, 0x12, 0x29, 0x0a, 0x06, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, - 0x18, 0x15, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x70, - 0x62, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x06, 0x63, 0x72, 0x79, 0x70, 0x74, - 0x6f, 0x12, 0x20, 0x0a, 0x03, 0x61, 0x70, 0x70, 0x18, 0x16, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, - 0x2e, 0x61, 0x70, 0x70, 0x70, 0x62, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x03, - 0x61, 0x70, 0x70, 0x12, 0x32, 0x0a, 0x09, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, - 0x18, 0x17, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, - 0x72, 0x74, 0x70, 0x62, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x09, 0x74, 0x72, - 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x3f, 0x0a, 0x0e, 0x63, 0x68, 0x6b, 0x70, 0x5f, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x18, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x16, 0x2e, 0x63, 0x68, 0x6b, 0x70, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x70, - 0x62, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0d, 0x63, 0x68, 0x6b, 0x70, 0x56, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x42, 0x0a, 0x0f, 0x70, 0x70, 0x72, 0x65, - 0x70, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x61, 0x64, 0x74, 0x6f, 0x72, 0x18, 0x19, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x17, 0x2e, 0x70, 0x70, 0x72, 0x65, 0x70, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x6f, 0x72, 0x70, 0x62, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0e, 0x70, 0x70, - 0x72, 0x65, 0x70, 0x56, 0x61, 0x6c, 0x69, 0x61, 0x64, 0x74, 0x6f, 0x72, 0x12, 0x41, 0x0a, 0x0e, - 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x1a, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x62, + 0x74, 0x6f, 0x1a, 0x1c, 0x6d, 0x69, 0x72, 0x2f, 0x63, 0x6f, 0x64, 0x65, 0x67, 0x65, 0x6e, 0x5f, + 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x22, 0xf9, 0x09, 0x0a, 0x05, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x57, 0x0a, 0x0b, 0x64, 0x65, + 0x73, 0x74, 0x5f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x36, 0x82, 0xa6, 0x1d, 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x66, 0x69, 0x6c, 0x65, 0x63, 0x6f, 0x69, 0x6e, 0x2d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x2f, 0x6d, 0x69, 0x72, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x4d, + 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x49, 0x44, 0x52, 0x0a, 0x64, 0x65, 0x73, 0x74, 0x4d, 0x6f, 0x64, + 0x75, 0x6c, 0x65, 0x12, 0x23, 0x0a, 0x04, 0x69, 0x6e, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x0d, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x49, 0x6e, 0x69, 0x74, + 0x48, 0x00, 0x52, 0x04, 0x69, 0x6e, 0x69, 0x74, 0x12, 0x2b, 0x0a, 0x05, 0x74, 0x69, 0x6d, 0x65, + 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x70, + 0x62, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x05, + 0x74, 0x69, 0x6d, 0x65, 0x72, 0x12, 0x29, 0x0a, 0x06, 0x68, 0x61, 0x73, 0x68, 0x65, 0x72, 0x18, + 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x65, 0x72, 0x70, 0x62, + 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x06, 0x68, 0x61, 0x73, 0x68, 0x65, 0x72, + 0x12, 0x20, 0x0a, 0x03, 0x62, 0x63, 0x62, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, + 0x62, 0x63, 0x62, 0x70, 0x62, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x03, 0x62, + 0x63, 0x62, 0x12, 0x2c, 0x0a, 0x07, 0x6d, 0x65, 0x6d, 0x70, 0x6f, 0x6f, 0x6c, 0x18, 0x0c, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6d, 0x65, 0x6d, 0x70, 0x6f, 0x6f, 0x6c, 0x70, 0x62, 0x2e, + 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x07, 0x6d, 0x65, 0x6d, 0x70, 0x6f, 0x6f, 0x6c, + 0x12, 0x3b, 0x0a, 0x0c, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, + 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x70, 0x62, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, - 0x0e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, - 0x31, 0x0a, 0x09, 0x70, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x6f, 0x6e, 0x67, 0x18, 0xc8, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x70, 0x69, 0x6e, 0x67, 0x70, 0x6f, 0x6e, 0x67, 0x70, 0x62, - 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x08, 0x70, 0x69, 0x6e, 0x67, 0x50, 0x6f, - 0x6e, 0x67, 0x12, 0x45, 0x0a, 0x0d, 0x74, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x72, - 0x69, 0x6e, 0x67, 0x18, 0xad, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, - 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x48, 0x00, 0x52, 0x0d, 0x74, 0x65, 0x73, 0x74, - 0x69, 0x6e, 0x67, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x41, 0x0a, 0x0b, 0x74, 0x65, 0x73, - 0x74, 0x69, 0x6e, 0x67, 0x55, 0x69, 0x6e, 0x74, 0x18, 0xae, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x48, 0x00, 0x52, - 0x0b, 0x74, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x55, 0x69, 0x6e, 0x74, 0x12, 0x2b, 0x0a, 0x06, - 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, 0x18, 0xaf, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, - 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, 0x70, 0x62, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x65, 0x72, 0x48, - 0x00, 0x52, 0x06, 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, 0x12, 0x29, 0x0a, 0x04, 0x6e, 0x65, 0x78, - 0x74, 0x18, 0x90, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, - 0x70, 0x62, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x42, 0x04, 0x90, 0xa6, 0x1d, 0x01, 0x52, 0x04, - 0x6e, 0x65, 0x78, 0x74, 0x3a, 0x04, 0x88, 0xa6, 0x1d, 0x01, 0x42, 0x0c, 0x0a, 0x04, 0x74, 0x79, - 0x70, 0x65, 0x12, 0x04, 0x80, 0xa6, 0x1d, 0x01, 0x22, 0x0c, 0x0a, 0x04, 0x49, 0x6e, 0x69, 0x74, - 0x3a, 0x04, 0x98, 0xa6, 0x1d, 0x01, 0x22, 0xc6, 0x01, 0x0a, 0x0a, 0x54, 0x69, 0x6d, 0x65, 0x72, - 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x2b, 0x0a, 0x05, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x54, - 0x69, 0x6d, 0x65, 0x72, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x48, 0x00, 0x52, 0x05, 0x64, 0x65, 0x6c, - 0x61, 0x79, 0x12, 0x2e, 0x0a, 0x06, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x54, 0x69, 0x6d, - 0x65, 0x72, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x48, 0x00, 0x52, 0x06, 0x72, 0x65, 0x70, 0x65, - 0x61, 0x74, 0x12, 0x47, 0x0a, 0x0f, 0x67, 0x61, 0x72, 0x62, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, - 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x65, 0x76, - 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x72, 0x47, 0x61, 0x72, 0x62, 0x61, - 0x67, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x48, 0x00, 0x52, 0x0e, 0x67, 0x61, 0x72, - 0x62, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x3a, 0x04, 0x90, 0xa6, 0x1d, - 0x01, 0x42, 0x0c, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x04, 0x80, 0xa6, 0x1d, 0x01, 0x22, - 0x9e, 0x01, 0x0a, 0x0a, 0x54, 0x69, 0x6d, 0x65, 0x72, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x12, 0x36, - 0x0a, 0x0f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x64, 0x65, 0x6c, 0x61, - 0x79, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x70, - 0x62, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x0d, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x54, - 0x6f, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x12, 0x52, 0x0a, 0x05, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, 0x3c, 0x82, 0xa6, 0x1d, 0x38, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x63, 0x6f, 0x69, 0x6e, 0x2d, 0x70, - 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x6d, 0x69, 0x72, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x74, - 0x69, 0x6d, 0x65, 0x72, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x05, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x3a, 0x04, 0x98, 0xa6, 0x1d, 0x01, - 0x22, 0x90, 0x02, 0x0a, 0x0b, 0x54, 0x69, 0x6d, 0x65, 0x72, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, - 0x12, 0x38, 0x0a, 0x10, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x72, 0x65, - 0x70, 0x65, 0x61, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x65, 0x76, 0x65, - 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x0e, 0x65, 0x76, 0x65, 0x6e, - 0x74, 0x73, 0x54, 0x6f, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x12, 0x52, 0x0a, 0x05, 0x64, 0x65, + 0x0c, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x2d, 0x0a, + 0x08, 0x62, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x64, 0x62, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x10, 0x2e, 0x62, 0x61, 0x74, 0x63, 0x68, 0x64, 0x62, 0x70, 0x62, 0x2e, 0x45, 0x76, 0x65, 0x6e, + 0x74, 0x48, 0x00, 0x52, 0x07, 0x62, 0x61, 0x74, 0x63, 0x68, 0x44, 0x62, 0x12, 0x3c, 0x0a, 0x0d, + 0x62, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x66, 0x65, 0x74, 0x63, 0x68, 0x65, 0x72, 0x18, 0x0f, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x62, 0x61, 0x74, 0x63, 0x68, 0x66, 0x65, 0x74, 0x63, 0x68, + 0x65, 0x72, 0x70, 0x62, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0c, 0x62, 0x61, + 0x74, 0x63, 0x68, 0x46, 0x65, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x3c, 0x0a, 0x0d, 0x74, 0x68, + 0x72, 0x65, 0x73, 0x68, 0x5f, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x18, 0x10, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, + 0x70, 0x62, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0c, 0x74, 0x68, 0x72, 0x65, + 0x73, 0x68, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x12, 0x35, 0x0a, 0x0a, 0x63, 0x68, 0x65, 0x63, + 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x63, + 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x45, 0x76, 0x65, 0x6e, + 0x74, 0x48, 0x00, 0x52, 0x0a, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, + 0x2c, 0x0a, 0x07, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x10, 0x2e, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x70, 0x62, 0x2e, 0x45, 0x76, 0x65, + 0x6e, 0x74, 0x48, 0x00, 0x52, 0x07, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x20, 0x0a, + 0x03, 0x69, 0x73, 0x73, 0x18, 0x13, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x69, 0x73, 0x73, + 0x70, 0x62, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x03, 0x69, 0x73, 0x73, 0x12, + 0x2c, 0x0a, 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x65, 0x72, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x10, 0x2e, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x65, 0x72, 0x70, 0x62, 0x2e, 0x45, 0x76, 0x65, + 0x6e, 0x74, 0x48, 0x00, 0x52, 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x65, 0x72, 0x12, 0x29, 0x0a, + 0x06, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x18, 0x15, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, + 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x70, 0x62, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, + 0x52, 0x06, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x12, 0x20, 0x0a, 0x03, 0x61, 0x70, 0x70, 0x18, + 0x16, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x61, 0x70, 0x70, 0x70, 0x62, 0x2e, 0x45, 0x76, + 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x03, 0x61, 0x70, 0x70, 0x12, 0x32, 0x0a, 0x09, 0x74, 0x72, + 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x17, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, + 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x70, 0x62, 0x2e, 0x45, 0x76, 0x65, 0x6e, + 0x74, 0x48, 0x00, 0x52, 0x09, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x3f, + 0x0a, 0x0e, 0x63, 0x68, 0x6b, 0x70, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x18, 0x18, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x63, 0x68, 0x6b, 0x70, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x70, 0x62, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, + 0x52, 0x0d, 0x63, 0x68, 0x6b, 0x70, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, + 0x42, 0x0a, 0x0f, 0x70, 0x70, 0x72, 0x65, 0x70, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x61, 0x64, 0x74, + 0x6f, 0x72, 0x18, 0x19, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x70, 0x70, 0x72, 0x65, 0x70, + 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x70, 0x62, 0x2e, 0x45, 0x76, 0x65, 0x6e, + 0x74, 0x48, 0x00, 0x52, 0x0e, 0x70, 0x70, 0x72, 0x65, 0x70, 0x56, 0x61, 0x6c, 0x69, 0x61, 0x64, + 0x74, 0x6f, 0x72, 0x12, 0x31, 0x0a, 0x09, 0x70, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x6f, 0x6e, 0x67, + 0x18, 0xc8, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x70, 0x69, 0x6e, 0x67, 0x70, 0x6f, + 0x6e, 0x67, 0x70, 0x62, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x08, 0x70, 0x69, + 0x6e, 0x67, 0x50, 0x6f, 0x6e, 0x67, 0x12, 0x45, 0x0a, 0x0d, 0x74, 0x65, 0x73, 0x74, 0x69, 0x6e, + 0x67, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x18, 0xad, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x48, 0x00, 0x52, 0x0d, + 0x74, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x41, 0x0a, + 0x0b, 0x74, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x55, 0x69, 0x6e, 0x74, 0x18, 0xae, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x48, 0x00, 0x52, 0x0b, 0x74, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x55, 0x69, 0x6e, 0x74, + 0x12, 0x2b, 0x0a, 0x06, 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, 0x18, 0xaf, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x10, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, 0x70, 0x62, 0x2e, 0x54, 0x65, 0x73, + 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x06, 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, 0x12, 0x29, 0x0a, + 0x04, 0x6e, 0x65, 0x78, 0x74, 0x18, 0x90, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x65, + 0x76, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x42, 0x04, 0x90, 0xa6, + 0x1d, 0x01, 0x52, 0x04, 0x6e, 0x65, 0x78, 0x74, 0x3a, 0x04, 0x88, 0xa6, 0x1d, 0x01, 0x42, 0x0c, + 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x04, 0x80, 0xa6, 0x1d, 0x01, 0x22, 0x0c, 0x0a, 0x04, + 0x49, 0x6e, 0x69, 0x74, 0x3a, 0x04, 0x98, 0xa6, 0x1d, 0x01, 0x22, 0xc6, 0x01, 0x0a, 0x0a, 0x54, + 0x69, 0x6d, 0x65, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x2b, 0x0a, 0x05, 0x64, 0x65, 0x6c, + 0x61, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, + 0x70, 0x62, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x72, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x48, 0x00, 0x52, + 0x05, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x12, 0x2e, 0x0a, 0x06, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x70, 0x62, + 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x72, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x48, 0x00, 0x52, 0x06, + 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x12, 0x47, 0x0a, 0x0f, 0x67, 0x61, 0x72, 0x62, 0x61, 0x67, + 0x65, 0x5f, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1c, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x72, 0x47, + 0x61, 0x72, 0x62, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x48, 0x00, 0x52, + 0x0e, 0x67, 0x61, 0x72, 0x62, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x3a, + 0x04, 0x90, 0xa6, 0x1d, 0x01, 0x42, 0x0c, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x04, 0x80, + 0xa6, 0x1d, 0x01, 0x22, 0x9e, 0x01, 0x0a, 0x0a, 0x54, 0x69, 0x6d, 0x65, 0x72, 0x44, 0x65, 0x6c, + 0x61, 0x79, 0x12, 0x36, 0x0a, 0x0f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x5f, 0x74, 0x6f, 0x5f, + 0x64, 0x65, 0x6c, 0x61, 0x79, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x65, 0x76, + 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x0d, 0x65, 0x76, 0x65, + 0x6e, 0x74, 0x73, 0x54, 0x6f, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x12, 0x52, 0x0a, 0x05, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, 0x3c, 0x82, 0xa6, 0x1d, 0x38, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x63, 0x6f, 0x69, 0x6e, 0x2d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x6d, 0x69, 0x72, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x72, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x44, - 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x05, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x12, 0x6d, - 0x0a, 0x0f, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x64, 0x65, - 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x42, 0x44, 0x82, 0xa6, 0x1d, 0x40, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x63, 0x6f, 0x69, 0x6e, - 0x2d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x6d, 0x69, 0x72, 0x2f, 0x70, 0x6b, 0x67, - 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x74, 0x6f, 0x72, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x52, - 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x0e, 0x72, - 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x3a, 0x04, 0x98, - 0xa6, 0x1d, 0x01, 0x22, 0x8a, 0x01, 0x0a, 0x13, 0x54, 0x69, 0x6d, 0x65, 0x72, 0x47, 0x61, 0x72, - 0x62, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x12, 0x6d, 0x0a, 0x0f, 0x72, - 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x04, 0x42, 0x44, 0x82, 0xa6, 0x1d, 0x40, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x63, 0x6f, 0x69, 0x6e, 0x2d, 0x70, 0x72, - 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x6d, 0x69, 0x72, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x74, 0x72, - 0x61, 0x6e, 0x74, 0x6f, 0x72, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x52, 0x65, 0x74, 0x65, - 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x0e, 0x72, 0x65, 0x74, 0x65, - 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x3a, 0x04, 0x98, 0xa6, 0x1d, 0x01, - 0x42, 0x30, 0x5a, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x66, - 0x69, 0x6c, 0x65, 0x63, 0x6f, 0x69, 0x6e, 0x2d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, - 0x6d, 0x69, 0x72, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x62, 0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74, - 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x05, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x3a, 0x04, + 0x98, 0xa6, 0x1d, 0x01, 0x22, 0x90, 0x02, 0x0a, 0x0b, 0x54, 0x69, 0x6d, 0x65, 0x72, 0x52, 0x65, + 0x70, 0x65, 0x61, 0x74, 0x12, 0x38, 0x0a, 0x10, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x5f, 0x74, + 0x6f, 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, + 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x0e, + 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x54, 0x6f, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x12, 0x52, + 0x0a, 0x05, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, 0x3c, 0x82, + 0xa6, 0x1d, 0x38, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x66, 0x69, + 0x6c, 0x65, 0x63, 0x6f, 0x69, 0x6e, 0x2d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x6d, + 0x69, 0x72, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x72, 0x2f, 0x74, 0x79, 0x70, + 0x65, 0x73, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x05, 0x64, 0x65, 0x6c, + 0x61, 0x79, 0x12, 0x6d, 0x0a, 0x0f, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x42, 0x44, 0x82, 0xa6, 0x1d, + 0x40, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x66, 0x69, 0x6c, 0x65, + 0x63, 0x6f, 0x69, 0x6e, 0x2d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x6d, 0x69, 0x72, + 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x74, 0x6f, 0x72, 0x2f, 0x74, 0x79, 0x70, + 0x65, 0x73, 0x2e, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x64, 0x65, + 0x78, 0x52, 0x0e, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x64, 0x65, + 0x78, 0x3a, 0x04, 0x98, 0xa6, 0x1d, 0x01, 0x22, 0x8a, 0x01, 0x0a, 0x13, 0x54, 0x69, 0x6d, 0x65, + 0x72, 0x47, 0x61, 0x72, 0x62, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x12, + 0x6d, 0x0a, 0x0f, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x64, + 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x44, 0x82, 0xa6, 0x1d, 0x40, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x63, 0x6f, 0x69, + 0x6e, 0x2d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x6d, 0x69, 0x72, 0x2f, 0x70, 0x6b, + 0x67, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x74, 0x6f, 0x72, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, + 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x0e, + 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x3a, 0x04, + 0x98, 0xa6, 0x1d, 0x01, 0x42, 0x30, 0x5a, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x63, 0x6f, 0x69, 0x6e, 0x2d, 0x70, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x2f, 0x6d, 0x69, 0x72, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x62, 0x2f, 0x65, + 0x76, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -965,11 +943,10 @@ var file_eventpb_eventpb_proto_goTypes = []interface{}{ (*transportpb.Event)(nil), // 19: transportpb.Event (*chkpvalidatorpb.Event)(nil), // 20: chkpvalidatorpb.Event (*pprepvalidatorpb.Event)(nil), // 21: pprepvalidatorpb.Event - (*accountabilitypb.Event)(nil), // 22: accountabilitypb.Event - (*pingpongpb.Event)(nil), // 23: pingpongpb.Event - (*wrappers.StringValue)(nil), // 24: google.protobuf.StringValue - (*wrappers.UInt64Value)(nil), // 25: google.protobuf.UInt64Value - (*testerpb.Tester)(nil), // 26: testerpb.Tester + (*pingpongpb.Event)(nil), // 22: pingpongpb.Event + (*wrappers.StringValue)(nil), // 23: google.protobuf.StringValue + (*wrappers.UInt64Value)(nil), // 24: google.protobuf.UInt64Value + (*testerpb.Tester)(nil), // 25: testerpb.Tester } var file_eventpb_eventpb_proto_depIdxs = []int32{ 1, // 0: eventpb.Event.init:type_name -> eventpb.Init @@ -990,22 +967,21 @@ var file_eventpb_eventpb_proto_depIdxs = []int32{ 19, // 15: eventpb.Event.transport:type_name -> transportpb.Event 20, // 16: eventpb.Event.chkp_validator:type_name -> chkpvalidatorpb.Event 21, // 17: eventpb.Event.pprep_valiadtor:type_name -> pprepvalidatorpb.Event - 22, // 18: eventpb.Event.accountability:type_name -> accountabilitypb.Event - 23, // 19: eventpb.Event.ping_pong:type_name -> pingpongpb.Event - 24, // 20: eventpb.Event.testingString:type_name -> google.protobuf.StringValue - 25, // 21: eventpb.Event.testingUint:type_name -> google.protobuf.UInt64Value - 26, // 22: eventpb.Event.tester:type_name -> testerpb.Tester - 0, // 23: eventpb.Event.next:type_name -> eventpb.Event - 3, // 24: eventpb.TimerEvent.delay:type_name -> eventpb.TimerDelay - 4, // 25: eventpb.TimerEvent.repeat:type_name -> eventpb.TimerRepeat - 5, // 26: eventpb.TimerEvent.garbage_collect:type_name -> eventpb.TimerGarbageCollect - 0, // 27: eventpb.TimerDelay.events_to_delay:type_name -> eventpb.Event - 0, // 28: eventpb.TimerRepeat.events_to_repeat:type_name -> eventpb.Event - 29, // [29:29] is the sub-list for method output_type - 29, // [29:29] is the sub-list for method input_type - 29, // [29:29] is the sub-list for extension type_name - 29, // [29:29] is the sub-list for extension extendee - 0, // [0:29] is the sub-list for field type_name + 22, // 18: eventpb.Event.ping_pong:type_name -> pingpongpb.Event + 23, // 19: eventpb.Event.testingString:type_name -> google.protobuf.StringValue + 24, // 20: eventpb.Event.testingUint:type_name -> google.protobuf.UInt64Value + 25, // 21: eventpb.Event.tester:type_name -> testerpb.Tester + 0, // 22: eventpb.Event.next:type_name -> eventpb.Event + 3, // 23: eventpb.TimerEvent.delay:type_name -> eventpb.TimerDelay + 4, // 24: eventpb.TimerEvent.repeat:type_name -> eventpb.TimerRepeat + 5, // 25: eventpb.TimerEvent.garbage_collect:type_name -> eventpb.TimerGarbageCollect + 0, // 26: eventpb.TimerDelay.events_to_delay:type_name -> eventpb.Event + 0, // 27: eventpb.TimerRepeat.events_to_repeat:type_name -> eventpb.Event + 28, // [28:28] is the sub-list for method output_type + 28, // [28:28] is the sub-list for method input_type + 28, // [28:28] is the sub-list for extension type_name + 28, // [28:28] is the sub-list for extension extendee + 0, // [0:28] is the sub-list for field type_name } func init() { file_eventpb_eventpb_proto_init() } @@ -1106,7 +1082,6 @@ func file_eventpb_eventpb_proto_init() { (*Event_Transport)(nil), (*Event_ChkpValidator)(nil), (*Event_PprepValiadtor)(nil), - (*Event_Accountability)(nil), (*Event_PingPong)(nil), (*Event_TestingString)(nil), (*Event_TestingUint)(nil), diff --git a/pkg/pb/eventpb/eventpb.pb.mir.go b/pkg/pb/eventpb/eventpb.pb.mir.go index 8f0efe432..8808e7d1a 100644 --- a/pkg/pb/eventpb/eventpb.pb.mir.go +++ b/pkg/pb/eventpb/eventpb.pb.mir.go @@ -26,7 +26,6 @@ func (*Event) ReflectTypeOptions() []reflect.Type { reflect.TypeOf((*Event_Transport)(nil)), reflect.TypeOf((*Event_ChkpValidator)(nil)), reflect.TypeOf((*Event_PprepValiadtor)(nil)), - reflect.TypeOf((*Event_Accountability)(nil)), reflect.TypeOf((*Event_PingPong)(nil)), reflect.TypeOf((*Event_TestingString)(nil)), reflect.TypeOf((*Event_TestingUint)(nil)), diff --git a/pkg/pb/eventpb/oneof_interfaces.mir.go b/pkg/pb/eventpb/oneof_interfaces.mir.go index 5a127369b..2baab82b9 100644 --- a/pkg/pb/eventpb/oneof_interfaces.mir.go +++ b/pkg/pb/eventpb/oneof_interfaces.mir.go @@ -3,7 +3,6 @@ package eventpb import ( - accountabilitypb "github.com/filecoin-project/mir/pkg/pb/accountabilitypb" apppb "github.com/filecoin-project/mir/pkg/pb/apppb" availabilitypb "github.com/filecoin-project/mir/pkg/pb/availabilitypb" batchdbpb "github.com/filecoin-project/mir/pkg/pb/availabilitypb/batchdbpb" @@ -104,10 +103,6 @@ func (w *Event_PprepValiadtor) Unwrap() *pprepvalidatorpb.Event { return w.PprepValiadtor } -func (w *Event_Accountability) Unwrap() *accountabilitypb.Event { - return w.Accountability -} - func (w *Event_PingPong) Unwrap() *pingpongpb.Event { return w.PingPong } diff --git a/pkg/pb/eventpb/types/types.mir.go b/pkg/pb/eventpb/types/types.mir.go index 39770ade7..119300d27 100644 --- a/pkg/pb/eventpb/types/types.mir.go +++ b/pkg/pb/eventpb/types/types.mir.go @@ -4,8 +4,7 @@ package eventpbtypes import ( mirreflect "github.com/filecoin-project/mir/codegen/mirreflect" - types20 "github.com/filecoin-project/mir/codegen/model/types" - types17 "github.com/filecoin-project/mir/pkg/pb/accountabilitypb/types" + types19 "github.com/filecoin-project/mir/codegen/model/types" types13 "github.com/filecoin-project/mir/pkg/pb/apppb/types" types5 "github.com/filecoin-project/mir/pkg/pb/availabilitypb/batchdbpb/types" types4 "github.com/filecoin-project/mir/pkg/pb/availabilitypb/types" @@ -21,12 +20,12 @@ import ( types3 "github.com/filecoin-project/mir/pkg/pb/mempoolpb/types" types16 "github.com/filecoin-project/mir/pkg/pb/ordererpb/pprepvalidatorpb/types" types11 "github.com/filecoin-project/mir/pkg/pb/ordererpb/types" - types18 "github.com/filecoin-project/mir/pkg/pb/pingpongpb/types" - types19 "github.com/filecoin-project/mir/pkg/pb/testerpb/types" + types17 "github.com/filecoin-project/mir/pkg/pb/pingpongpb/types" + types18 "github.com/filecoin-project/mir/pkg/pb/testerpb/types" types7 "github.com/filecoin-project/mir/pkg/pb/threshcryptopb/types" types14 "github.com/filecoin-project/mir/pkg/pb/transportpb/types" - types21 "github.com/filecoin-project/mir/pkg/timer/types" - types22 "github.com/filecoin-project/mir/pkg/trantor/types" + types20 "github.com/filecoin-project/mir/pkg/timer/types" + types21 "github.com/filecoin-project/mir/pkg/trantor/types" types "github.com/filecoin-project/mir/pkg/types" reflectutil "github.com/filecoin-project/mir/pkg/util/reflectutil" wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" @@ -90,16 +89,14 @@ func Event_TypeFromPb(pb eventpb.Event_Type) Event_Type { return &Event_ChkpValidator{ChkpValidator: types15.EventFromPb(pb.ChkpValidator)} case *eventpb.Event_PprepValiadtor: return &Event_PprepValiadtor{PprepValiadtor: types16.EventFromPb(pb.PprepValiadtor)} - case *eventpb.Event_Accountability: - return &Event_Accountability{Accountability: types17.EventFromPb(pb.Accountability)} case *eventpb.Event_PingPong: - return &Event_PingPong{PingPong: types18.EventFromPb(pb.PingPong)} + return &Event_PingPong{PingPong: types17.EventFromPb(pb.PingPong)} case *eventpb.Event_TestingString: return &Event_TestingString{TestingString: pb.TestingString} case *eventpb.Event_TestingUint: return &Event_TestingUint{TestingUint: pb.TestingUint} case *eventpb.Event_Tester: - return &Event_Tester{Tester: types19.TesterFromPb(pb.Tester)} + return &Event_Tester{Tester: types18.TesterFromPb(pb.Tester)} } return nil } @@ -536,37 +533,13 @@ func (*Event_PprepValiadtor) MirReflect() mirreflect.Type { return mirreflect.TypeImpl{PbType_: reflectutil.TypeOf[*eventpb.Event_PprepValiadtor]()} } -type Event_Accountability struct { - Accountability *types17.Event -} - -func (*Event_Accountability) isEvent_Type() {} - -func (w *Event_Accountability) Unwrap() *types17.Event { - return w.Accountability -} - -func (w *Event_Accountability) Pb() eventpb.Event_Type { - if w == nil { - return nil - } - if w.Accountability == nil { - return &eventpb.Event_Accountability{} - } - return &eventpb.Event_Accountability{Accountability: (w.Accountability).Pb()} -} - -func (*Event_Accountability) MirReflect() mirreflect.Type { - return mirreflect.TypeImpl{PbType_: reflectutil.TypeOf[*eventpb.Event_Accountability]()} -} - type Event_PingPong struct { - PingPong *types18.Event + PingPong *types17.Event } func (*Event_PingPong) isEvent_Type() {} -func (w *Event_PingPong) Unwrap() *types18.Event { +func (w *Event_PingPong) Unwrap() *types17.Event { return w.PingPong } @@ -633,12 +606,12 @@ func (*Event_TestingUint) MirReflect() mirreflect.Type { } type Event_Tester struct { - Tester *types19.Tester + Tester *types18.Tester } func (*Event_Tester) isEvent_Type() {} -func (w *Event_Tester) Unwrap() *types19.Tester { +func (w *Event_Tester) Unwrap() *types18.Tester { return w.Tester } @@ -663,7 +636,7 @@ func EventFromPb(pb *eventpb.Event) *Event { return &Event{ DestModule: (types.ModuleID)(pb.DestModule), Type: Event_TypeFromPb(pb.Type), - Next: types20.ConvertSlice(pb.Next, func(t *eventpb.Event) *Event { + Next: types19.ConvertSlice(pb.Next, func(t *eventpb.Event) *Event { return EventFromPb(t) }), } @@ -679,7 +652,7 @@ func (m *Event) Pb() *eventpb.Event { if m.Type != nil { pbMessage.Type = (m.Type).Pb() } - pbMessage.Next = types20.ConvertSlice(m.Next, func(t *Event) *eventpb.Event { + pbMessage.Next = types19.ConvertSlice(m.Next, func(t *Event) *eventpb.Event { return (t).Pb() }) } @@ -846,7 +819,7 @@ func (*TimerEvent) MirReflect() mirreflect.Type { type TimerDelay struct { EventsToDelay []*Event - Delay types21.Duration + Delay types20.Duration } func TimerDelayFromPb(pb *eventpb.TimerDelay) *TimerDelay { @@ -854,10 +827,10 @@ func TimerDelayFromPb(pb *eventpb.TimerDelay) *TimerDelay { return nil } return &TimerDelay{ - EventsToDelay: types20.ConvertSlice(pb.EventsToDelay, func(t *eventpb.Event) *Event { + EventsToDelay: types19.ConvertSlice(pb.EventsToDelay, func(t *eventpb.Event) *Event { return EventFromPb(t) }), - Delay: (types21.Duration)(pb.Delay), + Delay: (types20.Duration)(pb.Delay), } } @@ -867,7 +840,7 @@ func (m *TimerDelay) Pb() *eventpb.TimerDelay { } pbMessage := &eventpb.TimerDelay{} { - pbMessage.EventsToDelay = types20.ConvertSlice(m.EventsToDelay, func(t *Event) *eventpb.Event { + pbMessage.EventsToDelay = types19.ConvertSlice(m.EventsToDelay, func(t *Event) *eventpb.Event { return (t).Pb() }) pbMessage.Delay = (uint64)(m.Delay) @@ -882,8 +855,8 @@ func (*TimerDelay) MirReflect() mirreflect.Type { type TimerRepeat struct { EventsToRepeat []*Event - Delay types21.Duration - RetentionIndex types22.RetentionIndex + Delay types20.Duration + RetentionIndex types21.RetentionIndex } func TimerRepeatFromPb(pb *eventpb.TimerRepeat) *TimerRepeat { @@ -891,11 +864,11 @@ func TimerRepeatFromPb(pb *eventpb.TimerRepeat) *TimerRepeat { return nil } return &TimerRepeat{ - EventsToRepeat: types20.ConvertSlice(pb.EventsToRepeat, func(t *eventpb.Event) *Event { + EventsToRepeat: types19.ConvertSlice(pb.EventsToRepeat, func(t *eventpb.Event) *Event { return EventFromPb(t) }), - Delay: (types21.Duration)(pb.Delay), - RetentionIndex: (types22.RetentionIndex)(pb.RetentionIndex), + Delay: (types20.Duration)(pb.Delay), + RetentionIndex: (types21.RetentionIndex)(pb.RetentionIndex), } } @@ -905,7 +878,7 @@ func (m *TimerRepeat) Pb() *eventpb.TimerRepeat { } pbMessage := &eventpb.TimerRepeat{} { - pbMessage.EventsToRepeat = types20.ConvertSlice(m.EventsToRepeat, func(t *Event) *eventpb.Event { + pbMessage.EventsToRepeat = types19.ConvertSlice(m.EventsToRepeat, func(t *Event) *eventpb.Event { return (t).Pb() }) pbMessage.Delay = (uint64)(m.Delay) @@ -920,7 +893,7 @@ func (*TimerRepeat) MirReflect() mirreflect.Type { } type TimerGarbageCollect struct { - RetentionIndex types22.RetentionIndex + RetentionIndex types21.RetentionIndex } func TimerGarbageCollectFromPb(pb *eventpb.TimerGarbageCollect) *TimerGarbageCollect { @@ -928,7 +901,7 @@ func TimerGarbageCollectFromPb(pb *eventpb.TimerGarbageCollect) *TimerGarbageCol return nil } return &TimerGarbageCollect{ - RetentionIndex: (types22.RetentionIndex)(pb.RetentionIndex), + RetentionIndex: (types21.RetentionIndex)(pb.RetentionIndex), } } diff --git a/protos/accountabilitypb/accountabilitypb.proto b/protos/accountabilitypb/accountabilitypb.proto index 4c82d9392..a3c555abe 100644 --- a/protos/accountabilitypb/accountabilitypb.proto +++ b/protos/accountabilitypb/accountabilitypb.proto @@ -10,16 +10,6 @@ import "isspb/isspb.proto"; import "net/codegen_extensions.proto"; import "mir/codegen_extensions.proto"; - -message Event{ - option (mir.event_class) = true; - oneof type { - option (mir.event_type) = true; - - PoMs poms = 3; - } -} - message PoM { option (mir.struct) = true; @@ -35,7 +25,6 @@ message LightCertificate { } message PoMs { - option (mir.event) = true; option (net.message) = true; repeated PoM poms = 1; diff --git a/protos/eventpb/eventpb.proto b/protos/eventpb/eventpb.proto index 1bb8c261c..7e71e0fdf 100644 --- a/protos/eventpb/eventpb.proto +++ b/protos/eventpb/eventpb.proto @@ -23,7 +23,6 @@ import "hasherpb/hasherpb.proto"; import "cryptopb/cryptopb.proto"; import "transportpb/transportpb.proto"; import "testerpb/testerpb.proto"; -import "accountabilitypb/accountabilitypb.proto"; import "mir/codegen_extensions.proto"; @@ -59,7 +58,6 @@ message Event { transportpb.Event transport = 23; chkpvalidatorpb.Event chkp_validator = 24; pprepvalidatorpb.Event pprep_valiadtor = 25; - accountabilitypb.Event accountability = 26; // Events for code samples From eb332685288fb301300f4c3e2fc9d18408c674b5 Mon Sep 17 00:00:00 2001 From: Alejandro Ranchal-Pedrosa Date: Mon, 7 Aug 2023 17:44:07 +0200 Subject: [PATCH 09/14] Cleanup light certificates and use native proto type, mark function usage --- .../lightcertificates/lightcertificates.go | 8 +- .../simpleacc/internal/common/common.go | 7 +- .../simpleacc/internal/poms/poms.go | 2 +- .../internal/predecisions/predecisions.go | 2 +- .../accountabilitypb/accountabilitypb.pb.go | 76 +++++++++---------- pkg/pb/accountabilitypb/dsl/messages.mir.go | 4 +- pkg/pb/accountabilitypb/msgs/msgs.mir.go | 6 +- pkg/pb/accountabilitypb/types/types.mir.go | 8 +- .../accountabilitypb/accountabilitypb.proto | 2 +- 9 files changed, 55 insertions(+), 60 deletions(-) diff --git a/pkg/accountability/simpleacc/internal/certificates/lightcertificates/lightcertificates.go b/pkg/accountability/simpleacc/internal/certificates/lightcertificates/lightcertificates.go index a7fbe8607..afb1c76ec 100644 --- a/pkg/accountability/simpleacc/internal/certificates/lightcertificates/lightcertificates.go +++ b/pkg/accountability/simpleacc/internal/certificates/lightcertificates/lightcertificates.go @@ -11,7 +11,6 @@ import ( accpbmsgs "github.com/filecoin-project/mir/pkg/pb/accountabilitypb/msgs" transportpbdsl "github.com/filecoin-project/mir/pkg/pb/transportpb/dsl" t "github.com/filecoin-project/mir/pkg/types" - "github.com/filecoin-project/mir/pkg/util/maputil" ) // IncludeLightCertificate implements the (optional) light certificate optimization @@ -39,15 +38,16 @@ func IncludeLightCertificate(m dsl.Module, return nil } - decision, _ := maputil.AnyVal(state.DecidedCertificate) + decision := state.DecidedCertificate.Decision - if !reflect.DeepEqual(decision.Predecision, data) { + if !reflect.DeepEqual(decision, data) { logger.Log(logging.LevelWarn, "Received light certificate with different predecision than local decision! sending full certificate to node %v", from) transportpbdsl.SendMessage( m, mc.Net, accpbmsgs.FullCertificate(mc.Self, - state.DecidedCertificate), + state.DecidedCertificate.Decision, + state.DecidedCertificate.Signatures), []t.NodeID{from}) } return nil diff --git a/pkg/accountability/simpleacc/internal/common/common.go b/pkg/accountability/simpleacc/internal/common/common.go index 33777d25e..c05ed9887 100644 --- a/pkg/accountability/simpleacc/internal/common/common.go +++ b/pkg/accountability/simpleacc/internal/common/common.go @@ -11,7 +11,7 @@ type State struct { PredecisionNodeIDs map[string][]t.NodeID // Map of predecisions and the nodes that have signed them with the predecision as key, // used for fast verification of whether a predecision is predecided by a strong quorum. LocalPredecision *LocalPredecision // Decision locally decided - DecidedCertificate *Certificate // Locally decided certificate (predecision and list of signatures with signers as key) + DecidedCertificate *accpbtypes.FullCertificate // Locally decided certificate (predecision and list of signatures with signers as key) Predecided bool // Whether this process has received a predecided value from calling module. UnsentPoMs []*accpbtypes.PoM // List of PoMs not yet sent to the application. SentPoMs map[t.NodeID]*accpbtypes.PoM // List of PoMs already sent to the application with the signer as key. @@ -21,8 +21,3 @@ type LocalPredecision struct { SBDeliver *isspbtypes.SBDeliver // Actual payload of the local predecision. SignedPredecision *accpbtypes.SignedPredecision // Own signed predecision. } - -type Certificate struct { - Decision []byte - Signatures map[t.NodeID][]byte -} diff --git a/pkg/accountability/simpleacc/internal/poms/poms.go b/pkg/accountability/simpleacc/internal/poms/poms.go index 99e102e03..c0371bb21 100644 --- a/pkg/accountability/simpleacc/internal/poms/poms.go +++ b/pkg/accountability/simpleacc/internal/poms/poms.go @@ -95,7 +95,7 @@ func SendPoMs( } logger.Log(logging.LevelWarn, "Found valid PoMs! sending...") - accpbdsl.PoMs(m, mc.App, state.UnsentPoMs) + //TODO do something here (function that will be passed on factory creation) transportpbdsl.SendMessage( m, diff --git a/pkg/accountability/simpleacc/internal/predecisions/predecisions.go b/pkg/accountability/simpleacc/internal/predecisions/predecisions.go index bf1d123b6..22f7f4468 100644 --- a/pkg/accountability/simpleacc/internal/predecisions/predecisions.go +++ b/pkg/accountability/simpleacc/internal/predecisions/predecisions.go @@ -157,7 +157,7 @@ func ApplySigVerified( // Once verified, if strong quorum, broadcast accpbdsl.FullCertificate. if state.DecidedCertificate == nil && membutil.HaveStrongQuorum(params.Membership, state.PredecisionNodeIDs[string(sp.Predecision)]) { - state.DecidedCertificate = &incommon.Certificate{ + state.DecidedCertificate = &accpbtypes.FullCertificate{ Decision: sp.Predecision, Signatures: maputil.Transform( maputil.Filter( diff --git a/pkg/pb/accountabilitypb/accountabilitypb.pb.go b/pkg/pb/accountabilitypb/accountabilitypb.pb.go index 3779b5a7d..1f30fb3d5 100644 --- a/pkg/pb/accountabilitypb/accountabilitypb.pb.go +++ b/pkg/pb/accountabilitypb/accountabilitypb.pb.go @@ -377,8 +377,8 @@ type FullCertificate struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Decision []byte `protobuf:"bytes,1,opt,name=decision,proto3" json:"decision,omitempty"` - Certificate map[string][]byte `protobuf:"bytes,2,rep,name=certificate,proto3" json:"certificate,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Decision []byte `protobuf:"bytes,1,opt,name=decision,proto3" json:"decision,omitempty"` + Signatures map[string][]byte `protobuf:"bytes,2,rep,name=signatures,proto3" json:"signatures,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } func (x *FullCertificate) Reset() { @@ -420,9 +420,9 @@ func (x *FullCertificate) GetDecision() []byte { return nil } -func (x *FullCertificate) GetCertificate() map[string][]byte { +func (x *FullCertificate) GetSignatures() map[string][]byte { if x != nil { - return x.Certificate + return x.Signatures } return nil } @@ -640,40 +640,40 @@ var file_accountabilitypb_accountabilitypb_proto_rawDesc = []byte{ 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x3a, 0x08, 0xd0, 0xe4, 0x1d, 0x01, 0x80, 0xa6, 0x1d, 0x01, - 0x22, 0x80, 0x02, 0x0a, 0x0f, 0x46, 0x75, 0x6c, 0x6c, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, + 0x22, 0xfc, 0x01, 0x0a, 0x0f, 0x46, 0x75, 0x6c, 0x6c, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, - 0x12, 0x8a, 0x01, 0x0a, 0x0b, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, - 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x70, 0x62, 0x2e, 0x46, 0x75, 0x6c, 0x6c, 0x43, 0x65, - 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x2e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, - 0x69, 0x63, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x34, 0xaa, 0xa6, 0x1d, 0x30, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x63, - 0x6f, 0x69, 0x6e, 0x2d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x6d, 0x69, 0x72, 0x2f, - 0x70, 0x6b, 0x67, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x44, - 0x52, 0x0b, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x1a, 0x3e, 0x0a, - 0x10, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x04, 0xd0, - 0xe4, 0x1d, 0x01, 0x22, 0x4d, 0x0a, 0x0e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x35, 0x0a, 0x0a, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, - 0x68, 0x69, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x72, 0x61, 0x6e, - 0x74, 0x6f, 0x72, 0x70, 0x62, 0x2e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, - 0x52, 0x0a, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x3a, 0x04, 0x80, 0xa6, - 0x1d, 0x01, 0x22, 0x3a, 0x0a, 0x10, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x53, 0x42, 0x4d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x72, 0x65, 0x64, 0x65, 0x63, - 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x70, 0x72, 0x65, - 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x3a, 0x04, 0xd0, 0xe4, 0x1d, 0x01, 0x22, 0x49, - 0x0a, 0x10, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x53, 0x42, 0x4d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x12, 0x2f, 0x0a, 0x0a, 0x73, 0x62, 0x5f, 0x64, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x69, 0x73, 0x73, 0x70, 0x62, 0x2e, 0x53, - 0x42, 0x44, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x52, 0x09, 0x73, 0x62, 0x44, 0x65, 0x6c, 0x69, - 0x76, 0x65, 0x72, 0x3a, 0x04, 0xd0, 0xe4, 0x1d, 0x01, 0x42, 0x39, 0x5a, 0x37, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x63, 0x6f, 0x69, 0x6e, - 0x2d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x6d, 0x69, 0x72, 0x2f, 0x70, 0x6b, 0x67, - 0x2f, 0x70, 0x62, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x62, 0x69, 0x6c, 0x69, - 0x74, 0x79, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x12, 0x87, 0x01, 0x0a, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, + 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x70, 0x62, 0x2e, 0x46, 0x75, 0x6c, 0x6c, 0x43, 0x65, 0x72, + 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, + 0x72, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x34, 0xaa, 0xa6, 0x1d, 0x30, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x63, 0x6f, 0x69, + 0x6e, 0x2d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x6d, 0x69, 0x72, 0x2f, 0x70, 0x6b, + 0x67, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x44, 0x52, 0x0a, + 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x1a, 0x3d, 0x0a, 0x0f, 0x53, 0x69, + 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, + 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, + 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x04, 0xd0, 0xe4, 0x1d, 0x01, 0x22, + 0x4d, 0x0a, 0x0e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x12, 0x35, 0x0a, 0x0a, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x74, 0x6f, 0x72, 0x70, + 0x62, 0x2e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x52, 0x0a, 0x6d, 0x65, + 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x3a, 0x04, 0x80, 0xa6, 0x1d, 0x01, 0x22, 0x3a, + 0x0a, 0x10, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x53, 0x42, 0x4d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x72, 0x65, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, + 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x70, 0x72, 0x65, 0x64, 0x65, 0x63, 0x69, + 0x73, 0x69, 0x6f, 0x6e, 0x3a, 0x04, 0xd0, 0xe4, 0x1d, 0x01, 0x22, 0x49, 0x0a, 0x10, 0x50, 0x72, + 0x6f, 0x76, 0x69, 0x64, 0x65, 0x53, 0x42, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x2f, + 0x0a, 0x0a, 0x73, 0x62, 0x5f, 0x64, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x69, 0x73, 0x73, 0x70, 0x62, 0x2e, 0x53, 0x42, 0x44, 0x65, 0x6c, + 0x69, 0x76, 0x65, 0x72, 0x52, 0x09, 0x73, 0x62, 0x44, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x3a, + 0x04, 0xd0, 0xe4, 0x1d, 0x01, 0x42, 0x39, 0x5a, 0x37, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x63, 0x6f, 0x69, 0x6e, 0x2d, 0x70, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x6d, 0x69, 0x72, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x62, 0x2f, + 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x70, 0x62, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -699,7 +699,7 @@ var file_accountabilitypb_accountabilitypb_proto_goTypes = []interface{}{ (*InstanceParams)(nil), // 6: accountabilitypb.InstanceParams (*RequestSBMessage)(nil), // 7: accountabilitypb.RequestSBMessage (*ProvideSBMessage)(nil), // 8: accountabilitypb.ProvideSBMessage - nil, // 9: accountabilitypb.FullCertificate.CertificateEntry + nil, // 9: accountabilitypb.FullCertificate.SignaturesEntry (*trantorpb.Membership)(nil), // 10: trantorpb.Membership (*isspb.SBDeliver)(nil), // 11: isspb.SBDeliver } @@ -713,7 +713,7 @@ var file_accountabilitypb_accountabilitypb_proto_depIdxs = []int32{ 1, // 6: accountabilitypb.Message.light_certificate:type_name -> accountabilitypb.LightCertificate 7, // 7: accountabilitypb.Message.request_sb_message:type_name -> accountabilitypb.RequestSBMessage 8, // 8: accountabilitypb.Message.provide_sb_message:type_name -> accountabilitypb.ProvideSBMessage - 9, // 9: accountabilitypb.FullCertificate.certificate:type_name -> accountabilitypb.FullCertificate.CertificateEntry + 9, // 9: accountabilitypb.FullCertificate.signatures:type_name -> accountabilitypb.FullCertificate.SignaturesEntry 10, // 10: accountabilitypb.InstanceParams.membership:type_name -> trantorpb.Membership 11, // 11: accountabilitypb.ProvideSBMessage.sb_deliver:type_name -> isspb.SBDeliver 12, // [12:12] is the sub-list for method output_type diff --git a/pkg/pb/accountabilitypb/dsl/messages.mir.go b/pkg/pb/accountabilitypb/dsl/messages.mir.go index 968a9b783..6469d701f 100644 --- a/pkg/pb/accountabilitypb/dsl/messages.mir.go +++ b/pkg/pb/accountabilitypb/dsl/messages.mir.go @@ -30,9 +30,9 @@ func UponSignedPredecisionReceived(m dsl.Module, handler func(from types1.NodeID }) } -func UponFullCertificateReceived(m dsl.Module, handler func(from types1.NodeID, decision []uint8, certificate map[types1.NodeID][]uint8) error) { +func UponFullCertificateReceived(m dsl.Module, handler func(from types1.NodeID, decision []uint8, signatures map[types1.NodeID][]uint8) error) { UponMessageReceived[*types.Message_Certificate](m, func(from types1.NodeID, msg *types.FullCertificate) error { - return handler(from, msg.Decision, msg.Certificate) + return handler(from, msg.Decision, msg.Signatures) }) } diff --git a/pkg/pb/accountabilitypb/msgs/msgs.mir.go b/pkg/pb/accountabilitypb/msgs/msgs.mir.go index 06d811c5c..aea5a890b 100644 --- a/pkg/pb/accountabilitypb/msgs/msgs.mir.go +++ b/pkg/pb/accountabilitypb/msgs/msgs.mir.go @@ -25,15 +25,15 @@ func SignedPredecision(destModule types.ModuleID, predecision []uint8, signature } } -func FullCertificate(destModule types.ModuleID, decision []uint8, certificate map[types.NodeID][]uint8) *types1.Message { +func FullCertificate(destModule types.ModuleID, decision []uint8, signatures map[types.NodeID][]uint8) *types1.Message { return &types1.Message{ DestModule: destModule, Type: &types1.Message_Accountability{ Accountability: &types2.Message{ Type: &types2.Message_Certificate{ Certificate: &types2.FullCertificate{ - Decision: decision, - Certificate: certificate, + Decision: decision, + Signatures: signatures, }, }, }, diff --git a/pkg/pb/accountabilitypb/types/types.mir.go b/pkg/pb/accountabilitypb/types/types.mir.go index aa14087ae..8ff7e79eb 100644 --- a/pkg/pb/accountabilitypb/types/types.mir.go +++ b/pkg/pb/accountabilitypb/types/types.mir.go @@ -353,8 +353,8 @@ func (*SignedPredecision) MirReflect() mirreflect.Type { } type FullCertificate struct { - Decision []uint8 - Certificate map[types.NodeID][]uint8 + Decision []uint8 + Signatures map[types.NodeID][]uint8 } func FullCertificateFromPb(pb *accountabilitypb.FullCertificate) *FullCertificate { @@ -363,7 +363,7 @@ func FullCertificateFromPb(pb *accountabilitypb.FullCertificate) *FullCertificat } return &FullCertificate{ Decision: pb.Decision, - Certificate: types1.ConvertMap(pb.Certificate, func(k string, v []uint8) (types.NodeID, []uint8) { + Signatures: types1.ConvertMap(pb.Signatures, func(k string, v []uint8) (types.NodeID, []uint8) { return (types.NodeID)(k), v }), } @@ -376,7 +376,7 @@ func (m *FullCertificate) Pb() *accountabilitypb.FullCertificate { pbMessage := &accountabilitypb.FullCertificate{} { pbMessage.Decision = m.Decision - pbMessage.Certificate = types1.ConvertMap(m.Certificate, func(k types.NodeID, v []uint8) (string, []uint8) { + pbMessage.Signatures = types1.ConvertMap(m.Signatures, func(k types.NodeID, v []uint8) (string, []uint8) { return (string)(k), v }) } diff --git a/protos/accountabilitypb/accountabilitypb.proto b/protos/accountabilitypb/accountabilitypb.proto index a3c555abe..7229b7d9f 100644 --- a/protos/accountabilitypb/accountabilitypb.proto +++ b/protos/accountabilitypb/accountabilitypb.proto @@ -57,7 +57,7 @@ message FullCertificate { option (net.message) = true; bytes decision = 1; - map certificate = 2 [(mir.key_type) = "github.com/filecoin-project/mir/pkg/types.NodeID"]; + map signatures = 2 [(mir.key_type) = "github.com/filecoin-project/mir/pkg/types.NodeID"]; } message InstanceParams { From a4b983a8eb7a96f2ca143bdb6e4fe18bd34adcf3 Mon Sep 17 00:00:00 2001 From: Alejandro Ranchal-Pedrosa Date: Mon, 7 Aug 2023 17:55:18 +0200 Subject: [PATCH 10/14] Apply buffered light certificates --- .../lightcertificates/lightcertificates.go | 55 +++++++++++++------ .../simpleacc/internal/common/common.go | 1 + .../internal/predecisions/predecisions.go | 23 ++++++-- 3 files changed, 57 insertions(+), 22 deletions(-) diff --git a/pkg/accountability/simpleacc/internal/certificates/lightcertificates/lightcertificates.go b/pkg/accountability/simpleacc/internal/certificates/lightcertificates/lightcertificates.go index afb1c76ec..3e0229b87 100644 --- a/pkg/accountability/simpleacc/internal/certificates/lightcertificates/lightcertificates.go +++ b/pkg/accountability/simpleacc/internal/certificates/lightcertificates/lightcertificates.go @@ -1,8 +1,6 @@ package lightcertificates import ( - "reflect" - "github.com/filecoin-project/mir/pkg/accountability/simpleacc/common" incommon "github.com/filecoin-project/mir/pkg/accountability/simpleacc/internal/common" "github.com/filecoin-project/mir/pkg/dsl" @@ -11,6 +9,7 @@ import ( accpbmsgs "github.com/filecoin-project/mir/pkg/pb/accountabilitypb/msgs" transportpbdsl "github.com/filecoin-project/mir/pkg/pb/transportpb/dsl" t "github.com/filecoin-project/mir/pkg/types" + "reflect" ) // IncludeLightCertificate implements the (optional) light certificate optimization @@ -24,8 +23,6 @@ func IncludeLightCertificate(m dsl.Module, logger logging.Logger, ) { - lightCertificates := make(map[t.NodeID][]byte) - accpbdsl.UponLightCertificateReceived(m, func(from t.NodeID, data []byte) error { if !params.LightCertificates { @@ -34,22 +31,46 @@ func IncludeLightCertificate(m dsl.Module, if state.DecidedCertificate == nil { logger.Log(logging.LevelDebug, "Received light certificate before decided certificate, buffering it") - lightCertificates[from] = data + state.LightCertificates[from] = data return nil } - decision := state.DecidedCertificate.Decision - - if !reflect.DeepEqual(decision, data) { - logger.Log(logging.LevelWarn, "Received light certificate with different predecision than local decision! sending full certificate to node %v", from) - transportpbdsl.SendMessage( - m, - mc.Net, - accpbmsgs.FullCertificate(mc.Self, - state.DecidedCertificate.Decision, - state.DecidedCertificate.Signatures), - []t.NodeID{from}) - } + applyLightCertificateReceived(m, mc, state, from, data, logger) return nil }) } + +func applyLightCertificateReceived( + m dsl.Module, + mc *common.ModuleConfig, + state *incommon.State, + from t.NodeID, + data []byte, + logger logging.Logger) { + + decision := state.DecidedCertificate.Decision + + if !reflect.DeepEqual(decision, data) { + logger.Log(logging.LevelWarn, "Received light certificate with different predecision than local decision! sending full certificate to node %v", from) + transportpbdsl.SendMessage( + m, + mc.Net, + accpbmsgs.FullCertificate(mc.Self, + state.DecidedCertificate.Decision, + state.DecidedCertificate.Signatures), + []t.NodeID{from}) + } + +} + +func ApplyLightCertificatesBuffered( + m dsl.Module, + mc *common.ModuleConfig, + state *incommon.State, + logger logging.Logger) { + + for from, data := range state.LightCertificates { + applyLightCertificateReceived(m, mc, state, from, data, logger) + } + +} diff --git a/pkg/accountability/simpleacc/internal/common/common.go b/pkg/accountability/simpleacc/internal/common/common.go index c05ed9887..2ead4c9e4 100644 --- a/pkg/accountability/simpleacc/internal/common/common.go +++ b/pkg/accountability/simpleacc/internal/common/common.go @@ -15,6 +15,7 @@ type State struct { Predecided bool // Whether this process has received a predecided value from calling module. UnsentPoMs []*accpbtypes.PoM // List of PoMs not yet sent to the application. SentPoMs map[t.NodeID]*accpbtypes.PoM // List of PoMs already sent to the application with the signer as key. + LightCertificates map[t.NodeID][]byte // Map of light certificates with the signer as key, buffered if no local decision made yet. } type LocalPredecision struct { diff --git a/pkg/accountability/simpleacc/internal/predecisions/predecisions.go b/pkg/accountability/simpleacc/internal/predecisions/predecisions.go index 22f7f4468..36b4a113e 100644 --- a/pkg/accountability/simpleacc/internal/predecisions/predecisions.go +++ b/pkg/accountability/simpleacc/internal/predecisions/predecisions.go @@ -1,6 +1,7 @@ package predecisions import ( + "github.com/filecoin-project/mir/pkg/accountability/simpleacc/internal/certificates/lightcertificates" isspbdsl "github.com/filecoin-project/mir/pkg/pb/isspb/dsl" isspbtypes "github.com/filecoin-project/mir/pkg/pb/isspb/types" tt "github.com/filecoin-project/mir/pkg/trantor/types" @@ -175,7 +176,7 @@ func ApplySigVerified( } // Now decision is not just the bytes, need to retrieve actual decision. - decide(m, mc, state, sp.Predecision) + decide(m, mc, params, state, sp.Predecision, logger) if params.LightCertificates { transportpbdsl.SendMessage( @@ -212,18 +213,18 @@ func ApplySigVerified( } if reflect.DeepEqual(state.DecidedCertificate.Decision, serializePredecision(sbDeliver)) { - finishWithDecision(m, mc, sbDeliver) + finishWithDecision(m, mc, params, state, sbDeliver, logger) } return nil }) } -func decide(m dsl.Module, mc *common.ModuleConfig, state *incommon.State, predecision []byte) { +func decide(m dsl.Module, mc *common.ModuleConfig, params *common.ModuleParams, state *incommon.State, predecision []byte, logger logging.Logger) { // Retrieve actual decision. if reflect.DeepEqual(predecision, state.LocalPredecision.SignedPredecision.Predecision) { sb := state.LocalPredecision.SBDeliver // convenience variable. - finishWithDecision(m, mc, sb) + finishWithDecision(m, mc, params, state, sb, logger) return } @@ -237,8 +238,20 @@ func decide(m dsl.Module, mc *common.ModuleConfig, state *incommon.State, predec } -func finishWithDecision(m dsl.Module, mc *common.ModuleConfig, sb *isspbtypes.SBDeliver) { +func finishWithDecision( + m dsl.Module, + mc *common.ModuleConfig, + params *common.ModuleParams, + state *incommon.State, + sb *isspbtypes.SBDeliver, + logger logging.Logger, +) { + isspbdsl.SBDeliver(m, mc.App, sb.Sn, sb.Data, sb.Aborted, sb.Leader, sb.InstanceId) + if params.LightCertificates { + lightcertificates.ApplyLightCertificatesBuffered(m, mc, state, logger) + } + } func serializePredecision(sbDeliver *isspbtypes.SBDeliver) []byte { From eafd4e5188d2ded9e9fd62371cfc90e55706f3d8 Mon Sep 17 00:00:00 2001 From: Alejandro Ranchal-Pedrosa Date: Mon, 7 Aug 2023 18:21:02 +0200 Subject: [PATCH 11/14] Add pomHandler to ModuleParams (application defines what to do with them) --- .../simpleacc/accountability.go | 9 ++-- pkg/accountability/simpleacc/common/common.go | 10 +++++ .../fullcertificates/fullcertificates.go | 43 +++++++++---------- .../lightcertificates/lightcertificates.go | 3 +- .../simpleacc/internal/common/common.go | 4 +- .../simpleacc/internal/poms/poms.go | 31 +++++-------- .../internal/predecisions/predecisions.go | 9 ++-- .../internal/mock_internal/impl.mock.go | 3 +- pkg/net/grpc/grpctransport.pb.go | 8 ++-- pkg/net/grpc/grpctransport_grpc.pb.go | 1 + .../accountabilitypb/accountabilitypb.pb.go | 10 +++-- pkg/pb/apppb/apppb.pb.go | 10 +++-- pkg/pb/availabilitypb/availabilitypb.pb.go | 10 +++-- .../availabilitypb/batchdbpb/batchdbpb.pb.go | 10 +++-- pkg/pb/availabilitypb/mscpb/mscpb.pb.go | 10 +++-- pkg/pb/batchfetcherpb/batchfetcherpb.pb.go | 10 +++-- pkg/pb/bcbpb/bcbpb.pb.go | 10 +++-- pkg/pb/checkpointpb/checkpointpb.pb.go | 10 +++-- .../chkpvalidatorpb/chkpvalidatorpb.pb.go | 10 +++-- pkg/pb/contextstorepb/contextstorepb.pb.go | 8 ++-- pkg/pb/cryptopb/cryptopb.pb.go | 10 +++-- pkg/pb/dslpb/dslpb.pb.go | 8 ++-- pkg/pb/eventpb/eventpb.pb.go | 12 +++--- pkg/pb/eventpb/oneof_interfaces.mir.go | 3 +- pkg/pb/eventpb/types/types.mir.go | 3 +- pkg/pb/factorypb/factorypb.pb.go | 10 +++-- pkg/pb/hasherpb/hasherpb.pb.go | 10 +++-- pkg/pb/isspb/isspb.pb.go | 10 +++-- pkg/pb/mempoolpb/mempoolpb.pb.go | 10 +++-- pkg/pb/messagepb/messagepb.pb.go | 10 +++-- pkg/pb/mir/codegen_extensions.pb.go | 3 +- pkg/pb/net/codegen_extensions.pb.go | 3 +- pkg/pb/ordererpb/ordererpb.pb.go | 10 +++-- .../pprepvalidatorpb/pprepvalidatorpb.pb.go | 10 +++-- pkg/pb/pbftpb/pbftpb.pb.go | 10 +++-- pkg/pb/pingpongpb/pingpongpb.pb.go | 10 +++-- pkg/pb/recordingpb/recordingpb.pb.go | 8 ++-- pkg/pb/testerpb/testerpb.pb.go | 8 ++-- pkg/pb/threshcryptopb/threshcryptopb.pb.go | 10 +++-- pkg/pb/transportpb/transportpb.pb.go | 10 +++-- pkg/pb/trantorpb/trantorpb.pb.go | 8 ++-- .../transactionreceiver.pb.go | 8 ++-- .../transactionreceiver_grpc.pb.go | 4 +- 43 files changed, 238 insertions(+), 169 deletions(-) diff --git a/pkg/accountability/simpleacc/accountability.go b/pkg/accountability/simpleacc/accountability.go index 8f06a6857..01afd78fb 100644 --- a/pkg/accountability/simpleacc/accountability.go +++ b/pkg/accountability/simpleacc/accountability.go @@ -78,7 +78,10 @@ type ModuleParams = common.ModuleParams // // ATTENTION: This module is intended to be used once per instance // (to avoid replay attacks) and reinstantiated in a factory. -func NewModule(mc ModuleConfig, params *ModuleParams, logger logging.Logger) (modules.PassiveModule, error) { +func NewModule( + mc ModuleConfig, + params *ModuleParams, + logger logging.Logger) (modules.PassiveModule, error) { m := dsl.NewModule(mc.Self) state := &incommon.State{ @@ -87,8 +90,8 @@ func NewModule(mc ModuleConfig, params *ModuleParams, logger logging.Logger) (mo LocalPredecision: nil, DecidedCertificate: nil, Predecided: false, - UnsentPoMs: make([]*accpbtypes.PoM, 0), - SentPoMs: make(map[t.NodeID]*accpbtypes.PoM), + UnhandledPoMs: make([]*accpbtypes.PoM, 0), + HandledPoMs: make(map[t.NodeID]*accpbtypes.PoM), } predecisions.IncludePredecisions(m, &mc, params, state, logger) diff --git a/pkg/accountability/simpleacc/common/common.go b/pkg/accountability/simpleacc/common/common.go index a9079fbaa..acb8507e8 100644 --- a/pkg/accountability/simpleacc/common/common.go +++ b/pkg/accountability/simpleacc/common/common.go @@ -1,6 +1,10 @@ package common import ( + incommon "github.com/filecoin-project/mir/pkg/accountability/simpleacc/internal/common" + "github.com/filecoin-project/mir/pkg/dsl" + "github.com/filecoin-project/mir/pkg/logging" + accpbtypes "github.com/filecoin-project/mir/pkg/pb/accountabilitypb/types" trantorpbtypes "github.com/filecoin-project/mir/pkg/pb/trantorpb/types" t "github.com/filecoin-project/mir/pkg/types" ) @@ -21,4 +25,10 @@ type ModuleConfig struct { type ModuleParams struct { Membership *trantorpbtypes.Membership // the list of participating nodes LightCertificates bool + PomsHandler func(m dsl.Module, // function to be called when PoMs detected + mc *ModuleConfig, + params *ModuleParams, + state *incommon.State, + poms []*accpbtypes.PoM, + logger logging.Logger) } diff --git a/pkg/accountability/simpleacc/internal/certificates/fullcertificates/fullcertificates.go b/pkg/accountability/simpleacc/internal/certificates/fullcertificates/fullcertificates.go index bdc753d84..7b6d4f082 100644 --- a/pkg/accountability/simpleacc/internal/certificates/fullcertificates/fullcertificates.go +++ b/pkg/accountability/simpleacc/internal/certificates/fullcertificates/fullcertificates.go @@ -1,8 +1,6 @@ package fullcertificates import ( - "reflect" - "github.com/filecoin-project/mir/pkg/accountability/simpleacc/common" incommon "github.com/filecoin-project/mir/pkg/accountability/simpleacc/internal/common" "github.com/filecoin-project/mir/pkg/accountability/simpleacc/internal/poms" @@ -28,9 +26,8 @@ func IncludeFullCertificate(m dsl.Module, logger logging.Logger, ) { - accpbdsl.UponFullCertificateReceived(m, func(from t.NodeID, certificate map[t.NodeID]*accpbtypes.SignedPredecision) error { - predecision, empty := maputil.AnyVal(certificate) - if empty { + accpbdsl.UponFullCertificateReceived(m, func(from t.NodeID, decision []byte, certificate map[t.NodeID][]byte) error { + if len(certificate) == 0 { logger.Log(logging.LevelDebug, "Ignoring empty predecision certificate") return nil } @@ -40,28 +37,24 @@ func IncludeFullCertificate(m dsl.Module, return nil } - for _, v := range certificate { - if !reflect.DeepEqual(predecision.Predecision, v.Predecision) { - logger.Log(logging.LevelDebug, "Ignoring predecision certificate with different predecisions") - return nil - } - } - // Verify all signatures in certificate. cryptopbdsl.VerifySigs( m, mc.Crypto, - sliceutil.Transform(maputil.GetValues(certificate), - func(i int, sp *accpbtypes.SignedPredecision) *cryptopbtypes.SignedData { - return &cryptopbtypes.SignedData{Data: [][]byte{sp.Predecision, []byte(mc.Self)}} - }), - sliceutil.Transform(maputil.GetValues(certificate), - func(i int, sp *accpbtypes.SignedPredecision) []byte { - return sp.Signature + sliceutil.Generate( + len(certificate), + func(i int) *cryptopbtypes.SignedData { + return &cryptopbtypes.SignedData{ + Data: [][]byte{decision}, + } }), + maputil.GetValues(certificate), maputil.GetKeys(certificate), &verifySigs{ - certificate: certificate, + certificate: &accpbtypes.FullCertificate{ + Decision: decision, + Signatures: certificate, + }, }, ) return nil @@ -69,13 +62,17 @@ func IncludeFullCertificate(m dsl.Module, cryptopbdsl.UponSigsVerified(m, func(nodeIds []t.NodeID, errs []error, allOk bool, vsr *verifySigs) error { for i, nodeID := range nodeIds { - predecisions.ApplySigVerified(m, mc, params, state, nodeID, errs[i], vsr.certificate[nodeID], false, logger) + sp := &accpbtypes.SignedPredecision{ + Predecision: vsr.certificate.Decision, + Signature: vsr.certificate.Signatures[nodeID], + } + predecisions.ApplySigVerified(m, mc, params, state, nodeID, errs[i], sp, false, logger) } - poms.SendPoMs(m, mc, params, state, logger) + poms.HandlePoMs(m, mc, params, state, logger) return nil }) } type verifySigs struct { - certificate map[t.NodeID]*accpbtypes.SignedPredecision + certificate *accpbtypes.FullCertificate } diff --git a/pkg/accountability/simpleacc/internal/certificates/lightcertificates/lightcertificates.go b/pkg/accountability/simpleacc/internal/certificates/lightcertificates/lightcertificates.go index 3e0229b87..f9fd90518 100644 --- a/pkg/accountability/simpleacc/internal/certificates/lightcertificates/lightcertificates.go +++ b/pkg/accountability/simpleacc/internal/certificates/lightcertificates/lightcertificates.go @@ -1,6 +1,8 @@ package lightcertificates import ( + "reflect" + "github.com/filecoin-project/mir/pkg/accountability/simpleacc/common" incommon "github.com/filecoin-project/mir/pkg/accountability/simpleacc/internal/common" "github.com/filecoin-project/mir/pkg/dsl" @@ -9,7 +11,6 @@ import ( accpbmsgs "github.com/filecoin-project/mir/pkg/pb/accountabilitypb/msgs" transportpbdsl "github.com/filecoin-project/mir/pkg/pb/transportpb/dsl" t "github.com/filecoin-project/mir/pkg/types" - "reflect" ) // IncludeLightCertificate implements the (optional) light certificate optimization diff --git a/pkg/accountability/simpleacc/internal/common/common.go b/pkg/accountability/simpleacc/internal/common/common.go index 2ead4c9e4..cb0297a1d 100644 --- a/pkg/accountability/simpleacc/internal/common/common.go +++ b/pkg/accountability/simpleacc/internal/common/common.go @@ -13,8 +13,8 @@ type State struct { LocalPredecision *LocalPredecision // Decision locally decided DecidedCertificate *accpbtypes.FullCertificate // Locally decided certificate (predecision and list of signatures with signers as key) Predecided bool // Whether this process has received a predecided value from calling module. - UnsentPoMs []*accpbtypes.PoM // List of PoMs not yet sent to the application. - SentPoMs map[t.NodeID]*accpbtypes.PoM // List of PoMs already sent to the application with the signer as key. + UnhandledPoMs []*accpbtypes.PoM // List of PoMs not yet sent to the application. + HandledPoMs map[t.NodeID]*accpbtypes.PoM // List of PoMs already sent to the application with the signer as key. LightCertificates map[t.NodeID][]byte // Map of light certificates with the signer as key, buffered if no local decision made yet. } diff --git a/pkg/accountability/simpleacc/internal/poms/poms.go b/pkg/accountability/simpleacc/internal/poms/poms.go index c0371bb21..1cd8c4162 100644 --- a/pkg/accountability/simpleacc/internal/poms/poms.go +++ b/pkg/accountability/simpleacc/internal/poms/poms.go @@ -8,13 +8,10 @@ import ( "github.com/filecoin-project/mir/pkg/dsl" "github.com/filecoin-project/mir/pkg/logging" accpbdsl "github.com/filecoin-project/mir/pkg/pb/accountabilitypb/dsl" - accountabilitypbmsgs "github.com/filecoin-project/mir/pkg/pb/accountabilitypb/msgs" accpbtypes "github.com/filecoin-project/mir/pkg/pb/accountabilitypb/types" cryptopbdsl "github.com/filecoin-project/mir/pkg/pb/cryptopb/dsl" cryptopbtypes "github.com/filecoin-project/mir/pkg/pb/cryptopb/types" - transportpbdsl "github.com/filecoin-project/mir/pkg/pb/transportpb/dsl" t "github.com/filecoin-project/mir/pkg/types" - "github.com/filecoin-project/mir/pkg/util/maputil" ) // IncludePoMs verifies receives PoMs and sends found PoMs to other members. @@ -40,7 +37,7 @@ func IncludePoMs( continue } - if _, ok := state.SentPoMs[pom.NodeId]; ok { + if _, ok := state.HandledPoMs[pom.NodeId]; ok { continue } @@ -72,43 +69,37 @@ func IncludePoMs( cryptopbdsl.UponSigsVerified(m, func(nodeIds []t.NodeID, errs []error, allOk bool, vpoms *verifyPoMs) error { for i := 0; i < len(nodeIds); i += 2 { if errs[i] == nil && errs[i+1] == nil { - state.UnsentPoMs = append(state.UnsentPoMs, vpoms.poms[i/2]) + state.UnhandledPoMs = append(state.UnhandledPoMs, vpoms.poms[i/2]) } } - SendPoMs(m, mc, params, state, logger) + HandlePoMs(m, mc, params, state, logger) return nil }) } -// SendPoMs sends all PoMs in State.UnsentPoMs to all nodes and to the application module (from the POV of this module, i.e. mc.App). -func SendPoMs( +// HandlePoMs sends all PoMs in State.UnhandledPoMs to all nodes and to the application module (from the POV of this module, i.e. mc.App). +func HandlePoMs( m dsl.Module, mc *common.ModuleConfig, params *common.ModuleParams, state *incommon.State, logger logging.Logger, ) { - if len(state.UnsentPoMs) == 0 { + if len(state.UnhandledPoMs) == 0 { return } logger.Log(logging.LevelWarn, "Found valid PoMs! sending...") - //TODO do something here (function that will be passed on factory creation) + // Handle PoMs according to the application's logic defined when creating the accountability factory + params.PomsHandler(m, mc, params, state, state.UnhandledPoMs, logger) - transportpbdsl.SendMessage( - m, - mc.Net, - accountabilitypbmsgs.PoMs(mc.Self, state.UnsentPoMs), - maputil.GetKeys(params.Membership.Nodes), - ) - - for _, pom := range state.UnsentPoMs { - state.SentPoMs[pom.NodeId] = pom + for _, pom := range state.UnhandledPoMs { + state.HandledPoMs[pom.NodeId] = pom } - state.UnsentPoMs = make([]*accpbtypes.PoM, 0) + state.UnhandledPoMs = make([]*accpbtypes.PoM, 0) } type verifyPoMs struct { diff --git a/pkg/accountability/simpleacc/internal/predecisions/predecisions.go b/pkg/accountability/simpleacc/internal/predecisions/predecisions.go index 36b4a113e..d6e64b5bc 100644 --- a/pkg/accountability/simpleacc/internal/predecisions/predecisions.go +++ b/pkg/accountability/simpleacc/internal/predecisions/predecisions.go @@ -1,11 +1,12 @@ package predecisions import ( + "reflect" + "github.com/filecoin-project/mir/pkg/accountability/simpleacc/internal/certificates/lightcertificates" isspbdsl "github.com/filecoin-project/mir/pkg/pb/isspb/dsl" isspbtypes "github.com/filecoin-project/mir/pkg/pb/isspb/types" tt "github.com/filecoin-project/mir/pkg/trantor/types" - "reflect" "github.com/filecoin-project/mir/pkg/accountability/simpleacc/common" incommon "github.com/filecoin-project/mir/pkg/accountability/simpleacc/internal/common" @@ -134,8 +135,8 @@ func ApplySigVerified( if !reflect.DeepEqual(state.SignedPredecisions[nodeID].Predecision, sp.Predecision) { logger.Log(logging.LevelWarn, "Received conflicting signed predecisions from same node") // if a PoM for this node has not already been sent. - if _, ok := state.SentPoMs[nodeID]; !ok { - state.UnsentPoMs = append(state.UnsentPoMs, + if _, ok := state.HandledPoMs[nodeID]; !ok { + state.UnhandledPoMs = append(state.UnhandledPoMs, &accpbtypes.PoM{ NodeId: nodeID, ConflictingMsg_1: state.SignedPredecisions[nodeID], @@ -143,7 +144,7 @@ func ApplySigVerified( }) if flushPoMs { - poms.SendPoMs(m, mc, params, state, logger) + poms.HandlePoMs(m, mc, params, state, logger) } } diff --git a/pkg/modules/mockmodules/internal/mock_internal/impl.mock.go b/pkg/modules/mockmodules/internal/mock_internal/impl.mock.go index 273734019..1ceedfc10 100644 --- a/pkg/modules/mockmodules/internal/mock_internal/impl.mock.go +++ b/pkg/modules/mockmodules/internal/mock_internal/impl.mock.go @@ -7,9 +7,10 @@ package mock_internal import ( reflect "reflect" + gomock "github.com/golang/mock/gomock" + events "github.com/filecoin-project/mir/pkg/events" eventpb "github.com/filecoin-project/mir/pkg/pb/eventpb" - gomock "github.com/golang/mock/gomock" ) // MockModuleImpl is a mock of ModuleImpl interface. diff --git a/pkg/net/grpc/grpctransport.pb.go b/pkg/net/grpc/grpctransport.pb.go index c23082f41..eaae1773f 100644 --- a/pkg/net/grpc/grpctransport.pb.go +++ b/pkg/net/grpc/grpctransport.pb.go @@ -12,11 +12,13 @@ package grpc import ( - messagepb "github.com/filecoin-project/mir/pkg/pb/messagepb" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + + messagepb "github.com/filecoin-project/mir/pkg/pb/messagepb" ) const ( diff --git a/pkg/net/grpc/grpctransport_grpc.pb.go b/pkg/net/grpc/grpctransport_grpc.pb.go index 57d61cd29..10ad5fa8a 100644 --- a/pkg/net/grpc/grpctransport_grpc.pb.go +++ b/pkg/net/grpc/grpctransport_grpc.pb.go @@ -8,6 +8,7 @@ package grpc import ( context "context" + grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" diff --git a/pkg/pb/accountabilitypb/accountabilitypb.pb.go b/pkg/pb/accountabilitypb/accountabilitypb.pb.go index 1f30fb3d5..735e03b89 100644 --- a/pkg/pb/accountabilitypb/accountabilitypb.pb.go +++ b/pkg/pb/accountabilitypb/accountabilitypb.pb.go @@ -7,14 +7,16 @@ package accountabilitypb import ( + reflect "reflect" + sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + isspb "github.com/filecoin-project/mir/pkg/pb/isspb" _ "github.com/filecoin-project/mir/pkg/pb/mir" _ "github.com/filecoin-project/mir/pkg/pb/net" trantorpb "github.com/filecoin-project/mir/pkg/pb/trantorpb" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" ) const ( diff --git a/pkg/pb/apppb/apppb.pb.go b/pkg/pb/apppb/apppb.pb.go index 6b6db8d4b..890b6ac6b 100644 --- a/pkg/pb/apppb/apppb.pb.go +++ b/pkg/pb/apppb/apppb.pb.go @@ -7,12 +7,14 @@ package apppb import ( - checkpointpb "github.com/filecoin-project/mir/pkg/pb/checkpointpb" - _ "github.com/filecoin-project/mir/pkg/pb/mir" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + + checkpointpb "github.com/filecoin-project/mir/pkg/pb/checkpointpb" + _ "github.com/filecoin-project/mir/pkg/pb/mir" ) const ( diff --git a/pkg/pb/availabilitypb/availabilitypb.pb.go b/pkg/pb/availabilitypb/availabilitypb.pb.go index 455dc3cd4..acb443bcf 100644 --- a/pkg/pb/availabilitypb/availabilitypb.pb.go +++ b/pkg/pb/availabilitypb/availabilitypb.pb.go @@ -7,15 +7,17 @@ package availabilitypb import ( + reflect "reflect" + sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + mscpb "github.com/filecoin-project/mir/pkg/pb/availabilitypb/mscpb" contextstorepb "github.com/filecoin-project/mir/pkg/pb/contextstorepb" dslpb "github.com/filecoin-project/mir/pkg/pb/dslpb" _ "github.com/filecoin-project/mir/pkg/pb/mir" trantorpb "github.com/filecoin-project/mir/pkg/pb/trantorpb" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" ) const ( diff --git a/pkg/pb/availabilitypb/batchdbpb/batchdbpb.pb.go b/pkg/pb/availabilitypb/batchdbpb/batchdbpb.pb.go index f28106019..1e74eb5ac 100644 --- a/pkg/pb/availabilitypb/batchdbpb/batchdbpb.pb.go +++ b/pkg/pb/availabilitypb/batchdbpb/batchdbpb.pb.go @@ -7,14 +7,16 @@ package batchdbpb import ( + reflect "reflect" + sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + contextstorepb "github.com/filecoin-project/mir/pkg/pb/contextstorepb" dslpb "github.com/filecoin-project/mir/pkg/pb/dslpb" _ "github.com/filecoin-project/mir/pkg/pb/mir" trantorpb "github.com/filecoin-project/mir/pkg/pb/trantorpb" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" ) const ( diff --git a/pkg/pb/availabilitypb/mscpb/mscpb.pb.go b/pkg/pb/availabilitypb/mscpb/mscpb.pb.go index a3885ce80..dc48e55d3 100644 --- a/pkg/pb/availabilitypb/mscpb/mscpb.pb.go +++ b/pkg/pb/availabilitypb/mscpb/mscpb.pb.go @@ -7,13 +7,15 @@ package mscpb import ( + reflect "reflect" + sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + _ "github.com/filecoin-project/mir/pkg/pb/mir" _ "github.com/filecoin-project/mir/pkg/pb/net" trantorpb "github.com/filecoin-project/mir/pkg/pb/trantorpb" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" ) const ( diff --git a/pkg/pb/batchfetcherpb/batchfetcherpb.pb.go b/pkg/pb/batchfetcherpb/batchfetcherpb.pb.go index 8a598b960..93c4321e6 100644 --- a/pkg/pb/batchfetcherpb/batchfetcherpb.pb.go +++ b/pkg/pb/batchfetcherpb/batchfetcherpb.pb.go @@ -7,12 +7,14 @@ package batchfetcherpb import ( - _ "github.com/filecoin-project/mir/pkg/pb/mir" - trantorpb "github.com/filecoin-project/mir/pkg/pb/trantorpb" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + + _ "github.com/filecoin-project/mir/pkg/pb/mir" + trantorpb "github.com/filecoin-project/mir/pkg/pb/trantorpb" ) const ( diff --git a/pkg/pb/bcbpb/bcbpb.pb.go b/pkg/pb/bcbpb/bcbpb.pb.go index d1ee4d968..0938361cd 100644 --- a/pkg/pb/bcbpb/bcbpb.pb.go +++ b/pkg/pb/bcbpb/bcbpb.pb.go @@ -7,12 +7,14 @@ package bcbpb import ( - _ "github.com/filecoin-project/mir/pkg/pb/mir" - _ "github.com/filecoin-project/mir/pkg/pb/net" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + + _ "github.com/filecoin-project/mir/pkg/pb/mir" + _ "github.com/filecoin-project/mir/pkg/pb/net" ) const ( diff --git a/pkg/pb/checkpointpb/checkpointpb.pb.go b/pkg/pb/checkpointpb/checkpointpb.pb.go index 1ce54771c..1a05fd76d 100644 --- a/pkg/pb/checkpointpb/checkpointpb.pb.go +++ b/pkg/pb/checkpointpb/checkpointpb.pb.go @@ -7,13 +7,15 @@ package checkpointpb import ( + reflect "reflect" + sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + _ "github.com/filecoin-project/mir/pkg/pb/mir" _ "github.com/filecoin-project/mir/pkg/pb/net" trantorpb "github.com/filecoin-project/mir/pkg/pb/trantorpb" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" ) const ( diff --git a/pkg/pb/checkpointpb/chkpvalidatorpb/chkpvalidatorpb.pb.go b/pkg/pb/checkpointpb/chkpvalidatorpb/chkpvalidatorpb.pb.go index 9db35822d..54c209b94 100644 --- a/pkg/pb/checkpointpb/chkpvalidatorpb/chkpvalidatorpb.pb.go +++ b/pkg/pb/checkpointpb/chkpvalidatorpb/chkpvalidatorpb.pb.go @@ -7,15 +7,17 @@ package chkpvalidatorpb import ( + reflect "reflect" + sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + checkpointpb "github.com/filecoin-project/mir/pkg/pb/checkpointpb" contextstorepb "github.com/filecoin-project/mir/pkg/pb/contextstorepb" dslpb "github.com/filecoin-project/mir/pkg/pb/dslpb" _ "github.com/filecoin-project/mir/pkg/pb/mir" trantorpb "github.com/filecoin-project/mir/pkg/pb/trantorpb" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" ) const ( diff --git a/pkg/pb/contextstorepb/contextstorepb.pb.go b/pkg/pb/contextstorepb/contextstorepb.pb.go index c52e50a4f..74aaeecbd 100644 --- a/pkg/pb/contextstorepb/contextstorepb.pb.go +++ b/pkg/pb/contextstorepb/contextstorepb.pb.go @@ -7,11 +7,13 @@ package contextstorepb import ( - _ "github.com/filecoin-project/mir/pkg/pb/mir" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + + _ "github.com/filecoin-project/mir/pkg/pb/mir" ) const ( diff --git a/pkg/pb/cryptopb/cryptopb.pb.go b/pkg/pb/cryptopb/cryptopb.pb.go index 6fe78da38..754f1b834 100644 --- a/pkg/pb/cryptopb/cryptopb.pb.go +++ b/pkg/pb/cryptopb/cryptopb.pb.go @@ -7,13 +7,15 @@ package cryptopb import ( + reflect "reflect" + sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + contextstorepb "github.com/filecoin-project/mir/pkg/pb/contextstorepb" dslpb "github.com/filecoin-project/mir/pkg/pb/dslpb" _ "github.com/filecoin-project/mir/pkg/pb/mir" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" ) const ( diff --git a/pkg/pb/dslpb/dslpb.pb.go b/pkg/pb/dslpb/dslpb.pb.go index 198ed330e..9878f48f0 100644 --- a/pkg/pb/dslpb/dslpb.pb.go +++ b/pkg/pb/dslpb/dslpb.pb.go @@ -7,11 +7,13 @@ package dslpb import ( - _ "github.com/filecoin-project/mir/pkg/pb/mir" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + + _ "github.com/filecoin-project/mir/pkg/pb/mir" ) const ( diff --git a/pkg/pb/eventpb/eventpb.pb.go b/pkg/pb/eventpb/eventpb.pb.go index 3a05b4fdf..c663c41ec 100644 --- a/pkg/pb/eventpb/eventpb.pb.go +++ b/pkg/pb/eventpb/eventpb.pb.go @@ -7,6 +7,13 @@ package eventpb import ( + reflect "reflect" + sync "sync" + + wrappers "github.com/golang/protobuf/ptypes/wrappers" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + apppb "github.com/filecoin-project/mir/pkg/pb/apppb" availabilitypb "github.com/filecoin-project/mir/pkg/pb/availabilitypb" batchdbpb "github.com/filecoin-project/mir/pkg/pb/availabilitypb/batchdbpb" @@ -26,11 +33,6 @@ import ( testerpb "github.com/filecoin-project/mir/pkg/pb/testerpb" threshcryptopb "github.com/filecoin-project/mir/pkg/pb/threshcryptopb" transportpb "github.com/filecoin-project/mir/pkg/pb/transportpb" - wrappers "github.com/golang/protobuf/ptypes/wrappers" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" ) const ( diff --git a/pkg/pb/eventpb/oneof_interfaces.mir.go b/pkg/pb/eventpb/oneof_interfaces.mir.go index 2baab82b9..c33cd9e75 100644 --- a/pkg/pb/eventpb/oneof_interfaces.mir.go +++ b/pkg/pb/eventpb/oneof_interfaces.mir.go @@ -3,6 +3,8 @@ package eventpb import ( + wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" + apppb "github.com/filecoin-project/mir/pkg/pb/apppb" availabilitypb "github.com/filecoin-project/mir/pkg/pb/availabilitypb" batchdbpb "github.com/filecoin-project/mir/pkg/pb/availabilitypb/batchdbpb" @@ -21,7 +23,6 @@ import ( testerpb "github.com/filecoin-project/mir/pkg/pb/testerpb" threshcryptopb "github.com/filecoin-project/mir/pkg/pb/threshcryptopb" transportpb "github.com/filecoin-project/mir/pkg/pb/transportpb" - wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" ) type Event_Type = isEvent_Type diff --git a/pkg/pb/eventpb/types/types.mir.go b/pkg/pb/eventpb/types/types.mir.go index 119300d27..37c95a225 100644 --- a/pkg/pb/eventpb/types/types.mir.go +++ b/pkg/pb/eventpb/types/types.mir.go @@ -3,6 +3,8 @@ package eventpbtypes import ( + wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" + mirreflect "github.com/filecoin-project/mir/codegen/mirreflect" types19 "github.com/filecoin-project/mir/codegen/model/types" types13 "github.com/filecoin-project/mir/pkg/pb/apppb/types" @@ -28,7 +30,6 @@ import ( types21 "github.com/filecoin-project/mir/pkg/trantor/types" types "github.com/filecoin-project/mir/pkg/types" reflectutil "github.com/filecoin-project/mir/pkg/util/reflectutil" - wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" ) type Event struct { diff --git a/pkg/pb/factorypb/factorypb.pb.go b/pkg/pb/factorypb/factorypb.pb.go index 06d2dec39..14a65f541 100644 --- a/pkg/pb/factorypb/factorypb.pb.go +++ b/pkg/pb/factorypb/factorypb.pb.go @@ -7,16 +7,18 @@ package factorypb import ( + reflect "reflect" + sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + accountabilitypb "github.com/filecoin-project/mir/pkg/pb/accountabilitypb" mscpb "github.com/filecoin-project/mir/pkg/pb/availabilitypb/mscpb" checkpointpb "github.com/filecoin-project/mir/pkg/pb/checkpointpb" _ "github.com/filecoin-project/mir/pkg/pb/mir" ordererpb "github.com/filecoin-project/mir/pkg/pb/ordererpb" pprepvalidatorpb "github.com/filecoin-project/mir/pkg/pb/ordererpb/pprepvalidatorpb" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" ) const ( diff --git a/pkg/pb/hasherpb/hasherpb.pb.go b/pkg/pb/hasherpb/hasherpb.pb.go index e3e45fada..6e0da4f02 100644 --- a/pkg/pb/hasherpb/hasherpb.pb.go +++ b/pkg/pb/hasherpb/hasherpb.pb.go @@ -7,13 +7,15 @@ package hasherpb import ( + reflect "reflect" + sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + contextstorepb "github.com/filecoin-project/mir/pkg/pb/contextstorepb" dslpb "github.com/filecoin-project/mir/pkg/pb/dslpb" _ "github.com/filecoin-project/mir/pkg/pb/mir" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" ) const ( diff --git a/pkg/pb/isspb/isspb.pb.go b/pkg/pb/isspb/isspb.pb.go index e134e4180..c2b3ee31b 100644 --- a/pkg/pb/isspb/isspb.pb.go +++ b/pkg/pb/isspb/isspb.pb.go @@ -12,15 +12,17 @@ package isspb import ( + reflect "reflect" + sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + availabilitypb "github.com/filecoin-project/mir/pkg/pb/availabilitypb" checkpointpb "github.com/filecoin-project/mir/pkg/pb/checkpointpb" _ "github.com/filecoin-project/mir/pkg/pb/mir" _ "github.com/filecoin-project/mir/pkg/pb/net" trantorpb "github.com/filecoin-project/mir/pkg/pb/trantorpb" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" ) const ( diff --git a/pkg/pb/mempoolpb/mempoolpb.pb.go b/pkg/pb/mempoolpb/mempoolpb.pb.go index 175bd9722..8ec8128fc 100644 --- a/pkg/pb/mempoolpb/mempoolpb.pb.go +++ b/pkg/pb/mempoolpb/mempoolpb.pb.go @@ -7,14 +7,16 @@ package mempoolpb import ( + reflect "reflect" + sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + contextstorepb "github.com/filecoin-project/mir/pkg/pb/contextstorepb" dslpb "github.com/filecoin-project/mir/pkg/pb/dslpb" _ "github.com/filecoin-project/mir/pkg/pb/mir" trantorpb "github.com/filecoin-project/mir/pkg/pb/trantorpb" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" ) const ( diff --git a/pkg/pb/messagepb/messagepb.pb.go b/pkg/pb/messagepb/messagepb.pb.go index 66050c109..30a6a1bc8 100644 --- a/pkg/pb/messagepb/messagepb.pb.go +++ b/pkg/pb/messagepb/messagepb.pb.go @@ -12,6 +12,12 @@ package messagepb import ( + reflect "reflect" + sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + accountabilitypb "github.com/filecoin-project/mir/pkg/pb/accountabilitypb" mscpb "github.com/filecoin-project/mir/pkg/pb/availabilitypb/mscpb" bcbpb "github.com/filecoin-project/mir/pkg/pb/bcbpb" @@ -21,10 +27,6 @@ import ( _ "github.com/filecoin-project/mir/pkg/pb/net" ordererpb "github.com/filecoin-project/mir/pkg/pb/ordererpb" pingpongpb "github.com/filecoin-project/mir/pkg/pb/pingpongpb" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" ) const ( diff --git a/pkg/pb/mir/codegen_extensions.pb.go b/pkg/pb/mir/codegen_extensions.pb.go index f251ed1d4..a2011431f 100644 --- a/pkg/pb/mir/codegen_extensions.pb.go +++ b/pkg/pb/mir/codegen_extensions.pb.go @@ -7,10 +7,11 @@ package mir import ( + reflect "reflect" + descriptor "github.com/golang/protobuf/protoc-gen-go/descriptor" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" ) const ( diff --git a/pkg/pb/net/codegen_extensions.pb.go b/pkg/pb/net/codegen_extensions.pb.go index 2664c3c27..7e3f34419 100644 --- a/pkg/pb/net/codegen_extensions.pb.go +++ b/pkg/pb/net/codegen_extensions.pb.go @@ -7,10 +7,11 @@ package net import ( + reflect "reflect" + descriptor "github.com/golang/protobuf/protoc-gen-go/descriptor" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" ) const ( diff --git a/pkg/pb/ordererpb/ordererpb.pb.go b/pkg/pb/ordererpb/ordererpb.pb.go index c7dcba5cd..b8c92535e 100644 --- a/pkg/pb/ordererpb/ordererpb.pb.go +++ b/pkg/pb/ordererpb/ordererpb.pb.go @@ -7,14 +7,16 @@ package ordererpb import ( + reflect "reflect" + sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + _ "github.com/filecoin-project/mir/pkg/pb/mir" _ "github.com/filecoin-project/mir/pkg/pb/net" pbftpb "github.com/filecoin-project/mir/pkg/pb/pbftpb" trantorpb "github.com/filecoin-project/mir/pkg/pb/trantorpb" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" ) const ( diff --git a/pkg/pb/ordererpb/pprepvalidatorpb/pprepvalidatorpb.pb.go b/pkg/pb/ordererpb/pprepvalidatorpb/pprepvalidatorpb.pb.go index e84c1442c..be426e6f4 100644 --- a/pkg/pb/ordererpb/pprepvalidatorpb/pprepvalidatorpb.pb.go +++ b/pkg/pb/ordererpb/pprepvalidatorpb/pprepvalidatorpb.pb.go @@ -7,15 +7,17 @@ package pprepvalidatorpb import ( + reflect "reflect" + sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + contextstorepb "github.com/filecoin-project/mir/pkg/pb/contextstorepb" dslpb "github.com/filecoin-project/mir/pkg/pb/dslpb" _ "github.com/filecoin-project/mir/pkg/pb/mir" pbftpb "github.com/filecoin-project/mir/pkg/pb/pbftpb" trantorpb "github.com/filecoin-project/mir/pkg/pb/trantorpb" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" ) const ( diff --git a/pkg/pb/pbftpb/pbftpb.pb.go b/pkg/pb/pbftpb/pbftpb.pb.go index 1eef4f3ac..f9f2d3d88 100644 --- a/pkg/pb/pbftpb/pbftpb.pb.go +++ b/pkg/pb/pbftpb/pbftpb.pb.go @@ -7,12 +7,14 @@ package pbftpb import ( - _ "github.com/filecoin-project/mir/pkg/pb/mir" - _ "github.com/filecoin-project/mir/pkg/pb/net" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + + _ "github.com/filecoin-project/mir/pkg/pb/mir" + _ "github.com/filecoin-project/mir/pkg/pb/net" ) const ( diff --git a/pkg/pb/pingpongpb/pingpongpb.pb.go b/pkg/pb/pingpongpb/pingpongpb.pb.go index 75f77c579..41ed4b6a0 100644 --- a/pkg/pb/pingpongpb/pingpongpb.pb.go +++ b/pkg/pb/pingpongpb/pingpongpb.pb.go @@ -7,12 +7,14 @@ package pingpongpb import ( - _ "github.com/filecoin-project/mir/pkg/pb/mir" - _ "github.com/filecoin-project/mir/pkg/pb/net" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + + _ "github.com/filecoin-project/mir/pkg/pb/mir" + _ "github.com/filecoin-project/mir/pkg/pb/net" ) const ( diff --git a/pkg/pb/recordingpb/recordingpb.pb.go b/pkg/pb/recordingpb/recordingpb.pb.go index c528445c3..fad3b18d4 100644 --- a/pkg/pb/recordingpb/recordingpb.pb.go +++ b/pkg/pb/recordingpb/recordingpb.pb.go @@ -12,11 +12,13 @@ package recordingpb import ( - eventpb "github.com/filecoin-project/mir/pkg/pb/eventpb" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + + eventpb "github.com/filecoin-project/mir/pkg/pb/eventpb" ) const ( diff --git a/pkg/pb/testerpb/testerpb.pb.go b/pkg/pb/testerpb/testerpb.pb.go index c7635844e..607b43395 100644 --- a/pkg/pb/testerpb/testerpb.pb.go +++ b/pkg/pb/testerpb/testerpb.pb.go @@ -7,11 +7,13 @@ package testerpb import ( - _ "github.com/filecoin-project/mir/pkg/pb/mir" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + + _ "github.com/filecoin-project/mir/pkg/pb/mir" ) const ( diff --git a/pkg/pb/threshcryptopb/threshcryptopb.pb.go b/pkg/pb/threshcryptopb/threshcryptopb.pb.go index d1ae43923..74a02ab4f 100644 --- a/pkg/pb/threshcryptopb/threshcryptopb.pb.go +++ b/pkg/pb/threshcryptopb/threshcryptopb.pb.go @@ -7,13 +7,15 @@ package threshcryptopb import ( + reflect "reflect" + sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + contextstorepb "github.com/filecoin-project/mir/pkg/pb/contextstorepb" dslpb "github.com/filecoin-project/mir/pkg/pb/dslpb" _ "github.com/filecoin-project/mir/pkg/pb/mir" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" ) const ( diff --git a/pkg/pb/transportpb/transportpb.pb.go b/pkg/pb/transportpb/transportpb.pb.go index 15babbc11..ff6fd6516 100644 --- a/pkg/pb/transportpb/transportpb.pb.go +++ b/pkg/pb/transportpb/transportpb.pb.go @@ -7,12 +7,14 @@ package transportpb import ( - messagepb "github.com/filecoin-project/mir/pkg/pb/messagepb" - _ "github.com/filecoin-project/mir/pkg/pb/mir" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + + messagepb "github.com/filecoin-project/mir/pkg/pb/messagepb" + _ "github.com/filecoin-project/mir/pkg/pb/mir" ) const ( diff --git a/pkg/pb/trantorpb/trantorpb.pb.go b/pkg/pb/trantorpb/trantorpb.pb.go index 72c10d176..7707a87a7 100644 --- a/pkg/pb/trantorpb/trantorpb.pb.go +++ b/pkg/pb/trantorpb/trantorpb.pb.go @@ -7,11 +7,13 @@ package trantorpb import ( - _ "github.com/filecoin-project/mir/pkg/pb/mir" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + + _ "github.com/filecoin-project/mir/pkg/pb/mir" ) const ( diff --git a/pkg/transactionreceiver/transactionreceiver.pb.go b/pkg/transactionreceiver/transactionreceiver.pb.go index 8df789148..7e0499e7e 100644 --- a/pkg/transactionreceiver/transactionreceiver.pb.go +++ b/pkg/transactionreceiver/transactionreceiver.pb.go @@ -12,11 +12,13 @@ package transactionreceiver import ( - trantorpb "github.com/filecoin-project/mir/pkg/pb/trantorpb" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + + trantorpb "github.com/filecoin-project/mir/pkg/pb/trantorpb" ) const ( diff --git a/pkg/transactionreceiver/transactionreceiver_grpc.pb.go b/pkg/transactionreceiver/transactionreceiver_grpc.pb.go index f75745de8..c319664f5 100644 --- a/pkg/transactionreceiver/transactionreceiver_grpc.pb.go +++ b/pkg/transactionreceiver/transactionreceiver_grpc.pb.go @@ -8,10 +8,12 @@ package transactionreceiver import ( context "context" - trantorpb "github.com/filecoin-project/mir/pkg/pb/trantorpb" + grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" + + trantorpb "github.com/filecoin-project/mir/pkg/pb/trantorpb" ) // This is a compile-time assertion to ensure that this generated file From 7c4e481fd85da43e4c0201b514fe896aa7b875d0 Mon Sep 17 00:00:00 2001 From: Alejandro Ranchal-Pedrosa Date: Mon, 7 Aug 2023 18:36:22 +0200 Subject: [PATCH 12/14] Re-send messages in critical path to other nodes --- .../simpleacc/accountability.go | 1 + pkg/accountability/simpleacc/common/common.go | 9 ++++-- .../simpleacc/internal/poms/poms.go | 2 +- .../internal/predecisions/predecisions.go | 29 ++++++++++++++----- .../accountabilitypb/accountabilitypb.pb.go | 27 +++++++++++++---- pkg/pb/accountabilitypb/types/types.mir.go | 14 +++++---- .../accountabilitypb/accountabilitypb.proto | 3 +- 7 files changed, 62 insertions(+), 23 deletions(-) diff --git a/pkg/accountability/simpleacc/accountability.go b/pkg/accountability/simpleacc/accountability.go index 01afd78fb..a44627201 100644 --- a/pkg/accountability/simpleacc/accountability.go +++ b/pkg/accountability/simpleacc/accountability.go @@ -125,6 +125,7 @@ func NewReconfigurableModule(mc ModuleConfig, paramsTemplate ModuleParams, logge // Fill in instance-specific parameters. moduleParams := paramsTemplate moduleParams.Membership = accParams.Membership + moduleParams.RetentionIndex = accParams.RetentionIndex // Create a new instance of the multisig collector. accountabilityModule, err := NewModule( diff --git a/pkg/accountability/simpleacc/common/common.go b/pkg/accountability/simpleacc/common/common.go index acb8507e8..97a71db74 100644 --- a/pkg/accountability/simpleacc/common/common.go +++ b/pkg/accountability/simpleacc/common/common.go @@ -6,6 +6,8 @@ import ( "github.com/filecoin-project/mir/pkg/logging" accpbtypes "github.com/filecoin-project/mir/pkg/pb/accountabilitypb/types" trantorpbtypes "github.com/filecoin-project/mir/pkg/pb/trantorpb/types" + timertypes "github.com/filecoin-project/mir/pkg/timer/types" + tt "github.com/filecoin-project/mir/pkg/trantor/types" t "github.com/filecoin-project/mir/pkg/types" ) @@ -17,15 +19,18 @@ type ModuleConfig struct { Ordering t.ModuleID // provides Predecisions App t.ModuleID // receives Decisions and/or PoMs Crypto t.ModuleID // provides cryptographic primitives + Timer t.ModuleID // provides Timing primitives Net t.ModuleID // provides network primitives } // ModuleParams sets the values for the parameters of an instance of the protocol. // All replicas are expected to use identical module parameters. type ModuleParams struct { - Membership *trantorpbtypes.Membership // the list of participating nodes + Membership *trantorpbtypes.Membership // The list of participating nodes. LightCertificates bool - PomsHandler func(m dsl.Module, // function to be called when PoMs detected + ResendFrequency timertypes.Duration // Frequency with which messages in the critical path are re-sent + RetentionIndex tt.RetentionIndex + PoMsHandler func(m dsl.Module, // Function to be called when PoMs detected. mc *ModuleConfig, params *ModuleParams, state *incommon.State, diff --git a/pkg/accountability/simpleacc/internal/poms/poms.go b/pkg/accountability/simpleacc/internal/poms/poms.go index 1cd8c4162..63636ebee 100644 --- a/pkg/accountability/simpleacc/internal/poms/poms.go +++ b/pkg/accountability/simpleacc/internal/poms/poms.go @@ -93,7 +93,7 @@ func HandlePoMs( logger.Log(logging.LevelWarn, "Found valid PoMs! sending...") // Handle PoMs according to the application's logic defined when creating the accountability factory - params.PomsHandler(m, mc, params, state, state.UnhandledPoMs, logger) + params.PoMsHandler(m, mc, params, state, state.UnhandledPoMs, logger) for _, pom := range state.UnhandledPoMs { state.HandledPoMs[pom.NodeId] = pom diff --git a/pkg/accountability/simpleacc/internal/predecisions/predecisions.go b/pkg/accountability/simpleacc/internal/predecisions/predecisions.go index d6e64b5bc..b062f69ee 100644 --- a/pkg/accountability/simpleacc/internal/predecisions/predecisions.go +++ b/pkg/accountability/simpleacc/internal/predecisions/predecisions.go @@ -3,6 +3,9 @@ package predecisions import ( "reflect" + eventpbdsl "github.com/filecoin-project/mir/pkg/pb/eventpb/dsl" + eventpbtypes "github.com/filecoin-project/mir/pkg/pb/eventpb/types" + "github.com/filecoin-project/mir/pkg/accountability/simpleacc/internal/certificates/lightcertificates" isspbdsl "github.com/filecoin-project/mir/pkg/pb/isspb/dsl" isspbtypes "github.com/filecoin-project/mir/pkg/pb/isspb/types" @@ -19,6 +22,7 @@ import ( cryptopbdsl "github.com/filecoin-project/mir/pkg/pb/cryptopb/dsl" cryptopbtypes "github.com/filecoin-project/mir/pkg/pb/cryptopb/types" transportpbdsl "github.com/filecoin-project/mir/pkg/pb/transportpb/dsl" + transportpbevents "github.com/filecoin-project/mir/pkg/pb/transportpb/events" t "github.com/filecoin-project/mir/pkg/types" "github.com/filecoin-project/mir/pkg/util/maputil" "github.com/filecoin-project/mir/pkg/util/membutil" @@ -79,7 +83,13 @@ func IncludePredecisions( state.LocalPredecision.SignedPredecision.Signature = signature // Broadcast signed predecision to all participants (including oneself). - transportpbdsl.SendMessage(m, mc.Net, accpbmsgs.SignedPredecision(mc.Self, sr.data, signature), maputil.GetKeys(params.Membership.Nodes)) + eventpbdsl.TimerRepeat(m, + mc.Timer, + []*eventpbtypes.Event{transportpbevents.SendMessage(mc.Net, accpbmsgs.SignedPredecision(mc.Self, sr.data, signature), maputil.GetKeys(params.Membership.Nodes))}, + params.ResendFrequency, + params.RetentionIndex, + ) + return nil }) @@ -230,13 +240,16 @@ func decide(m dsl.Module, mc *common.ModuleConfig, params *common.ModuleParams, } // Find the actual predecision from other nodes - transportpbdsl.SendMessage( - m, - mc.Net, - accpbmsgs.RequestSBMessage(mc.Self, - predecision), - state.PredecisionNodeIDs[string(predecision)]) - + eventpbdsl.TimerRepeat(m, + mc.Timer, + []*eventpbtypes.Event{transportpbevents.SendMessage( + mc.Net, + accpbmsgs.RequestSBMessage(mc.Self, + predecision), + state.PredecisionNodeIDs[string(predecision)])}, + params.ResendFrequency, + params.RetentionIndex, + ) } func finishWithDecision( diff --git a/pkg/pb/accountabilitypb/accountabilitypb.pb.go b/pkg/pb/accountabilitypb/accountabilitypb.pb.go index 735e03b89..acbe9e463 100644 --- a/pkg/pb/accountabilitypb/accountabilitypb.pb.go +++ b/pkg/pb/accountabilitypb/accountabilitypb.pb.go @@ -434,7 +434,8 @@ type InstanceParams struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Membership *trantorpb.Membership `protobuf:"bytes,3,opt,name=membership,proto3" json:"membership,omitempty"` + Membership *trantorpb.Membership `protobuf:"bytes,1,opt,name=membership,proto3" json:"membership,omitempty"` + RetentionIndex uint64 `protobuf:"varint,2,opt,name=retention_index,json=retentionIndex,proto3" json:"retention_index,omitempty"` } func (x *InstanceParams) Reset() { @@ -476,6 +477,13 @@ func (x *InstanceParams) GetMembership() *trantorpb.Membership { return nil } +func (x *InstanceParams) GetRetentionIndex() uint64 { + if x != nil { + return x.RetentionIndex + } + return 0 +} + type RequestSBMessage struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -658,11 +666,18 @@ var file_accountabilitypb_accountabilitypb_proto_rawDesc = []byte{ 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x04, 0xd0, 0xe4, 0x1d, 0x01, 0x22, - 0x4d, 0x0a, 0x0e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x12, 0x35, 0x0a, 0x0a, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x74, 0x6f, 0x72, 0x70, - 0x62, 0x2e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x52, 0x0a, 0x6d, 0x65, - 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x3a, 0x04, 0x80, 0xa6, 0x1d, 0x01, 0x22, 0x3a, + 0xbc, 0x01, 0x0a, 0x0e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x73, 0x12, 0x35, 0x0a, 0x0a, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x74, 0x6f, 0x72, + 0x70, 0x62, 0x2e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x52, 0x0a, 0x6d, + 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x12, 0x6d, 0x0a, 0x0f, 0x72, 0x65, 0x74, + 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x04, 0x42, 0x44, 0x82, 0xa6, 0x1d, 0x40, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x63, 0x6f, 0x69, 0x6e, 0x2d, 0x70, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x2f, 0x6d, 0x69, 0x72, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x74, 0x72, 0x61, 0x6e, + 0x74, 0x6f, 0x72, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, + 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x0e, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, + 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x3a, 0x04, 0x80, 0xa6, 0x1d, 0x01, 0x22, 0x3a, 0x0a, 0x10, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x53, 0x42, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x72, 0x65, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x70, 0x72, 0x65, 0x64, 0x65, 0x63, 0x69, diff --git a/pkg/pb/accountabilitypb/types/types.mir.go b/pkg/pb/accountabilitypb/types/types.mir.go index 8ff7e79eb..828f69e24 100644 --- a/pkg/pb/accountabilitypb/types/types.mir.go +++ b/pkg/pb/accountabilitypb/types/types.mir.go @@ -6,8 +6,9 @@ import ( mirreflect "github.com/filecoin-project/mir/codegen/mirreflect" types1 "github.com/filecoin-project/mir/codegen/model/types" accountabilitypb "github.com/filecoin-project/mir/pkg/pb/accountabilitypb" - types3 "github.com/filecoin-project/mir/pkg/pb/isspb/types" + types4 "github.com/filecoin-project/mir/pkg/pb/isspb/types" types2 "github.com/filecoin-project/mir/pkg/pb/trantorpb/types" + types3 "github.com/filecoin-project/mir/pkg/trantor/types" types "github.com/filecoin-project/mir/pkg/types" reflectutil "github.com/filecoin-project/mir/pkg/util/reflectutil" ) @@ -389,7 +390,8 @@ func (*FullCertificate) MirReflect() mirreflect.Type { } type InstanceParams struct { - Membership *types2.Membership + Membership *types2.Membership + RetentionIndex types3.RetentionIndex } func InstanceParamsFromPb(pb *accountabilitypb.InstanceParams) *InstanceParams { @@ -397,7 +399,8 @@ func InstanceParamsFromPb(pb *accountabilitypb.InstanceParams) *InstanceParams { return nil } return &InstanceParams{ - Membership: types2.MembershipFromPb(pb.Membership), + Membership: types2.MembershipFromPb(pb.Membership), + RetentionIndex: (types3.RetentionIndex)(pb.RetentionIndex), } } @@ -410,6 +413,7 @@ func (m *InstanceParams) Pb() *accountabilitypb.InstanceParams { if m.Membership != nil { pbMessage.Membership = (m.Membership).Pb() } + pbMessage.RetentionIndex = (uint64)(m.RetentionIndex) } return pbMessage @@ -449,7 +453,7 @@ func (*RequestSBMessage) MirReflect() mirreflect.Type { } type ProvideSBMessage struct { - SbDeliver *types3.SBDeliver + SbDeliver *types4.SBDeliver } func ProvideSBMessageFromPb(pb *accountabilitypb.ProvideSBMessage) *ProvideSBMessage { @@ -457,7 +461,7 @@ func ProvideSBMessageFromPb(pb *accountabilitypb.ProvideSBMessage) *ProvideSBMes return nil } return &ProvideSBMessage{ - SbDeliver: types3.SBDeliverFromPb(pb.SbDeliver), + SbDeliver: types4.SBDeliverFromPb(pb.SbDeliver), } } diff --git a/protos/accountabilitypb/accountabilitypb.proto b/protos/accountabilitypb/accountabilitypb.proto index 7229b7d9f..929ffefea 100644 --- a/protos/accountabilitypb/accountabilitypb.proto +++ b/protos/accountabilitypb/accountabilitypb.proto @@ -63,7 +63,8 @@ message FullCertificate { message InstanceParams { option (mir.struct) = true; - trantorpb.Membership membership = 3; + trantorpb.Membership membership = 1; + uint64 retention_index = 2 [(mir.type) = "github.com/filecoin-project/mir/pkg/trantor/types.RetentionIndex"]; } From 2c76ffd1f2fe5f96458261ee8b4d186c7ee32a68 Mon Sep 17 00:00:00 2001 From: Alejandro Ranchal-Pedrosa Date: Mon, 7 Aug 2023 19:07:08 +0200 Subject: [PATCH 13/14] Removed Unnecessary Request/Provide messages --- .../internal/predecisions/predecisions.go | 103 ++--- .../accountabilitypb/accountabilitypb.pb.go | 381 +++++------------- .../accountabilitypb.pb.mir.go | 2 - pkg/pb/accountabilitypb/dsl/messages.mir.go | 13 - pkg/pb/accountabilitypb/msgs/msgs.mir.go | 31 -- .../accountabilitypb/oneof_interfaces.mir.go | 8 - pkg/pb/accountabilitypb/types/types.mir.go | 113 ------ .../accountabilitypb/accountabilitypb.proto | 16 - 8 files changed, 139 insertions(+), 528 deletions(-) diff --git a/pkg/accountability/simpleacc/internal/predecisions/predecisions.go b/pkg/accountability/simpleacc/internal/predecisions/predecisions.go index b062f69ee..e91bd1be3 100644 --- a/pkg/accountability/simpleacc/internal/predecisions/predecisions.go +++ b/pkg/accountability/simpleacc/internal/predecisions/predecisions.go @@ -2,6 +2,9 @@ package predecisions import ( "reflect" + "sync" + + "github.com/fxamacker/cbor/v2" eventpbdsl "github.com/filecoin-project/mir/pkg/pb/eventpb/dsl" eventpbtypes "github.com/filecoin-project/mir/pkg/pb/eventpb/types" @@ -60,7 +63,12 @@ func IncludePredecisions( InstanceId: instanceId, } - serializedPredecision := serializePredecision(predecision) + serializedPredecision, err := serializePredecision(predecision) + + if err != nil { + logger.Log(logging.LevelError, "Error serializing predecision", err) + return err + } state.LocalPredecision = &incommon.LocalPredecision{ SBDeliver: predecision, @@ -187,7 +195,12 @@ func ApplySigVerified( } // Now decision is not just the bytes, need to retrieve actual decision. - decide(m, mc, params, state, sp.Predecision, logger) + sb, err := deserializePredecision(state.DecidedCertificate.Decision) + if err != nil { + logger.Log(logging.LevelWarn, "Error deserializing predecision: %v", err) + return + } + decide(m, mc, params, state, sb, logger) if params.LightCertificates { transportpbdsl.SendMessage( @@ -207,83 +220,39 @@ func ApplySigVerified( } } - accpbdsl.UponRequestSBMessageReceived(m, func(from t.NodeID, predecision []byte) error { - if reflect.DeepEqual(predecision, state.LocalPredecision.SignedPredecision.Predecision) { - transportpbdsl.SendMessage(m, - mc.Net, - accpbmsgs.ProvideSBMessage(mc.Self, state.LocalPredecision.SBDeliver), - []t.NodeID{from}) - } - return nil - }) - - accpbdsl.UponProvideSBMessageReceived(m, func(from t.NodeID, sbDeliver *isspbtypes.SBDeliver) error { - if state.DecidedCertificate == nil { - logger.Log(logging.LevelDebug, "Ignoring received SBDeliver message from node %v, no local decision yet", from) - return nil - } - - if reflect.DeepEqual(state.DecidedCertificate.Decision, serializePredecision(sbDeliver)) { - finishWithDecision(m, mc, params, state, sbDeliver, logger) - } - - return nil - }) } -func decide(m dsl.Module, mc *common.ModuleConfig, params *common.ModuleParams, state *incommon.State, predecision []byte, logger logging.Logger) { - // Retrieve actual decision. - if reflect.DeepEqual(predecision, state.LocalPredecision.SignedPredecision.Predecision) { - sb := state.LocalPredecision.SBDeliver // convenience variable. - finishWithDecision(m, mc, params, state, sb, logger) - return - } - - // Find the actual predecision from other nodes - eventpbdsl.TimerRepeat(m, - mc.Timer, - []*eventpbtypes.Event{transportpbevents.SendMessage( - mc.Net, - accpbmsgs.RequestSBMessage(mc.Self, - predecision), - state.PredecisionNodeIDs[string(predecision)])}, - params.ResendFrequency, - params.RetentionIndex, - ) -} - -func finishWithDecision( - m dsl.Module, - mc *common.ModuleConfig, - params *common.ModuleParams, - state *incommon.State, - sb *isspbtypes.SBDeliver, - logger logging.Logger, -) { - +func decide(m dsl.Module, mc *common.ModuleConfig, params *common.ModuleParams, state *incommon.State, sb *isspbtypes.SBDeliver, logger logging.Logger) { isspbdsl.SBDeliver(m, mc.App, sb.Sn, sb.Data, sb.Aborted, sb.Leader, sb.InstanceId) if params.LightCertificates { lightcertificates.ApplyLightCertificatesBuffered(m, mc, state, logger) } - } -func serializePredecision(sbDeliver *isspbtypes.SBDeliver) []byte { - b := make([]byte, 0) - b = append(b, sbDeliver.Sn.Bytes()...) - b = append(b, sbDeliver.Data...) - - abortedByte := uint8(0) - if sbDeliver.Aborted { - abortedByte = uint8(1) +func serializePredecision(sbDeliver *isspbtypes.SBDeliver) ([]byte, error) { + ser, err := getEncMode().Marshal(sbDeliver) + if err != nil { + return nil, err } + return ser, nil +} - b = append(b, abortedByte) - b = append(b, sbDeliver.Leader...) - b = append(b, sbDeliver.InstanceId...) - return b +func deserializePredecision(data []byte) (*isspbtypes.SBDeliver, error) { + sb := &isspbtypes.SBDeliver{} + err := cbor.Unmarshal(data, sb) + return sb, err } type signRequest struct { data []byte } + +var encMode cbor.EncMode +var once sync.Once + +func getEncMode() cbor.EncMode { + once.Do(func() { + encMode, _ = cbor.CoreDetEncOptions().EncMode() + }) + return encMode +} diff --git a/pkg/pb/accountabilitypb/accountabilitypb.pb.go b/pkg/pb/accountabilitypb/accountabilitypb.pb.go index acbe9e463..1f3bbb355 100644 --- a/pkg/pb/accountabilitypb/accountabilitypb.pb.go +++ b/pkg/pb/accountabilitypb/accountabilitypb.pb.go @@ -13,7 +13,6 @@ import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - isspb "github.com/filecoin-project/mir/pkg/pb/isspb" _ "github.com/filecoin-project/mir/pkg/pb/mir" _ "github.com/filecoin-project/mir/pkg/pb/net" trantorpb "github.com/filecoin-project/mir/pkg/pb/trantorpb" @@ -193,8 +192,6 @@ type Message struct { // *Message_Certificate // *Message_Poms // *Message_LightCertificate - // *Message_RequestSbMessage - // *Message_ProvideSbMessage Type isMessage_Type `protobuf_oneof:"type"` } @@ -265,20 +262,6 @@ func (x *Message) GetLightCertificate() *LightCertificate { return nil } -func (x *Message) GetRequestSbMessage() *RequestSBMessage { - if x, ok := x.GetType().(*Message_RequestSbMessage); ok { - return x.RequestSbMessage - } - return nil -} - -func (x *Message) GetProvideSbMessage() *ProvideSBMessage { - if x, ok := x.GetType().(*Message_ProvideSbMessage); ok { - return x.ProvideSbMessage - } - return nil -} - type isMessage_Type interface { isMessage_Type() } @@ -299,14 +282,6 @@ type Message_LightCertificate struct { LightCertificate *LightCertificate `protobuf:"bytes,4,opt,name=light_certificate,json=lightCertificate,proto3,oneof"` } -type Message_RequestSbMessage struct { - RequestSbMessage *RequestSBMessage `protobuf:"bytes,5,opt,name=request_sb_message,json=requestSbMessage,proto3,oneof"` -} - -type Message_ProvideSbMessage struct { - ProvideSbMessage *ProvideSBMessage `protobuf:"bytes,6,opt,name=provide_sb_message,json=provideSbMessage,proto3,oneof"` -} - func (*Message_SignedPredecision) isMessage_Type() {} func (*Message_Certificate) isMessage_Type() {} @@ -315,10 +290,6 @@ func (*Message_Poms) isMessage_Type() {} func (*Message_LightCertificate) isMessage_Type() {} -func (*Message_RequestSbMessage) isMessage_Type() {} - -func (*Message_ProvideSbMessage) isMessage_Type() {} - type SignedPredecision struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -484,100 +455,6 @@ func (x *InstanceParams) GetRetentionIndex() uint64 { return 0 } -type RequestSBMessage struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Predecision []byte `protobuf:"bytes,1,opt,name=predecision,proto3" json:"predecision,omitempty"` -} - -func (x *RequestSBMessage) Reset() { - *x = RequestSBMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_accountabilitypb_accountabilitypb_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RequestSBMessage) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RequestSBMessage) ProtoMessage() {} - -func (x *RequestSBMessage) ProtoReflect() protoreflect.Message { - mi := &file_accountabilitypb_accountabilitypb_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RequestSBMessage.ProtoReflect.Descriptor instead. -func (*RequestSBMessage) Descriptor() ([]byte, []int) { - return file_accountabilitypb_accountabilitypb_proto_rawDescGZIP(), []int{7} -} - -func (x *RequestSBMessage) GetPredecision() []byte { - if x != nil { - return x.Predecision - } - return nil -} - -type ProvideSBMessage struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - SbDeliver *isspb.SBDeliver `protobuf:"bytes,1,opt,name=sb_deliver,json=sbDeliver,proto3" json:"sb_deliver,omitempty"` -} - -func (x *ProvideSBMessage) Reset() { - *x = ProvideSBMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_accountabilitypb_accountabilitypb_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ProvideSBMessage) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ProvideSBMessage) ProtoMessage() {} - -func (x *ProvideSBMessage) ProtoReflect() protoreflect.Message { - mi := &file_accountabilitypb_accountabilitypb_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ProvideSBMessage.ProtoReflect.Descriptor instead. -func (*ProvideSBMessage) Descriptor() ([]byte, []int) { - return file_accountabilitypb_accountabilitypb_proto_rawDescGZIP(), []int{8} -} - -func (x *ProvideSBMessage) GetSbDeliver() *isspb.SBDeliver { - if x != nil { - return x.SbDeliver - } - return nil -} - var File_accountabilitypb_accountabilitypb_proto protoreflect.FileDescriptor var file_accountabilitypb_accountabilitypb_proto_rawDesc = []byte{ @@ -586,111 +463,91 @@ var file_accountabilitypb_accountabilitypb_proto_rawDesc = []byte{ 0x79, 0x70, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x10, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x70, 0x62, 0x1a, 0x19, 0x74, 0x72, 0x61, 0x6e, 0x74, 0x6f, 0x72, 0x70, 0x62, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x74, 0x6f, 0x72, 0x70, 0x62, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x11, 0x69, 0x73, 0x73, 0x70, 0x62, 0x2f, 0x69, 0x73, - 0x73, 0x70, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x6e, 0x65, 0x74, 0x2f, 0x63, - 0x6f, 0x64, 0x65, 0x67, 0x65, 0x6e, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x6d, 0x69, 0x72, 0x2f, 0x63, 0x6f, 0x64, - 0x65, 0x67, 0x65, 0x6e, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xfc, 0x01, 0x0a, 0x03, 0x50, 0x6f, 0x4d, 0x12, 0x4d, 0x0a, - 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x34, - 0x82, 0xa6, 0x1d, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x66, - 0x69, 0x6c, 0x65, 0x63, 0x6f, 0x69, 0x6e, 0x2d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, - 0x6d, 0x69, 0x72, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x4e, 0x6f, - 0x64, 0x65, 0x49, 0x44, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x4f, 0x0a, 0x11, - 0x63, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x6d, 0x73, 0x67, 0x5f, - 0x31, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x70, 0x62, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, - 0x64, 0x50, 0x72, 0x65, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0f, 0x63, 0x6f, - 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x69, 0x6e, 0x67, 0x4d, 0x73, 0x67, 0x31, 0x12, 0x4f, 0x0a, - 0x11, 0x63, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x6d, 0x73, 0x67, - 0x5f, 0x32, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x70, 0x62, 0x2e, 0x53, 0x69, 0x67, 0x6e, - 0x65, 0x64, 0x50, 0x72, 0x65, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0f, 0x63, - 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x69, 0x6e, 0x67, 0x4d, 0x73, 0x67, 0x32, 0x3a, 0x04, - 0x80, 0xa6, 0x1d, 0x01, 0x22, 0x2c, 0x0a, 0x10, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x43, 0x65, 0x72, - 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x3a, 0x04, 0xd0, 0xe4, - 0x1d, 0x01, 0x22, 0x37, 0x0a, 0x04, 0x50, 0x6f, 0x4d, 0x73, 0x12, 0x29, 0x0a, 0x04, 0x70, 0x6f, - 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x70, 0x62, 0x2e, 0x50, 0x6f, 0x4d, 0x52, - 0x04, 0x70, 0x6f, 0x6d, 0x73, 0x3a, 0x04, 0xd0, 0xe4, 0x1d, 0x01, 0x22, 0xe3, 0x03, 0x0a, 0x07, - 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x54, 0x0a, 0x12, 0x73, 0x69, 0x67, 0x6e, 0x65, - 0x64, 0x5f, 0x70, 0x72, 0x65, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x62, 0x69, - 0x6c, 0x69, 0x74, 0x79, 0x70, 0x62, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x50, 0x72, 0x65, - 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x11, 0x73, 0x69, 0x67, 0x6e, - 0x65, 0x64, 0x50, 0x72, 0x65, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x45, 0x0a, - 0x0b, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x62, 0x69, 0x6c, - 0x69, 0x74, 0x79, 0x70, 0x62, 0x2e, 0x46, 0x75, 0x6c, 0x6c, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, - 0x69, 0x63, 0x61, 0x74, 0x65, 0x48, 0x00, 0x52, 0x0b, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, - 0x63, 0x61, 0x74, 0x65, 0x12, 0x2c, 0x0a, 0x04, 0x70, 0x6f, 0x6d, 0x73, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x62, 0x69, 0x6c, - 0x69, 0x74, 0x79, 0x70, 0x62, 0x2e, 0x50, 0x6f, 0x4d, 0x73, 0x48, 0x00, 0x52, 0x04, 0x70, 0x6f, - 0x6d, 0x73, 0x12, 0x51, 0x0a, 0x11, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x5f, 0x63, 0x65, 0x72, 0x74, - 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, - 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x70, 0x62, - 0x2e, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, - 0x65, 0x48, 0x00, 0x52, 0x10, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, - 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x52, 0x0a, 0x12, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x5f, 0x73, 0x62, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x22, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x62, 0x69, 0x6c, 0x69, - 0x74, 0x79, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x53, 0x42, 0x4d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x48, 0x00, 0x52, 0x10, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x53, 0x62, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x52, 0x0a, 0x12, 0x70, 0x72, 0x6f, - 0x76, 0x69, 0x64, 0x65, 0x5f, 0x73, 0x62, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, - 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x70, 0x62, 0x2e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, - 0x53, 0x42, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x48, 0x00, 0x52, 0x10, 0x70, 0x72, 0x6f, - 0x76, 0x69, 0x64, 0x65, 0x53, 0x62, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x3a, 0x04, 0xc8, - 0xe4, 0x1d, 0x01, 0x42, 0x0c, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x04, 0xc8, 0xe4, 0x1d, - 0x01, 0x22, 0x5d, 0x0a, 0x11, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x50, 0x72, 0x65, 0x64, 0x65, - 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x72, 0x65, 0x64, 0x65, 0x63, - 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x70, 0x72, 0x65, - 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, - 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x69, 0x67, - 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x3a, 0x08, 0xd0, 0xe4, 0x1d, 0x01, 0x80, 0xa6, 0x1d, 0x01, - 0x22, 0xfc, 0x01, 0x0a, 0x0f, 0x46, 0x75, 0x6c, 0x6c, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, - 0x63, 0x61, 0x74, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, - 0x12, 0x87, 0x01, 0x0a, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, - 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, - 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x70, 0x62, 0x2e, 0x46, 0x75, 0x6c, 0x6c, 0x43, 0x65, 0x72, - 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, - 0x72, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x34, 0xaa, 0xa6, 0x1d, 0x30, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x63, 0x6f, 0x69, - 0x6e, 0x2d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x6d, 0x69, 0x72, 0x2f, 0x70, 0x6b, - 0x67, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x44, 0x52, 0x0a, - 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x1a, 0x3d, 0x0a, 0x0f, 0x53, 0x69, - 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, - 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, - 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x04, 0xd0, 0xe4, 0x1d, 0x01, 0x22, - 0xbc, 0x01, 0x0a, 0x0e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x12, 0x35, 0x0a, 0x0a, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x74, 0x6f, 0x72, - 0x70, 0x62, 0x2e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x52, 0x0a, 0x6d, - 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x12, 0x6d, 0x0a, 0x0f, 0x72, 0x65, 0x74, - 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x04, 0x42, 0x44, 0x82, 0xa6, 0x1d, 0x40, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x63, 0x6f, 0x69, 0x6e, 0x2d, 0x70, 0x72, 0x6f, 0x6a, - 0x65, 0x63, 0x74, 0x2f, 0x6d, 0x69, 0x72, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x74, 0x72, 0x61, 0x6e, - 0x74, 0x6f, 0x72, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, - 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x0e, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, - 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x3a, 0x04, 0x80, 0xa6, 0x1d, 0x01, 0x22, 0x3a, - 0x0a, 0x10, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x53, 0x42, 0x4d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x72, 0x65, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, - 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x70, 0x72, 0x65, 0x64, 0x65, 0x63, 0x69, - 0x73, 0x69, 0x6f, 0x6e, 0x3a, 0x04, 0xd0, 0xe4, 0x1d, 0x01, 0x22, 0x49, 0x0a, 0x10, 0x50, 0x72, - 0x6f, 0x76, 0x69, 0x64, 0x65, 0x53, 0x42, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x2f, - 0x0a, 0x0a, 0x73, 0x62, 0x5f, 0x64, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x69, 0x73, 0x73, 0x70, 0x62, 0x2e, 0x53, 0x42, 0x44, 0x65, 0x6c, - 0x69, 0x76, 0x65, 0x72, 0x52, 0x09, 0x73, 0x62, 0x44, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x3a, - 0x04, 0xd0, 0xe4, 0x1d, 0x01, 0x42, 0x39, 0x5a, 0x37, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x63, 0x6f, 0x69, 0x6e, 0x2d, 0x70, 0x72, 0x6f, - 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x6d, 0x69, 0x72, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x62, 0x2f, - 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x70, 0x62, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x6e, 0x65, 0x74, 0x2f, 0x63, 0x6f, 0x64, 0x65, + 0x67, 0x65, 0x6e, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x6d, 0x69, 0x72, 0x2f, 0x63, 0x6f, 0x64, 0x65, 0x67, 0x65, + 0x6e, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x22, 0xfc, 0x01, 0x0a, 0x03, 0x50, 0x6f, 0x4d, 0x12, 0x4d, 0x0a, 0x07, 0x6e, 0x6f, + 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x34, 0x82, 0xa6, 0x1d, + 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x66, 0x69, 0x6c, 0x65, + 0x63, 0x6f, 0x69, 0x6e, 0x2d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x6d, 0x69, 0x72, + 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x49, + 0x44, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x4f, 0x0a, 0x11, 0x63, 0x6f, 0x6e, + 0x66, 0x6c, 0x69, 0x63, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x6d, 0x73, 0x67, 0x5f, 0x31, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x62, + 0x69, 0x6c, 0x69, 0x74, 0x79, 0x70, 0x62, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x50, 0x72, + 0x65, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x66, 0x6c, + 0x69, 0x63, 0x74, 0x69, 0x6e, 0x67, 0x4d, 0x73, 0x67, 0x31, 0x12, 0x4f, 0x0a, 0x11, 0x63, 0x6f, + 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x6d, 0x73, 0x67, 0x5f, 0x32, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, + 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x70, 0x62, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x50, + 0x72, 0x65, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x66, + 0x6c, 0x69, 0x63, 0x74, 0x69, 0x6e, 0x67, 0x4d, 0x73, 0x67, 0x32, 0x3a, 0x04, 0x80, 0xa6, 0x1d, + 0x01, 0x22, 0x2c, 0x0a, 0x10, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, + 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x3a, 0x04, 0xd0, 0xe4, 0x1d, 0x01, 0x22, + 0x37, 0x0a, 0x04, 0x50, 0x6f, 0x4d, 0x73, 0x12, 0x29, 0x0a, 0x04, 0x70, 0x6f, 0x6d, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, + 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x70, 0x62, 0x2e, 0x50, 0x6f, 0x4d, 0x52, 0x04, 0x70, 0x6f, + 0x6d, 0x73, 0x3a, 0x04, 0xd0, 0xe4, 0x1d, 0x01, 0x22, 0xbb, 0x02, 0x0a, 0x07, 0x4d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x12, 0x54, 0x0a, 0x12, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, 0x70, + 0x72, 0x65, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x23, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, + 0x79, 0x70, 0x62, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x50, 0x72, 0x65, 0x64, 0x65, 0x63, + 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x11, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x50, + 0x72, 0x65, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x45, 0x0a, 0x0b, 0x63, 0x65, + 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x21, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, + 0x70, 0x62, 0x2e, 0x46, 0x75, 0x6c, 0x6c, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, + 0x74, 0x65, 0x48, 0x00, 0x52, 0x0b, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, + 0x65, 0x12, 0x2c, 0x0a, 0x04, 0x70, 0x6f, 0x6d, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x16, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, + 0x70, 0x62, 0x2e, 0x50, 0x6f, 0x4d, 0x73, 0x48, 0x00, 0x52, 0x04, 0x70, 0x6f, 0x6d, 0x73, 0x12, + 0x51, 0x0a, 0x11, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, + 0x63, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x61, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x70, 0x62, 0x2e, 0x4c, 0x69, + 0x67, 0x68, 0x74, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x48, 0x00, + 0x52, 0x10, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, + 0x74, 0x65, 0x3a, 0x04, 0xc8, 0xe4, 0x1d, 0x01, 0x42, 0x0c, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, + 0x12, 0x04, 0xc8, 0xe4, 0x1d, 0x01, 0x22, 0x5d, 0x0a, 0x11, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, + 0x50, 0x72, 0x65, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x70, + 0x72, 0x65, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x0b, 0x70, 0x72, 0x65, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, + 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x3a, 0x08, 0xd0, 0xe4, 0x1d, + 0x01, 0x80, 0xa6, 0x1d, 0x01, 0x22, 0xfc, 0x01, 0x0a, 0x0f, 0x46, 0x75, 0x6c, 0x6c, 0x43, 0x65, + 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x65, 0x63, + 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x64, 0x65, 0x63, + 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x87, 0x01, 0x0a, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x61, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x70, 0x62, 0x2e, 0x46, 0x75, + 0x6c, 0x6c, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x2e, 0x53, 0x69, + 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x34, 0xaa, + 0xa6, 0x1d, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x66, 0x69, + 0x6c, 0x65, 0x63, 0x6f, 0x69, 0x6e, 0x2d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x6d, + 0x69, 0x72, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x4e, 0x6f, 0x64, + 0x65, 0x49, 0x44, 0x52, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x1a, + 0x3d, 0x0a, 0x0f, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x04, + 0xd0, 0xe4, 0x1d, 0x01, 0x22, 0xbc, 0x01, 0x0a, 0x0e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, + 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x35, 0x0a, 0x0a, 0x6d, 0x65, 0x6d, 0x62, 0x65, + 0x72, 0x73, 0x68, 0x69, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x72, + 0x61, 0x6e, 0x74, 0x6f, 0x72, 0x70, 0x62, 0x2e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, + 0x69, 0x70, 0x52, 0x0a, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x12, 0x6d, + 0x0a, 0x0f, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x64, 0x65, + 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, 0x44, 0x82, 0xa6, 0x1d, 0x40, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x63, 0x6f, 0x69, 0x6e, + 0x2d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x6d, 0x69, 0x72, 0x2f, 0x70, 0x6b, 0x67, + 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x74, 0x6f, 0x72, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x52, + 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x0e, 0x72, + 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x3a, 0x04, 0x80, + 0xa6, 0x1d, 0x01, 0x42, 0x39, 0x5a, 0x37, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x63, 0x6f, 0x69, 0x6e, 0x2d, 0x70, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x2f, 0x6d, 0x69, 0x72, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x62, 0x2f, 0x61, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x70, 0x62, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -705,7 +562,7 @@ func file_accountabilitypb_accountabilitypb_proto_rawDescGZIP() []byte { return file_accountabilitypb_accountabilitypb_proto_rawDescData } -var file_accountabilitypb_accountabilitypb_proto_msgTypes = make([]protoimpl.MessageInfo, 10) +var file_accountabilitypb_accountabilitypb_proto_msgTypes = make([]protoimpl.MessageInfo, 8) var file_accountabilitypb_accountabilitypb_proto_goTypes = []interface{}{ (*PoM)(nil), // 0: accountabilitypb.PoM (*LightCertificate)(nil), // 1: accountabilitypb.LightCertificate @@ -714,30 +571,24 @@ var file_accountabilitypb_accountabilitypb_proto_goTypes = []interface{}{ (*SignedPredecision)(nil), // 4: accountabilitypb.SignedPredecision (*FullCertificate)(nil), // 5: accountabilitypb.FullCertificate (*InstanceParams)(nil), // 6: accountabilitypb.InstanceParams - (*RequestSBMessage)(nil), // 7: accountabilitypb.RequestSBMessage - (*ProvideSBMessage)(nil), // 8: accountabilitypb.ProvideSBMessage - nil, // 9: accountabilitypb.FullCertificate.SignaturesEntry - (*trantorpb.Membership)(nil), // 10: trantorpb.Membership - (*isspb.SBDeliver)(nil), // 11: isspb.SBDeliver + nil, // 7: accountabilitypb.FullCertificate.SignaturesEntry + (*trantorpb.Membership)(nil), // 8: trantorpb.Membership } var file_accountabilitypb_accountabilitypb_proto_depIdxs = []int32{ - 4, // 0: accountabilitypb.PoM.conflicting_msg_1:type_name -> accountabilitypb.SignedPredecision - 4, // 1: accountabilitypb.PoM.conflicting_msg_2:type_name -> accountabilitypb.SignedPredecision - 0, // 2: accountabilitypb.PoMs.poms:type_name -> accountabilitypb.PoM - 4, // 3: accountabilitypb.Message.signed_predecision:type_name -> accountabilitypb.SignedPredecision - 5, // 4: accountabilitypb.Message.certificate:type_name -> accountabilitypb.FullCertificate - 2, // 5: accountabilitypb.Message.poms:type_name -> accountabilitypb.PoMs - 1, // 6: accountabilitypb.Message.light_certificate:type_name -> accountabilitypb.LightCertificate - 7, // 7: accountabilitypb.Message.request_sb_message:type_name -> accountabilitypb.RequestSBMessage - 8, // 8: accountabilitypb.Message.provide_sb_message:type_name -> accountabilitypb.ProvideSBMessage - 9, // 9: accountabilitypb.FullCertificate.signatures:type_name -> accountabilitypb.FullCertificate.SignaturesEntry - 10, // 10: accountabilitypb.InstanceParams.membership:type_name -> trantorpb.Membership - 11, // 11: accountabilitypb.ProvideSBMessage.sb_deliver:type_name -> isspb.SBDeliver - 12, // [12:12] is the sub-list for method output_type - 12, // [12:12] is the sub-list for method input_type - 12, // [12:12] is the sub-list for extension type_name - 12, // [12:12] is the sub-list for extension extendee - 0, // [0:12] is the sub-list for field type_name + 4, // 0: accountabilitypb.PoM.conflicting_msg_1:type_name -> accountabilitypb.SignedPredecision + 4, // 1: accountabilitypb.PoM.conflicting_msg_2:type_name -> accountabilitypb.SignedPredecision + 0, // 2: accountabilitypb.PoMs.poms:type_name -> accountabilitypb.PoM + 4, // 3: accountabilitypb.Message.signed_predecision:type_name -> accountabilitypb.SignedPredecision + 5, // 4: accountabilitypb.Message.certificate:type_name -> accountabilitypb.FullCertificate + 2, // 5: accountabilitypb.Message.poms:type_name -> accountabilitypb.PoMs + 1, // 6: accountabilitypb.Message.light_certificate:type_name -> accountabilitypb.LightCertificate + 7, // 7: accountabilitypb.FullCertificate.signatures:type_name -> accountabilitypb.FullCertificate.SignaturesEntry + 8, // 8: accountabilitypb.InstanceParams.membership:type_name -> trantorpb.Membership + 9, // [9:9] is the sub-list for method output_type + 9, // [9:9] is the sub-list for method input_type + 9, // [9:9] is the sub-list for extension type_name + 9, // [9:9] is the sub-list for extension extendee + 0, // [0:9] is the sub-list for field type_name } func init() { file_accountabilitypb_accountabilitypb_proto_init() } @@ -830,38 +681,12 @@ func file_accountabilitypb_accountabilitypb_proto_init() { return nil } } - file_accountabilitypb_accountabilitypb_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RequestSBMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_accountabilitypb_accountabilitypb_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ProvideSBMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } } file_accountabilitypb_accountabilitypb_proto_msgTypes[3].OneofWrappers = []interface{}{ (*Message_SignedPredecision)(nil), (*Message_Certificate)(nil), (*Message_Poms)(nil), (*Message_LightCertificate)(nil), - (*Message_RequestSbMessage)(nil), - (*Message_ProvideSbMessage)(nil), } type x struct{} out := protoimpl.TypeBuilder{ @@ -869,7 +694,7 @@ func file_accountabilitypb_accountabilitypb_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_accountabilitypb_accountabilitypb_proto_rawDesc, NumEnums: 0, - NumMessages: 10, + NumMessages: 8, NumExtensions: 0, NumServices: 0, }, diff --git a/pkg/pb/accountabilitypb/accountabilitypb.pb.mir.go b/pkg/pb/accountabilitypb/accountabilitypb.pb.mir.go index c5ca689d3..fcd922fa0 100644 --- a/pkg/pb/accountabilitypb/accountabilitypb.pb.mir.go +++ b/pkg/pb/accountabilitypb/accountabilitypb.pb.mir.go @@ -12,7 +12,5 @@ func (*Message) ReflectTypeOptions() []reflect.Type { reflect.TypeOf((*Message_Certificate)(nil)), reflect.TypeOf((*Message_Poms)(nil)), reflect.TypeOf((*Message_LightCertificate)(nil)), - reflect.TypeOf((*Message_RequestSbMessage)(nil)), - reflect.TypeOf((*Message_ProvideSbMessage)(nil)), } } diff --git a/pkg/pb/accountabilitypb/dsl/messages.mir.go b/pkg/pb/accountabilitypb/dsl/messages.mir.go index 6469d701f..7f74c952b 100644 --- a/pkg/pb/accountabilitypb/dsl/messages.mir.go +++ b/pkg/pb/accountabilitypb/dsl/messages.mir.go @@ -5,7 +5,6 @@ package accountabilitypbdsl import ( dsl "github.com/filecoin-project/mir/pkg/dsl" types "github.com/filecoin-project/mir/pkg/pb/accountabilitypb/types" - types3 "github.com/filecoin-project/mir/pkg/pb/isspb/types" dsl1 "github.com/filecoin-project/mir/pkg/pb/messagepb/dsl" types2 "github.com/filecoin-project/mir/pkg/pb/messagepb/types" types1 "github.com/filecoin-project/mir/pkg/types" @@ -47,15 +46,3 @@ func UponLightCertificateReceived(m dsl.Module, handler func(from types1.NodeID, return handler(from, msg.Data) }) } - -func UponRequestSBMessageReceived(m dsl.Module, handler func(from types1.NodeID, predecision []uint8) error) { - UponMessageReceived[*types.Message_RequestSbMessage](m, func(from types1.NodeID, msg *types.RequestSBMessage) error { - return handler(from, msg.Predecision) - }) -} - -func UponProvideSBMessageReceived(m dsl.Module, handler func(from types1.NodeID, sbDeliver *types3.SBDeliver) error) { - UponMessageReceived[*types.Message_ProvideSbMessage](m, func(from types1.NodeID, msg *types.ProvideSBMessage) error { - return handler(from, msg.SbDeliver) - }) -} diff --git a/pkg/pb/accountabilitypb/msgs/msgs.mir.go b/pkg/pb/accountabilitypb/msgs/msgs.mir.go index aea5a890b..d48c1e6b3 100644 --- a/pkg/pb/accountabilitypb/msgs/msgs.mir.go +++ b/pkg/pb/accountabilitypb/msgs/msgs.mir.go @@ -4,7 +4,6 @@ package accountabilitypbmsgs import ( types2 "github.com/filecoin-project/mir/pkg/pb/accountabilitypb/types" - types3 "github.com/filecoin-project/mir/pkg/pb/isspb/types" types1 "github.com/filecoin-project/mir/pkg/pb/messagepb/types" types "github.com/filecoin-project/mir/pkg/types" ) @@ -70,33 +69,3 @@ func LightCertificate(destModule types.ModuleID, data []uint8) *types1.Message { }, } } - -func RequestSBMessage(destModule types.ModuleID, predecision []uint8) *types1.Message { - return &types1.Message{ - DestModule: destModule, - Type: &types1.Message_Accountability{ - Accountability: &types2.Message{ - Type: &types2.Message_RequestSbMessage{ - RequestSbMessage: &types2.RequestSBMessage{ - Predecision: predecision, - }, - }, - }, - }, - } -} - -func ProvideSBMessage(destModule types.ModuleID, sbDeliver *types3.SBDeliver) *types1.Message { - return &types1.Message{ - DestModule: destModule, - Type: &types1.Message_Accountability{ - Accountability: &types2.Message{ - Type: &types2.Message_ProvideSbMessage{ - ProvideSbMessage: &types2.ProvideSBMessage{ - SbDeliver: sbDeliver, - }, - }, - }, - }, - } -} diff --git a/pkg/pb/accountabilitypb/oneof_interfaces.mir.go b/pkg/pb/accountabilitypb/oneof_interfaces.mir.go index a88d3a005..df9bf3f65 100644 --- a/pkg/pb/accountabilitypb/oneof_interfaces.mir.go +++ b/pkg/pb/accountabilitypb/oneof_interfaces.mir.go @@ -24,11 +24,3 @@ func (w *Message_Poms) Unwrap() *PoMs { func (w *Message_LightCertificate) Unwrap() *LightCertificate { return w.LightCertificate } - -func (w *Message_RequestSbMessage) Unwrap() *RequestSBMessage { - return w.RequestSbMessage -} - -func (w *Message_ProvideSbMessage) Unwrap() *ProvideSBMessage { - return w.ProvideSbMessage -} diff --git a/pkg/pb/accountabilitypb/types/types.mir.go b/pkg/pb/accountabilitypb/types/types.mir.go index 828f69e24..c524002bf 100644 --- a/pkg/pb/accountabilitypb/types/types.mir.go +++ b/pkg/pb/accountabilitypb/types/types.mir.go @@ -6,7 +6,6 @@ import ( mirreflect "github.com/filecoin-project/mir/codegen/mirreflect" types1 "github.com/filecoin-project/mir/codegen/model/types" accountabilitypb "github.com/filecoin-project/mir/pkg/pb/accountabilitypb" - types4 "github.com/filecoin-project/mir/pkg/pb/isspb/types" types2 "github.com/filecoin-project/mir/pkg/pb/trantorpb/types" types3 "github.com/filecoin-project/mir/pkg/trantor/types" types "github.com/filecoin-project/mir/pkg/types" @@ -142,10 +141,6 @@ func Message_TypeFromPb(pb accountabilitypb.Message_Type) Message_Type { return &Message_Poms{Poms: PoMsFromPb(pb.Poms)} case *accountabilitypb.Message_LightCertificate: return &Message_LightCertificate{LightCertificate: LightCertificateFromPb(pb.LightCertificate)} - case *accountabilitypb.Message_RequestSbMessage: - return &Message_RequestSbMessage{RequestSbMessage: RequestSBMessageFromPb(pb.RequestSbMessage)} - case *accountabilitypb.Message_ProvideSbMessage: - return &Message_ProvideSbMessage{ProvideSbMessage: ProvideSBMessageFromPb(pb.ProvideSbMessage)} } return nil } @@ -246,54 +241,6 @@ func (*Message_LightCertificate) MirReflect() mirreflect.Type { return mirreflect.TypeImpl{PbType_: reflectutil.TypeOf[*accountabilitypb.Message_LightCertificate]()} } -type Message_RequestSbMessage struct { - RequestSbMessage *RequestSBMessage -} - -func (*Message_RequestSbMessage) isMessage_Type() {} - -func (w *Message_RequestSbMessage) Unwrap() *RequestSBMessage { - return w.RequestSbMessage -} - -func (w *Message_RequestSbMessage) Pb() accountabilitypb.Message_Type { - if w == nil { - return nil - } - if w.RequestSbMessage == nil { - return &accountabilitypb.Message_RequestSbMessage{} - } - return &accountabilitypb.Message_RequestSbMessage{RequestSbMessage: (w.RequestSbMessage).Pb()} -} - -func (*Message_RequestSbMessage) MirReflect() mirreflect.Type { - return mirreflect.TypeImpl{PbType_: reflectutil.TypeOf[*accountabilitypb.Message_RequestSbMessage]()} -} - -type Message_ProvideSbMessage struct { - ProvideSbMessage *ProvideSBMessage -} - -func (*Message_ProvideSbMessage) isMessage_Type() {} - -func (w *Message_ProvideSbMessage) Unwrap() *ProvideSBMessage { - return w.ProvideSbMessage -} - -func (w *Message_ProvideSbMessage) Pb() accountabilitypb.Message_Type { - if w == nil { - return nil - } - if w.ProvideSbMessage == nil { - return &accountabilitypb.Message_ProvideSbMessage{} - } - return &accountabilitypb.Message_ProvideSbMessage{ProvideSbMessage: (w.ProvideSbMessage).Pb()} -} - -func (*Message_ProvideSbMessage) MirReflect() mirreflect.Type { - return mirreflect.TypeImpl{PbType_: reflectutil.TypeOf[*accountabilitypb.Message_ProvideSbMessage]()} -} - func MessageFromPb(pb *accountabilitypb.Message) *Message { if pb == nil { return nil @@ -422,63 +369,3 @@ func (m *InstanceParams) Pb() *accountabilitypb.InstanceParams { func (*InstanceParams) MirReflect() mirreflect.Type { return mirreflect.TypeImpl{PbType_: reflectutil.TypeOf[*accountabilitypb.InstanceParams]()} } - -type RequestSBMessage struct { - Predecision []uint8 -} - -func RequestSBMessageFromPb(pb *accountabilitypb.RequestSBMessage) *RequestSBMessage { - if pb == nil { - return nil - } - return &RequestSBMessage{ - Predecision: pb.Predecision, - } -} - -func (m *RequestSBMessage) Pb() *accountabilitypb.RequestSBMessage { - if m == nil { - return nil - } - pbMessage := &accountabilitypb.RequestSBMessage{} - { - pbMessage.Predecision = m.Predecision - } - - return pbMessage -} - -func (*RequestSBMessage) MirReflect() mirreflect.Type { - return mirreflect.TypeImpl{PbType_: reflectutil.TypeOf[*accountabilitypb.RequestSBMessage]()} -} - -type ProvideSBMessage struct { - SbDeliver *types4.SBDeliver -} - -func ProvideSBMessageFromPb(pb *accountabilitypb.ProvideSBMessage) *ProvideSBMessage { - if pb == nil { - return nil - } - return &ProvideSBMessage{ - SbDeliver: types4.SBDeliverFromPb(pb.SbDeliver), - } -} - -func (m *ProvideSBMessage) Pb() *accountabilitypb.ProvideSBMessage { - if m == nil { - return nil - } - pbMessage := &accountabilitypb.ProvideSBMessage{} - { - if m.SbDeliver != nil { - pbMessage.SbDeliver = (m.SbDeliver).Pb() - } - } - - return pbMessage -} - -func (*ProvideSBMessage) MirReflect() mirreflect.Type { - return mirreflect.TypeImpl{PbType_: reflectutil.TypeOf[*accountabilitypb.ProvideSBMessage]()} -} diff --git a/protos/accountabilitypb/accountabilitypb.proto b/protos/accountabilitypb/accountabilitypb.proto index 929ffefea..653ac51aa 100644 --- a/protos/accountabilitypb/accountabilitypb.proto +++ b/protos/accountabilitypb/accountabilitypb.proto @@ -5,7 +5,6 @@ package accountabilitypb; option go_package = "github.com/filecoin-project/mir/pkg/pb/accountabilitypb"; import "trantorpb/trantorpb.proto"; -import "isspb/isspb.proto"; import "net/codegen_extensions.proto"; import "mir/codegen_extensions.proto"; @@ -40,8 +39,6 @@ message Message { FullCertificate certificate = 2; PoMs poms = 3; LightCertificate light_certificate = 4; - RequestSBMessage request_sb_message = 5; - ProvideSBMessage provide_sb_message = 6; } } @@ -65,17 +62,4 @@ message InstanceParams { trantorpb.Membership membership = 1; uint64 retention_index = 2 [(mir.type) = "github.com/filecoin-project/mir/pkg/trantor/types.RetentionIndex"]; -} - - -message RequestSBMessage { - option (net.message) = true; - - bytes predecision = 1; -} - -message ProvideSBMessage { - option (net.message) = true; - - isspb.SBDeliver sb_deliver = 1; } \ No newline at end of file From 8858990284874efb0d3b8865094f7bbd1b12aeb7 Mon Sep 17 00:00:00 2001 From: Matej Pavlovic Date: Tue, 29 Aug 2023 11:46:29 +0200 Subject: [PATCH 14/14] Reformat a few lines of comments Signed-off-by: Matej Pavlovic --- .../simpleacc/accountability.go | 2 -- .../simpleacc/internal/common/common.go | 36 ++++++++++++++----- .../simpleacc/internal/poms/poms.go | 3 +- 3 files changed, 29 insertions(+), 12 deletions(-) diff --git a/pkg/accountability/simpleacc/accountability.go b/pkg/accountability/simpleacc/accountability.go index a44627201..9e0a7f92b 100644 --- a/pkg/accountability/simpleacc/accountability.go +++ b/pkg/accountability/simpleacc/accountability.go @@ -46,7 +46,6 @@ type ModuleParams = common.ModuleParams // (signed predecisions or certificates) after termination, until // it is garbage collected. // - // Intuition of correctness: a process only terminates if it receives a // strong quorum of signed predecisions from distinct processes, forming // a certificate. Once this process forms a certificate, it shares it @@ -67,7 +66,6 @@ type ModuleParams = common.ModuleParams // Except that it does not implement the optimization using threshold // signatures (as we have members with associated weight) // - // The optimistic variant of this module is a parametrizable optimization // in which certificates are optimistically believed to be correct. This way, // in the good case a correct process broadcasts a light certificate of O(1) bits diff --git a/pkg/accountability/simpleacc/internal/common/common.go b/pkg/accountability/simpleacc/internal/common/common.go index cb0297a1d..8d1102b46 100644 --- a/pkg/accountability/simpleacc/internal/common/common.go +++ b/pkg/accountability/simpleacc/internal/common/common.go @@ -7,15 +7,33 @@ import ( ) type State struct { - SignedPredecisions map[t.NodeID]*accpbtypes.SignedPredecision // Map of received signed predicisions (including own's) with their signer as key. - PredecisionNodeIDs map[string][]t.NodeID // Map of predecisions and the nodes that have signed them with the predecision as key, - // used for fast verification of whether a predecision is predecided by a strong quorum. - LocalPredecision *LocalPredecision // Decision locally decided - DecidedCertificate *accpbtypes.FullCertificate // Locally decided certificate (predecision and list of signatures with signers as key) - Predecided bool // Whether this process has received a predecided value from calling module. - UnhandledPoMs []*accpbtypes.PoM // List of PoMs not yet sent to the application. - HandledPoMs map[t.NodeID]*accpbtypes.PoM // List of PoMs already sent to the application with the signer as key. - LightCertificates map[t.NodeID][]byte // Map of light certificates with the signer as key, buffered if no local decision made yet. + + // Map of received signed predicisions (including own) with their signer as key. + SignedPredecisions map[t.NodeID]*accpbtypes.SignedPredecision + + // Map of predecisions and the nodes that have signed them with the predecision as key, + PredecisionNodeIDs map[string][]t.NodeID + + // -------------------------------------------------------------------------------- + // Used for fast verification of whether a predecision is predecided by a strong quorum. + + // Decision locally decided + LocalPredecision *LocalPredecision + + // Locally decided certificate (predecision and list of signatures with signers as key) + DecidedCertificate *accpbtypes.FullCertificate + + // Whether this process has received a predecided value from calling module. + Predecided bool + + // List of PoMs not yet sent to the application. + UnhandledPoMs []*accpbtypes.PoM + + // List of PoMs already sent to the application with the signer as key. + HandledPoMs map[t.NodeID]*accpbtypes.PoM + + // Map of light certificates with the signer as key, buffered if no local decision made yet. + LightCertificates map[t.NodeID][]byte } type LocalPredecision struct { diff --git a/pkg/accountability/simpleacc/internal/poms/poms.go b/pkg/accountability/simpleacc/internal/poms/poms.go index 63636ebee..409a50e12 100644 --- a/pkg/accountability/simpleacc/internal/poms/poms.go +++ b/pkg/accountability/simpleacc/internal/poms/poms.go @@ -29,7 +29,8 @@ func IncludePoMs( for _, pom := range poms { if reflect.DeepEqual(pom.ConflictingMsg_1.Predecision, pom.ConflictingMsg_2.Predecision) || - reflect.DeepEqual(pom.ConflictingMsg_1.Signature, pom.ConflictingMsg_2.Signature) { // no PoM possible here + reflect.DeepEqual(pom.ConflictingMsg_1.Signature, pom.ConflictingMsg_2.Signature) { + // no PoM possible here continue }