From ded13cc641f44243530ad33322e8b50ba785c8f8 Mon Sep 17 00:00:00 2001 From: Quint Daenen Date: Fri, 14 Jun 2024 10:56:55 +0200 Subject: [PATCH] Fix tests. --- .github/workflows/test-ledger.yml | 13 + .github/workflows/test-registry.yml | 2 +- Makefile | 5 +- agent.go | 37 +- call.go | 22 +- clients/registry/proto/v1/local.pb.go | 155 +- clients/registry/proto/v1/operator.pb.go | 108 +- clients/registry/proto/v1/registry.pb.go | 106 +- clients/registry/proto/v1/subnet.pb.go | 4472 +++++++++++---------- clients/registry/proto/v1/transport.pb.go | 1 + ic/sns/ledger/agent.go | 2 +- query.go | 45 +- 12 files changed, 2484 insertions(+), 2484 deletions(-) create mode 100644 .github/workflows/test-ledger.yml diff --git a/.github/workflows/test-ledger.yml b/.github/workflows/test-ledger.yml new file mode 100644 index 0000000..627ee23 --- /dev/null +++ b/.github/workflows/test-ledger.yml @@ -0,0 +1,13 @@ +on: + push: + paths: + - clients/ledger/** +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v4 + with: + go-version: '1.22.1' + - run: make test-ledger diff --git a/.github/workflows/test-registry.yml b/.github/workflows/test-registry.yml index 9ead23a..14a55cc 100644 --- a/.github/workflows/test-registry.yml +++ b/.github/workflows/test-registry.yml @@ -1,7 +1,7 @@ on: push: paths: - - registry/** + - clients/registry/** jobs: test: runs-on: ubuntu-latest diff --git a/Makefile b/Makefile index 9a6195f..c9e43ac 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,10 @@ test: go test -v -cover ./... test-registry: - REGISTRY_TEST_ENABLE=true go test -v -cover ./registry/... + REGISTRY_TEST_ENABLE=true go test -v -cover ./clients/registry/... + +test-ledger: + REGISTRY_TEST_ENABLE=true go test -v -cover ./clients/ledger/... check-moc: find ic -type f -name '*.mo' -print0 | xargs -0 $(shell dfx cache show)/moc --check diff --git a/agent.go b/agent.go index b9f2e7a..c829798 100644 --- a/agent.go +++ b/agent.go @@ -7,16 +7,17 @@ import ( "encoding/hex" "errors" "fmt" - "github.com/aviate-labs/agent-go/candid/idl" "net/url" "reflect" "time" + "github.com/aviate-labs/agent-go/candid/idl" "github.com/aviate-labs/agent-go/certification" "github.com/aviate-labs/agent-go/certification/hashtree" "github.com/aviate-labs/agent-go/identity" "github.com/aviate-labs/agent-go/principal" "github.com/fxamacker/cbor/v2" + "google.golang.org/protobuf/proto" ) // DefaultConfig is the default configuration for an Agent. @@ -101,12 +102,13 @@ type APIRequest[In, Out any] struct { data []byte } -func CreateAPIRequest[In, Out any]( +func createAPIRequest[In, Out any]( a *Agent, marshal func(In) ([]byte, error), unmarshal func([]byte, Out) error, typ RequestType, canisterID principal.Principal, + effectiveCanisterID principal.Principal, methodName string, in In, ) (*APIRequest[In, Out], error) { @@ -135,7 +137,7 @@ func CreateAPIRequest[In, Out any]( unmarshal: unmarshal, typ: typ, methodName: methodName, - effectiveCanisterID: canisterID, + effectiveCanisterID: effectiveCanisterID, requestID: *requestID, data: data, }, nil @@ -216,17 +218,42 @@ func (a Agent) Client() *Client { // CreateCandidAPIRequest creates a new api request to the given canister and method. func (a *Agent) CreateCandidAPIRequest(typ RequestType, canisterID principal.Principal, methodName string, args ...any) (*CandidAPIRequest, error) { - return CreateAPIRequest[[]any, []any]( + return createAPIRequest[[]any, []any]( a, idl.Marshal, idl.Unmarshal, typ, + canisterID, effectiveCanisterID(canisterID, args), methodName, args, ) } +// CreateProtoAPIRequest creates a new api request to the given canister and method. +func (a *Agent) CreateProtoAPIRequest(typ RequestType, canisterID principal.Principal, methodName string, message proto.Message) (*ProtoAPIRequest, error) { + return createAPIRequest[proto.Message, proto.Message]( + a, + func(m proto.Message) ([]byte, error) { + raw, err := proto.Marshal(m) + if err != nil { + return nil, err + } + if len(raw) == 0 { + // Protobuf arg are not allowed to be empty. + return []byte{}, nil + } + return raw, nil + }, + proto.Unmarshal, + typ, + canisterID, + canisterID, + methodName, + message, + ) +} + // GetCanisterControllers returns the list of principals that can control the given canister. func (a Agent) GetCanisterControllers(canisterID principal.Principal) ([]principal.Principal, error) { resp, err := a.GetCanisterInfo(canisterID, "controllers") @@ -486,3 +513,5 @@ type Config struct { // DisableSignedQueryVerification disables the verification of signed queries. DisableSignedQueryVerification bool } + +type ProtoAPIRequest = APIRequest[proto.Message, proto.Message] diff --git a/call.go b/call.go index 7e8c4b0..e231ede 100644 --- a/call.go +++ b/call.go @@ -40,27 +40,9 @@ func (a Agent) Call(canisterID principal.Principal, methodName string, in []any, // CallProto calls a method on a canister and unmarshals the result into the given proto message. func (a Agent) CallProto(canisterID principal.Principal, methodName string, in, out proto.Message) error { - payload, err := proto.Marshal(in) + call, err := a.CreateProtoAPIRequest(RequestTypeCall, canisterID, methodName, in) if err != nil { return err } - requestID, data, err := a.sign(Request{ - Type: RequestTypeCall, - Sender: a.Sender(), - IngressExpiry: a.expiryDate(), - CanisterID: canisterID, - MethodName: methodName, - Arguments: payload, - }) - if err != nil { - return err - } - if _, err := a.call(canisterID, data); err != nil { - return err - } - raw, err := a.poll(canisterID, *requestID) - if err != nil { - return err - } - return proto.Unmarshal(raw, out) + return call.CallAndWait(out) } diff --git a/clients/registry/proto/v1/local.pb.go b/clients/registry/proto/v1/local.pb.go index db16176..b5b26f7 100644 --- a/clients/registry/proto/v1/local.pb.go +++ b/clients/registry/proto/v1/local.pb.go @@ -105,6 +105,81 @@ var file_local_proto_rawDesc = []byte{ 0x74, 0x6f, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } +func file_local_proto_init() { + if File_local_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_local_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*ChangelogEntry); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_local_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*KeyMutation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_local_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*CertifiedTime); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_local_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*Delta); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_local_proto_rawDesc, + NumEnums: 1, + NumMessages: 4, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_local_proto_goTypes, + DependencyIndexes: file_local_proto_depIdxs, + EnumInfos: file_local_proto_enumTypes, + MessageInfos: file_local_proto_msgTypes, + }.Build() + File_local_proto = out.File + file_local_proto_rawDesc = nil + file_local_proto_goTypes = nil + file_local_proto_depIdxs = nil +} + func file_local_proto_rawDescGZIP() []byte { file_local_proto_rawDescOnce.Do(func() { file_local_proto_rawDescData = protoimpl.X.CompressGZIP(file_local_proto_rawDescData) @@ -112,6 +187,8 @@ func file_local_proto_rawDescGZIP() []byte { return file_local_proto_rawDescData } +func init() { file_local_proto_init() } + // The time when the last certified update was successfully received. type CertifiedTime struct { state protoimpl.MessageState @@ -348,7 +425,6 @@ const ( func (MutationType) Descriptor() protoreflect.EnumDescriptor { return file_local_proto_enumTypes[0].Descriptor() } - func (x MutationType) Enum() *MutationType { p := new(MutationType) *p = x @@ -362,85 +438,10 @@ func (MutationType) EnumDescriptor() ([]byte, []int) { func (x MutationType) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } + func (x MutationType) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (MutationType) Type() protoreflect.EnumType { return &file_local_proto_enumTypes[0] } - -func init() { file_local_proto_init() } -func file_local_proto_init() { - if File_local_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_local_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ChangelogEntry); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_local_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*KeyMutation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_local_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*CertifiedTime); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_local_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Delta); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_local_proto_rawDesc, - NumEnums: 1, - NumMessages: 4, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_local_proto_goTypes, - DependencyIndexes: file_local_proto_depIdxs, - EnumInfos: file_local_proto_enumTypes, - MessageInfos: file_local_proto_msgTypes, - }.Build() - File_local_proto = out.File - file_local_proto_rawDesc = nil - file_local_proto_goTypes = nil - file_local_proto_depIdxs = nil -} diff --git a/clients/registry/proto/v1/operator.pb.go b/clients/registry/proto/v1/operator.pb.go index 0a3e7aa..d3ee07f 100644 --- a/clients/registry/proto/v1/operator.pb.go +++ b/clients/registry/proto/v1/operator.pb.go @@ -83,6 +83,57 @@ var file_operator_proto_rawDesc = []byte{ 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } +func file_operator_proto_init() { + if File_operator_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_operator_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*NodeOperatorRecord); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_operator_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*RemoveNodeOperatorsPayload); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_operator_proto_msgTypes[0].OneofWrappers = []any{} + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_operator_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_operator_proto_goTypes, + DependencyIndexes: file_operator_proto_depIdxs, + MessageInfos: file_operator_proto_msgTypes, + }.Build() + File_operator_proto = out.File + file_operator_proto_rawDesc = nil + file_operator_proto_goTypes = nil + file_operator_proto_depIdxs = nil +} + func file_operator_proto_rawDescGZIP() []byte { file_operator_proto_rawDescOnce.Do(func() { file_operator_proto_rawDescData = protoimpl.X.CompressGZIP(file_operator_proto_rawDescData) @@ -90,6 +141,8 @@ func file_operator_proto_rawDescGZIP() []byte { return file_operator_proto_rawDescData } +func init() { file_operator_proto_init() } + // A record for a node operator. Each node operator is associated with a // unique principal id, a.k.a. NOID. // @@ -212,9 +265,7 @@ func (x *RemoveNodeOperatorsPayload) GetNodeOperatorsToRemove() [][]byte { } return nil } - func (*RemoveNodeOperatorsPayload) ProtoMessage() {} - func (x *RemoveNodeOperatorsPayload) ProtoReflect() protoreflect.Message { mi := &file_operator_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { @@ -226,6 +277,7 @@ func (x *RemoveNodeOperatorsPayload) ProtoReflect() protoreflect.Message { } return mi.MessageOf(x) } + func (x *RemoveNodeOperatorsPayload) Reset() { *x = RemoveNodeOperatorsPayload{} if protoimpl.UnsafeEnabled { @@ -237,55 +289,3 @@ func (x *RemoveNodeOperatorsPayload) Reset() { func (x *RemoveNodeOperatorsPayload) String() string { return protoimpl.X.MessageStringOf(x) } - -func init() { file_operator_proto_init() } -func file_operator_proto_init() { - if File_operator_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_operator_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*NodeOperatorRecord); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_operator_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*RemoveNodeOperatorsPayload); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_operator_proto_msgTypes[0].OneofWrappers = []any{} - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_operator_proto_rawDesc, - NumEnums: 0, - NumMessages: 3, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_operator_proto_goTypes, - DependencyIndexes: file_operator_proto_depIdxs, - MessageInfos: file_operator_proto_msgTypes, - }.Build() - File_operator_proto = out.File - file_operator_proto_rawDesc = nil - file_operator_proto_goTypes = nil - file_operator_proto_depIdxs = nil -} diff --git a/clients/registry/proto/v1/registry.pb.go b/clients/registry/proto/v1/registry.pb.go index 7eb79f0..8d15c31 100644 --- a/clients/registry/proto/v1/registry.pb.go +++ b/clients/registry/proto/v1/registry.pb.go @@ -70,6 +70,56 @@ var file_registry_proto_rawDesc = []byte{ 0x6f, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } +func file_registry_proto_init() { + if File_registry_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_registry_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*ProtoRegistry); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_registry_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*ProtoRegistryRecord); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_registry_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_registry_proto_goTypes, + DependencyIndexes: file_registry_proto_depIdxs, + MessageInfos: file_registry_proto_msgTypes, + }.Build() + File_registry_proto = out.File + file_registry_proto_rawDesc = nil + file_registry_proto_goTypes = nil + file_registry_proto_depIdxs = nil +} + func file_registry_proto_rawDescGZIP() []byte { file_registry_proto_rawDescOnce.Do(func() { file_registry_proto_rawDescData = protoimpl.X.CompressGZIP(file_registry_proto_rawDescData) @@ -77,6 +127,8 @@ func file_registry_proto_rawDescGZIP() []byte { return file_registry_proto_rawDescData } +func init() { file_registry_proto_init() } + type ProtoRegistry struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -159,9 +211,7 @@ func (x *ProtoRegistryRecord) GetVersion() uint64 { } return 0 } - func (*ProtoRegistryRecord) ProtoMessage() {} - func (x *ProtoRegistryRecord) ProtoReflect() protoreflect.Message { mi := &file_registry_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { @@ -173,6 +223,7 @@ func (x *ProtoRegistryRecord) ProtoReflect() protoreflect.Message { } return mi.MessageOf(x) } + func (x *ProtoRegistryRecord) Reset() { *x = ProtoRegistryRecord{} if protoimpl.UnsafeEnabled { @@ -184,54 +235,3 @@ func (x *ProtoRegistryRecord) Reset() { func (x *ProtoRegistryRecord) String() string { return protoimpl.X.MessageStringOf(x) } - -func init() { file_registry_proto_init() } -func file_registry_proto_init() { - if File_registry_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_registry_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ProtoRegistry); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_registry_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ProtoRegistryRecord); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_registry_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_registry_proto_goTypes, - DependencyIndexes: file_registry_proto_depIdxs, - MessageInfos: file_registry_proto_msgTypes, - }.Build() - File_registry_proto = out.File - file_registry_proto_rawDesc = nil - file_registry_proto_goTypes = nil - file_registry_proto_depIdxs = nil -} diff --git a/clients/registry/proto/v1/subnet.pb.go b/clients/registry/proto/v1/subnet.pb.go index 398a73e..2d449b4 100644 --- a/clients/registry/proto/v1/subnet.pb.go +++ b/clients/registry/proto/v1/subnet.pb.go @@ -852,1215 +852,558 @@ var file_subnet_proto_rawDesc = []byte{ 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } -func file_subnet_proto_rawDescGZIP() []byte { - file_subnet_proto_rawDescOnce.Do(func() { - file_subnet_proto_rawDescData = protoimpl.X.CompressGZIP(file_subnet_proto_rawDescData) - }) - return file_subnet_proto_rawDescData -} - -// An algorithm ID. This is used to specify the signature algorithm associated with a public key. -type AlgorithmId int32 - -const ( - AlgorithmId_ALGORITHM_ID_UNSPECIFIED AlgorithmId = 0 - AlgorithmId_ALGORITHM_ID_MULTI_BLS12_381 AlgorithmId = 1 - AlgorithmId_ALGORITHM_ID_THRES_BLS12_381 AlgorithmId = 2 - AlgorithmId_ALGORITHM_ID_SCHNORR_SECP256K1 AlgorithmId = 3 - AlgorithmId_ALGORITHM_ID_STATIC_DH_SECP256K1 AlgorithmId = 4 - AlgorithmId_ALGORITHM_ID_HASH_SHA256 AlgorithmId = 5 - AlgorithmId_ALGORITHM_ID_TLS AlgorithmId = 6 - AlgorithmId_ALGORITHM_ID_ED25519 AlgorithmId = 7 - AlgorithmId_ALGORITHM_ID_SECP256K1 AlgorithmId = 8 - AlgorithmId_ALGORITHM_ID_GROTH20_BLS12_381 AlgorithmId = 9 - AlgorithmId_ALGORITHM_ID_NIDKG_GROTH20_BLS12_381 AlgorithmId = 10 - AlgorithmId_ALGORITHM_ID_ECDSA_P256 AlgorithmId = 11 - AlgorithmId_ALGORITHM_ID_ECDSA_SECP_256K1 AlgorithmId = 12 - AlgorithmId_ALGORITHM_ID_IC_CANISTER_SIGNATURE AlgorithmId = 13 - AlgorithmId_ALGORITHM_ID_RSA_SHA256 AlgorithmId = 14 - AlgorithmId_ALGORITHM_ID_THRESHOLD_ECDSA_SECP_256K1 AlgorithmId = 15 - AlgorithmId_ALGORITHM_ID_MEGA_SECP_256K1 AlgorithmId = 16 - AlgorithmId_ALGORITHM_ID_THRESHOLD_ECDSA_SECP_256R1 AlgorithmId = 17 - AlgorithmId_ALGORITHM_ID_THRESHOLD_SCHNORR_BIP340 AlgorithmId = 18 - AlgorithmId_ALGORITHM_ID_THRESHOLD_ED25519 AlgorithmId = 19 -) - -func (AlgorithmId) Descriptor() protoreflect.EnumDescriptor { - return file_subnet_proto_enumTypes[2].Descriptor() -} - -func (x AlgorithmId) Enum() *AlgorithmId { - p := new(AlgorithmId) - *p = x - return p -} - -// Deprecated: Use AlgorithmId.Descriptor instead. -func (AlgorithmId) EnumDescriptor() ([]byte, []int) { - return file_subnet_proto_rawDescGZIP(), []int{2} -} - -func (x AlgorithmId) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -func (x AlgorithmId) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (AlgorithmId) Type() protoreflect.EnumType { - return &file_subnet_proto_enumTypes[2] -} - -// Contains the initial DKG transcripts for the subnet and materials to construct a base CUP (i.e. -// a CUP with no dependencies on previous CUPs or blocks). Such CUP materials can be used to -// construct the genesis CUP or a recovery CUP in the event of a subnet stall. -type CatchUpPackageContents struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Initial non-interactive low-threshold DKG transcript - InitialNiDkgTranscriptLowThreshold *InitialNiDkgTranscriptRecord `protobuf:"bytes,1,opt,name=initial_ni_dkg_transcript_low_threshold,json=initialNiDkgTranscriptLowThreshold,proto3" json:"initial_ni_dkg_transcript_low_threshold,omitempty"` - // Initial non-interactive high-threshold DKG transcript - InitialNiDkgTranscriptHighThreshold *InitialNiDkgTranscriptRecord `protobuf:"bytes,2,opt,name=initial_ni_dkg_transcript_high_threshold,json=initialNiDkgTranscriptHighThreshold,proto3" json:"initial_ni_dkg_transcript_high_threshold,omitempty"` - // The blockchain height that the CUP should have - Height uint64 `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty"` - // Block time for the CUP's block - Time uint64 `protobuf:"varint,4,opt,name=time,proto3" json:"time,omitempty"` - // The hash of the state that the subnet should use - StateHash []byte `protobuf:"bytes,5,opt,name=state_hash,json=stateHash,proto3" json:"state_hash,omitempty"` - // A uri from which data to replace the registry local store should be downloaded - RegistryStoreUri *RegistryStoreUri `protobuf:"bytes,6,opt,name=registry_store_uri,json=registryStoreUri,proto3" json:"registry_store_uri,omitempty"` - // / The initial ECDSA dealings for boot strapping target subnets. - EcdsaInitializations []*EcdsaInitialization `protobuf:"bytes,7,rep,name=ecdsa_initializations,json=ecdsaInitializations,proto3" json:"ecdsa_initializations,omitempty"` -} - -// Deprecated: Use CatchUpPackageContents.ProtoReflect.Descriptor instead. -func (*CatchUpPackageContents) Descriptor() ([]byte, []int) { - return file_subnet_proto_rawDescGZIP(), []int{3} -} - -func (x *CatchUpPackageContents) GetEcdsaInitializations() []*EcdsaInitialization { - if x != nil { - return x.EcdsaInitializations - } - return nil -} - -func (x *CatchUpPackageContents) GetHeight() uint64 { - if x != nil { - return x.Height - } - return 0 -} - -func (x *CatchUpPackageContents) GetInitialNiDkgTranscriptHighThreshold() *InitialNiDkgTranscriptRecord { - if x != nil { - return x.InitialNiDkgTranscriptHighThreshold - } - return nil -} - -func (x *CatchUpPackageContents) GetInitialNiDkgTranscriptLowThreshold() *InitialNiDkgTranscriptRecord { - if x != nil { - return x.InitialNiDkgTranscriptLowThreshold - } - return nil -} - -func (x *CatchUpPackageContents) GetRegistryStoreUri() *RegistryStoreUri { - if x != nil { - return x.RegistryStoreUri - } - return nil -} - -func (x *CatchUpPackageContents) GetStateHash() []byte { - if x != nil { - return x.StateHash - } - return nil -} - -func (x *CatchUpPackageContents) GetTime() uint64 { - if x != nil { - return x.Time +func file_subnet_proto_init() { + if File_subnet_proto != nil { + return } - return 0 -} - -func (*CatchUpPackageContents) ProtoMessage() {} - -func (x *CatchUpPackageContents) ProtoReflect() protoreflect.Message { - mi := &file_subnet_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) + if !protoimpl.UnsafeEnabled { + file_subnet_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*SubnetRecord); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } } - return ms - } - return mi.MessageOf(x) -} - -func (x *CatchUpPackageContents) Reset() { - *x = CatchUpPackageContents{} - if protoimpl.UnsafeEnabled { - mi := &file_subnet_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CatchUpPackageContents) String() string { - return protoimpl.X.MessageStringOf(x) -} - -// Per-subnet chain key configuration -type ChainKeyConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Configurations for keys held by the subnet. - KeyConfigs []*KeyConfig `protobuf:"bytes,1,rep,name=key_configs,json=keyConfigs,proto3" json:"key_configs,omitempty"` - // Signature requests will timeout after the given number of nano seconds. - SignatureRequestTimeoutNs *uint64 `protobuf:"varint,2,opt,name=signature_request_timeout_ns,json=signatureRequestTimeoutNs,proto3,oneof" json:"signature_request_timeout_ns,omitempty"` - // Key rotation period of a single node in milliseconds. - // If none is specified key rotation is disabled. - IdkgKeyRotationPeriodMs *uint64 `protobuf:"varint,3,opt,name=idkg_key_rotation_period_ms,json=idkgKeyRotationPeriodMs,proto3,oneof" json:"idkg_key_rotation_period_ms,omitempty"` -} - -// Deprecated: Use ChainKeyConfig.ProtoReflect.Descriptor instead. -func (*ChainKeyConfig) Descriptor() ([]byte, []int) { - return file_subnet_proto_rawDescGZIP(), []int{30} -} - -func (x *ChainKeyConfig) GetIdkgKeyRotationPeriodMs() uint64 { - if x != nil && x.IdkgKeyRotationPeriodMs != nil { - return *x.IdkgKeyRotationPeriodMs - } - return 0 -} - -func (x *ChainKeyConfig) GetKeyConfigs() []*KeyConfig { - if x != nil { - return x.KeyConfigs - } - return nil -} - -func (x *ChainKeyConfig) GetSignatureRequestTimeoutNs() uint64 { - if x != nil && x.SignatureRequestTimeoutNs != nil { - return *x.SignatureRequestTimeoutNs - } - return 0 -} - -func (*ChainKeyConfig) ProtoMessage() {} - -func (x *ChainKeyConfig) ProtoReflect() protoreflect.Message { - mi := &file_subnet_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) + file_subnet_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*EcdsaKeyId); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } } - return ms - } - return mi.MessageOf(x) -} - -func (x *ChainKeyConfig) Reset() { - *x = ChainKeyConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_subnet_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ChainKeyConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -type DealerTuple struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - DealerId *NodeId `protobuf:"bytes,1,opt,name=dealer_id,json=dealerId,proto3" json:"dealer_id,omitempty"` - DealerIndex uint32 `protobuf:"varint,2,opt,name=dealer_index,json=dealerIndex,proto3" json:"dealer_index,omitempty"` -} - -// Deprecated: Use DealerTuple.ProtoReflect.Descriptor instead. -func (*DealerTuple) Descriptor() ([]byte, []int) { - return file_subnet_proto_rawDescGZIP(), []int{15} -} - -func (x *DealerTuple) GetDealerId() *NodeId { - if x != nil { - return x.DealerId - } - return nil -} - -func (x *DealerTuple) GetDealerIndex() uint32 { - if x != nil { - return x.DealerIndex - } - return 0 -} - -func (*DealerTuple) ProtoMessage() {} - -func (x *DealerTuple) ProtoReflect() protoreflect.Message { - mi := &file_subnet_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) + file_subnet_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*EcdsaInitialization); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } } - return ms - } - return mi.MessageOf(x) -} - -func (x *DealerTuple) Reset() { - *x = DealerTuple{} - if protoimpl.UnsafeEnabled { - mi := &file_subnet_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DealerTuple) String() string { - return protoimpl.X.MessageStringOf(x) -} - -// Per subnet ECDSA configuration -// -// Deprecated; please use ChainKeyConfig instead. -type EcdsaConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Number of quadruples to create in advance. - QuadruplesToCreateInAdvance uint32 `protobuf:"varint,1,opt,name=quadruples_to_create_in_advance,json=quadruplesToCreateInAdvance,proto3" json:"quadruples_to_create_in_advance,omitempty"` - // Identifiers for threshold ECDSA keys held by the subnet. - KeyIds []*EcdsaKeyId `protobuf:"bytes,3,rep,name=key_ids,json=keyIds,proto3" json:"key_ids,omitempty"` - // The maximum number of signature requests that can be enqueued at once. - MaxQueueSize uint32 `protobuf:"varint,4,opt,name=max_queue_size,json=maxQueueSize,proto3" json:"max_queue_size,omitempty"` - // Signature requests will timeout after the given number of nano seconds. - SignatureRequestTimeoutNs *uint64 `protobuf:"varint,5,opt,name=signature_request_timeout_ns,json=signatureRequestTimeoutNs,proto3,oneof" json:"signature_request_timeout_ns,omitempty"` - // Key rotation period of a single node in milliseconds. - // If none is specified key rotation is disabled. - IdkgKeyRotationPeriodMs *uint64 `protobuf:"varint,6,opt,name=idkg_key_rotation_period_ms,json=idkgKeyRotationPeriodMs,proto3,oneof" json:"idkg_key_rotation_period_ms,omitempty"` -} - -// Deprecated: Use EcdsaConfig.ProtoReflect.Descriptor instead. -func (*EcdsaConfig) Descriptor() ([]byte, []int) { - return file_subnet_proto_rawDescGZIP(), []int{26} -} - -func (x *EcdsaConfig) GetIdkgKeyRotationPeriodMs() uint64 { - if x != nil && x.IdkgKeyRotationPeriodMs != nil { - return *x.IdkgKeyRotationPeriodMs - } - return 0 -} - -func (x *EcdsaConfig) GetKeyIds() []*EcdsaKeyId { - if x != nil { - return x.KeyIds - } - return nil -} - -func (x *EcdsaConfig) GetMaxQueueSize() uint32 { - if x != nil { - return x.MaxQueueSize - } - return 0 -} - -func (x *EcdsaConfig) GetQuadruplesToCreateInAdvance() uint32 { - if x != nil { - return x.QuadruplesToCreateInAdvance - } - return 0 -} - -func (x *EcdsaConfig) GetSignatureRequestTimeoutNs() uint64 { - if x != nil && x.SignatureRequestTimeoutNs != nil { - return *x.SignatureRequestTimeoutNs - } - return 0 -} - -func (*EcdsaConfig) ProtoMessage() {} - -func (x *EcdsaConfig) ProtoReflect() protoreflect.Message { - mi := &file_subnet_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) + file_subnet_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*CatchUpPackageContents); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } } - return ms - } - return mi.MessageOf(x) -} - -func (x *EcdsaConfig) Reset() { - *x = EcdsaConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_subnet_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *EcdsaConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -// Types of curves that can be used for ECDSA signatures. -type EcdsaCurve int32 - -const ( - EcdsaCurve_ECDSA_CURVE_UNSPECIFIED EcdsaCurve = 0 - EcdsaCurve_ECDSA_CURVE_SECP256K1 EcdsaCurve = 1 -) - -func (EcdsaCurve) Descriptor() protoreflect.EnumDescriptor { - return file_subnet_proto_enumTypes[0].Descriptor() -} - -func (x EcdsaCurve) Enum() *EcdsaCurve { - p := new(EcdsaCurve) - *p = x - return p -} - -// Deprecated: Use EcdsaCurve.Descriptor instead. -func (EcdsaCurve) EnumDescriptor() ([]byte, []int) { - return file_subnet_proto_rawDescGZIP(), []int{0} -} - -func (x EcdsaCurve) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -func (x EcdsaCurve) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (EcdsaCurve) Type() protoreflect.EnumType { - return &file_subnet_proto_enumTypes[0] -} - -type EcdsaInitialization struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - KeyId *EcdsaKeyId `protobuf:"bytes,1,opt,name=key_id,json=keyId,proto3" json:"key_id,omitempty"` - Dealings *InitialIDkgDealings `protobuf:"bytes,2,opt,name=dealings,proto3" json:"dealings,omitempty"` -} - -// Deprecated: Use EcdsaInitialization.ProtoReflect.Descriptor instead. -func (*EcdsaInitialization) Descriptor() ([]byte, []int) { - return file_subnet_proto_rawDescGZIP(), []int{2} -} - -func (x *EcdsaInitialization) GetDealings() *InitialIDkgDealings { - if x != nil { - return x.Dealings - } - return nil -} - -func (x *EcdsaInitialization) GetKeyId() *EcdsaKeyId { - if x != nil { - return x.KeyId - } - return nil -} - -func (*EcdsaInitialization) ProtoMessage() {} - -func (x *EcdsaInitialization) ProtoReflect() protoreflect.Message { - mi := &file_subnet_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) + file_subnet_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*RegistryStoreUri); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } } - return ms - } - return mi.MessageOf(x) -} - -func (x *EcdsaInitialization) Reset() { - *x = EcdsaInitialization{} - if protoimpl.UnsafeEnabled { - mi := &file_subnet_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *EcdsaInitialization) String() string { - return protoimpl.X.MessageStringOf(x) -} - -type EcdsaKeyId struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Curve EcdsaCurve `protobuf:"varint,1,opt,name=curve,proto3,enum=registry.subnet.v1.EcdsaCurve" json:"curve,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` -} - -// Deprecated: Use EcdsaKeyId.ProtoReflect.Descriptor instead. -func (*EcdsaKeyId) Descriptor() ([]byte, []int) { - return file_subnet_proto_rawDescGZIP(), []int{1} -} - -func (x *EcdsaKeyId) GetCurve() EcdsaCurve { - if x != nil { - return x.Curve - } - return EcdsaCurve_ECDSA_CURVE_UNSPECIFIED -} - -func (x *EcdsaKeyId) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (*EcdsaKeyId) ProtoMessage() {} - -func (x *EcdsaKeyId) ProtoReflect() protoreflect.Message { - mi := &file_subnet_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) + file_subnet_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*SubnetListRecord); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } } - return ms - } - return mi.MessageOf(x) -} - -func (x *EcdsaKeyId) Reset() { - *x = EcdsaKeyId{} - if protoimpl.UnsafeEnabled { - mi := &file_subnet_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *EcdsaKeyId) String() string { - return protoimpl.X.MessageStringOf(x) -} - -type ExtendedDerivationPath struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Caller *PrincipalId `protobuf:"bytes,1,opt,name=caller,proto3" json:"caller,omitempty"` - DerivationPath [][]byte `protobuf:"bytes,2,rep,name=derivation_path,json=derivationPath,proto3" json:"derivation_path,omitempty"` -} - -// Deprecated: Use ExtendedDerivationPath.ProtoReflect.Descriptor instead. -func (*ExtendedDerivationPath) Descriptor() ([]byte, []int) { - return file_subnet_proto_rawDescGZIP(), []int{23} -} - -func (x *ExtendedDerivationPath) GetCaller() *PrincipalId { - if x != nil { - return x.Caller - } - return nil -} - -func (x *ExtendedDerivationPath) GetDerivationPath() [][]byte { - if x != nil { - return x.DerivationPath - } - return nil -} - -func (*ExtendedDerivationPath) ProtoMessage() {} - -func (x *ExtendedDerivationPath) ProtoReflect() protoreflect.Message { - mi := &file_subnet_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) + file_subnet_proto_msgTypes[6].Exporter = func(v any, i int) any { + switch v := v.(*NiDkgId); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } } - return ms - } - return mi.MessageOf(x) -} - -func (x *ExtendedDerivationPath) Reset() { - *x = ExtendedDerivationPath{} - if protoimpl.UnsafeEnabled { - mi := &file_subnet_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ExtendedDerivationPath) String() string { - return protoimpl.X.MessageStringOf(x) -} - -// Per subnet P2P configuration -// Note: protoc is mangling the name P2PConfig to P2pConfig -type GossipConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // max outstanding request per peer MIN/DEFAULT/MAX 1/20/200 - MaxArtifactStreamsPerPeer uint32 `protobuf:"varint,1,opt,name=max_artifact_streams_per_peer,json=maxArtifactStreamsPerPeer,proto3" json:"max_artifact_streams_per_peer,omitempty"` - // timeout for a outstanding request 3_000/15_000/180_000 - MaxChunkWaitMs uint32 `protobuf:"varint,2,opt,name=max_chunk_wait_ms,json=maxChunkWaitMs,proto3" json:"max_chunk_wait_ms,omitempty"` - // max duplicate requests in underutilized networks 1/28/6000 - MaxDuplicity uint32 `protobuf:"varint,3,opt,name=max_duplicity,json=maxDuplicity,proto3" json:"max_duplicity,omitempty"` - // maximum chunk size supported on this subnet 1024/4096/131_072 - MaxChunkSize uint32 `protobuf:"varint,4,opt,name=max_chunk_size,json=maxChunkSize,proto3" json:"max_chunk_size,omitempty"` - // history size for receive check 1_000/5_000/30_000 - ReceiveCheckCacheSize uint32 `protobuf:"varint,5,opt,name=receive_check_cache_size,json=receiveCheckCacheSize,proto3" json:"receive_check_cache_size,omitempty"` - // period for re evaluating the priority function. 1_000/3_000/30_000 - PfnEvaluationPeriodMs uint32 `protobuf:"varint,6,opt,name=pfn_evaluation_period_ms,json=pfnEvaluationPeriodMs,proto3" json:"pfn_evaluation_period_ms,omitempty"` - // period for polling the registry for updates 1_000/3_000/30_000 - RegistryPollPeriodMs uint32 `protobuf:"varint,7,opt,name=registry_poll_period_ms,json=registryPollPeriodMs,proto3" json:"registry_poll_period_ms,omitempty"` - // period for sending a retransmission request - RetransmissionRequestMs uint32 `protobuf:"varint,8,opt,name=retransmission_request_ms,json=retransmissionRequestMs,proto3" json:"retransmission_request_ms,omitempty"` // config for advert distribution. -} - -// Deprecated: Use GossipConfig.ProtoReflect.Descriptor instead. -func (*GossipConfig) Descriptor() ([]byte, []int) { - return file_subnet_proto_rawDescGZIP(), []int{24} -} - -func (x *GossipConfig) GetMaxArtifactStreamsPerPeer() uint32 { - if x != nil { - return x.MaxArtifactStreamsPerPeer - } - return 0 -} - -func (x *GossipConfig) GetMaxChunkSize() uint32 { - if x != nil { - return x.MaxChunkSize - } - return 0 -} - -func (x *GossipConfig) GetMaxChunkWaitMs() uint32 { - if x != nil { - return x.MaxChunkWaitMs - } - return 0 -} - -func (x *GossipConfig) GetMaxDuplicity() uint32 { - if x != nil { - return x.MaxDuplicity - } - return 0 -} - -func (x *GossipConfig) GetPfnEvaluationPeriodMs() uint32 { - if x != nil { - return x.PfnEvaluationPeriodMs - } - return 0 -} - -func (x *GossipConfig) GetReceiveCheckCacheSize() uint32 { - if x != nil { - return x.ReceiveCheckCacheSize - } - return 0 -} - -func (x *GossipConfig) GetRegistryPollPeriodMs() uint32 { - if x != nil { - return x.RegistryPollPeriodMs - } - return 0 -} - -func (x *GossipConfig) GetRetransmissionRequestMs() uint32 { - if x != nil { - return x.RetransmissionRequestMs - } - return 0 -} - -func (*GossipConfig) ProtoMessage() {} - -func (x *GossipConfig) ProtoReflect() protoreflect.Message { - mi := &file_subnet_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) + file_subnet_proto_msgTypes[7].Exporter = func(v any, i int) any { + switch v := v.(*InitialNiDkgTranscriptRecord); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } } - return ms - } - return mi.MessageOf(x) -} - -func (x *GossipConfig) Reset() { - *x = GossipConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_subnet_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GossipConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -type IDkgComplaint struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - TranscriptId *IDkgTranscriptId `protobuf:"bytes,1,opt,name=transcript_id,json=transcriptId,proto3" json:"transcript_id,omitempty"` - Dealer *NodeId `protobuf:"bytes,2,opt,name=dealer,proto3" json:"dealer,omitempty"` - RawComplaint []byte `protobuf:"bytes,3,opt,name=raw_complaint,json=rawComplaint,proto3" json:"raw_complaint,omitempty"` -} - -// Deprecated: Use IDkgComplaint.ProtoReflect.Descriptor instead. -func (*IDkgComplaint) Descriptor() ([]byte, []int) { - return file_subnet_proto_rawDescGZIP(), []int{21} -} - -func (x *IDkgComplaint) GetDealer() *NodeId { - if x != nil { - return x.Dealer - } - return nil -} - -func (x *IDkgComplaint) GetRawComplaint() []byte { - if x != nil { - return x.RawComplaint - } - return nil -} - -func (x *IDkgComplaint) GetTranscriptId() *IDkgTranscriptId { - if x != nil { - return x.TranscriptId - } - return nil -} - -func (*IDkgComplaint) ProtoMessage() {} - -func (x *IDkgComplaint) ProtoReflect() protoreflect.Message { - mi := &file_subnet_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) + file_subnet_proto_msgTypes[8].Exporter = func(v any, i int) any { + switch v := v.(*PrincipalId); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } } - return ms - } - return mi.MessageOf(x) -} - -func (x *IDkgComplaint) Reset() { - *x = IDkgComplaint{} - if protoimpl.UnsafeEnabled { - mi := &file_subnet_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *IDkgComplaint) String() string { - return protoimpl.X.MessageStringOf(x) -} - -type IDkgDealing struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - TranscriptId *IDkgTranscriptId `protobuf:"bytes,1,opt,name=transcript_id,json=transcriptId,proto3" json:"transcript_id,omitempty"` - RawDealing []byte `protobuf:"bytes,2,opt,name=raw_dealing,json=rawDealing,proto3" json:"raw_dealing,omitempty"` // serialised InternalRawDealing -} - -// Deprecated: Use IDkgDealing.ProtoReflect.Descriptor instead. -func (*IDkgDealing) Descriptor() ([]byte, []int) { - return file_subnet_proto_rawDescGZIP(), []int{18} -} - -func (x *IDkgDealing) GetRawDealing() []byte { - if x != nil { - return x.RawDealing - } - return nil -} - -func (x *IDkgDealing) GetTranscriptId() *IDkgTranscriptId { - if x != nil { - return x.TranscriptId - } - return nil -} - -func (*IDkgDealing) ProtoMessage() {} - -func (x *IDkgDealing) ProtoReflect() protoreflect.Message { - mi := &file_subnet_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) + file_subnet_proto_msgTypes[9].Exporter = func(v any, i int) any { + switch v := v.(*SubnetId); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } } - return ms - } - return mi.MessageOf(x) -} - -func (x *IDkgDealing) Reset() { - *x = IDkgDealing{} - if protoimpl.UnsafeEnabled { - mi := &file_subnet_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *IDkgDealing) String() string { - return protoimpl.X.MessageStringOf(x) -} - -type IDkgOpening struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - TranscriptId *IDkgTranscriptId `protobuf:"bytes,1,opt,name=transcript_id,json=transcriptId,proto3" json:"transcript_id,omitempty"` - Dealer *NodeId `protobuf:"bytes,2,opt,name=dealer,proto3" json:"dealer,omitempty"` - RawOpening []byte `protobuf:"bytes,3,opt,name=raw_opening,json=rawOpening,proto3" json:"raw_opening,omitempty"` -} - -// Deprecated: Use IDkgOpening.ProtoReflect.Descriptor instead. -func (*IDkgOpening) Descriptor() ([]byte, []int) { - return file_subnet_proto_rawDescGZIP(), []int{22} -} - -func (x *IDkgOpening) GetDealer() *NodeId { - if x != nil { - return x.Dealer - } - return nil -} - -func (x *IDkgOpening) GetRawOpening() []byte { - if x != nil { - return x.RawOpening - } - return nil -} - -func (x *IDkgOpening) GetTranscriptId() *IDkgTranscriptId { - if x != nil { - return x.TranscriptId - } - return nil -} - -func (*IDkgOpening) ProtoMessage() {} - -func (x *IDkgOpening) ProtoReflect() protoreflect.Message { - mi := &file_subnet_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) + file_subnet_proto_msgTypes[10].Exporter = func(v any, i int) any { + switch v := v.(*IDkgTranscriptId); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } } - return ms - } - return mi.MessageOf(x) -} - -func (x *IDkgOpening) Reset() { - *x = IDkgOpening{} - if protoimpl.UnsafeEnabled { - mi := &file_subnet_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *IDkgOpening) String() string { - return protoimpl.X.MessageStringOf(x) -} - -type IDkgSignedDealingTuple struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Dealer *NodeId `protobuf:"bytes,1,opt,name=dealer,proto3" json:"dealer,omitempty"` - Dealing *IDkgDealing `protobuf:"bytes,2,opt,name=dealing,proto3" json:"dealing,omitempty"` - Signature []byte `protobuf:"bytes,3,opt,name=signature,proto3" json:"signature,omitempty"` -} - -// Deprecated: Use IDkgSignedDealingTuple.ProtoReflect.Descriptor instead. -func (*IDkgSignedDealingTuple) Descriptor() ([]byte, []int) { - return file_subnet_proto_rawDescGZIP(), []int{19} -} - -func (x *IDkgSignedDealingTuple) GetDealer() *NodeId { - if x != nil { - return x.Dealer - } - return nil -} - -func (x *IDkgSignedDealingTuple) GetDealing() *IDkgDealing { - if x != nil { - return x.Dealing - } - return nil -} - -func (x *IDkgSignedDealingTuple) GetSignature() []byte { - if x != nil { - return x.Signature - } - return nil -} - -func (*IDkgSignedDealingTuple) ProtoMessage() {} - -func (x *IDkgSignedDealingTuple) ProtoReflect() protoreflect.Message { - mi := &file_subnet_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) + file_subnet_proto_msgTypes[11].Exporter = func(v any, i int) any { + switch v := v.(*VerifiedIDkgDealing); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } } - return ms - } - return mi.MessageOf(x) -} - -func (x *IDkgSignedDealingTuple) Reset() { - *x = IDkgSignedDealingTuple{} - if protoimpl.UnsafeEnabled { - mi := &file_subnet_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *IDkgSignedDealingTuple) String() string { - return protoimpl.X.MessageStringOf(x) -} - -type IDkgTranscript struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - TranscriptId *IDkgTranscriptId `protobuf:"bytes,1,opt,name=transcript_id,json=transcriptId,proto3" json:"transcript_id,omitempty"` - Dealers []*NodeId `protobuf:"bytes,2,rep,name=dealers,proto3" json:"dealers,omitempty"` - Receivers []*NodeId `protobuf:"bytes,3,rep,name=receivers,proto3" json:"receivers,omitempty"` - RegistryVersion uint64 `protobuf:"varint,4,opt,name=registry_version,json=registryVersion,proto3" json:"registry_version,omitempty"` - VerifiedDealings []*VerifiedIDkgDealing `protobuf:"bytes,5,rep,name=verified_dealings,json=verifiedDealings,proto3" json:"verified_dealings,omitempty"` - TranscriptType []byte `protobuf:"bytes,6,opt,name=transcript_type,json=transcriptType,proto3" json:"transcript_type,omitempty"` // CBOR serialized IDkgTranscriptType - AlgorithmId AlgorithmId `protobuf:"varint,7,opt,name=algorithm_id,json=algorithmId,proto3,enum=registry.subnet.v1.AlgorithmId" json:"algorithm_id,omitempty"` - RawTranscript []byte `protobuf:"bytes,8,opt,name=raw_transcript,json=rawTranscript,proto3" json:"raw_transcript,omitempty"` // serialised InternalRawTranscript -} - -// Deprecated: Use IDkgTranscript.ProtoReflect.Descriptor instead. -func (*IDkgTranscript) Descriptor() ([]byte, []int) { - return file_subnet_proto_rawDescGZIP(), []int{14} -} - -func (x *IDkgTranscript) GetAlgorithmId() AlgorithmId { - if x != nil { - return x.AlgorithmId - } - return AlgorithmId_ALGORITHM_ID_UNSPECIFIED -} - -func (x *IDkgTranscript) GetDealers() []*NodeId { - if x != nil { - return x.Dealers - } - return nil -} - -func (x *IDkgTranscript) GetRawTranscript() []byte { - if x != nil { - return x.RawTranscript - } - return nil -} - -func (x *IDkgTranscript) GetReceivers() []*NodeId { - if x != nil { - return x.Receivers - } - return nil -} - -func (x *IDkgTranscript) GetRegistryVersion() uint64 { - if x != nil { - return x.RegistryVersion - } - return 0 -} - -func (x *IDkgTranscript) GetTranscriptId() *IDkgTranscriptId { - if x != nil { - return x.TranscriptId - } - return nil -} - -func (x *IDkgTranscript) GetTranscriptType() []byte { - if x != nil { - return x.TranscriptType - } - return nil -} - -func (x *IDkgTranscript) GetVerifiedDealings() []*VerifiedIDkgDealing { - if x != nil { - return x.VerifiedDealings - } - return nil -} - -func (*IDkgTranscript) ProtoMessage() {} - -func (x *IDkgTranscript) ProtoReflect() protoreflect.Message { - mi := &file_subnet_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) + file_subnet_proto_msgTypes[12].Exporter = func(v any, i int) any { + switch v := v.(*NodeId); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } } - return ms - } - return mi.MessageOf(x) -} - -func (x *IDkgTranscript) Reset() { - *x = IDkgTranscript{} - if protoimpl.UnsafeEnabled { - mi := &file_subnet_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *IDkgTranscript) String() string { - return protoimpl.X.MessageStringOf(x) -} - -type IDkgTranscriptId struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - SubnetId *SubnetId `protobuf:"bytes,2,opt,name=subnet_id,json=subnetId,proto3" json:"subnet_id,omitempty"` - SourceHeight uint64 `protobuf:"varint,3,opt,name=source_height,json=sourceHeight,proto3" json:"source_height,omitempty"` -} - -// Deprecated: Use IDkgTranscriptId.ProtoReflect.Descriptor instead. -func (*IDkgTranscriptId) Descriptor() ([]byte, []int) { - return file_subnet_proto_rawDescGZIP(), []int{10} -} - -func (x *IDkgTranscriptId) GetId() uint64 { - if x != nil { - return x.Id - } - return 0 -} - -func (x *IDkgTranscriptId) GetSourceHeight() uint64 { - if x != nil { - return x.SourceHeight - } - return 0 -} - -func (x *IDkgTranscriptId) GetSubnetId() *SubnetId { - if x != nil { - return x.SubnetId - } - return nil -} - -func (*IDkgTranscriptId) ProtoMessage() {} - -func (x *IDkgTranscriptId) ProtoReflect() protoreflect.Message { - mi := &file_subnet_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) + file_subnet_proto_msgTypes[13].Exporter = func(v any, i int) any { + switch v := v.(*PublicKey); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } } - return ms - } - return mi.MessageOf(x) -} - -func (x *IDkgTranscriptId) Reset() { - *x = IDkgTranscriptId{} - if protoimpl.UnsafeEnabled { - mi := &file_subnet_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *IDkgTranscriptId) String() string { - return protoimpl.X.MessageStringOf(x) -} - -type IDkgTranscriptOperation int32 - -const ( - IDkgTranscriptOperation_I_DKG_TRANSCRIPT_OPERATION_UNSPECIFIED IDkgTranscriptOperation = 0 - IDkgTranscriptOperation_I_DKG_TRANSCRIPT_OPERATION_RANDOM IDkgTranscriptOperation = 1 - IDkgTranscriptOperation_I_DKG_TRANSCRIPT_OPERATION_RESHARE_OF_MASKED IDkgTranscriptOperation = 2 - IDkgTranscriptOperation_I_DKG_TRANSCRIPT_OPERATION_RESHARE_OF_UNMASKED IDkgTranscriptOperation = 3 - IDkgTranscriptOperation_I_DKG_TRANSCRIPT_OPERATION_UNMASKED_TIMES_MASKED IDkgTranscriptOperation = 4 - IDkgTranscriptOperation_I_DKG_TRANSCRIPT_OPERATION_RANDOM_UNMASKED IDkgTranscriptOperation = 5 -) - -func (IDkgTranscriptOperation) Descriptor() protoreflect.EnumDescriptor { - return file_subnet_proto_enumTypes[3].Descriptor() -} - -func (x IDkgTranscriptOperation) Enum() *IDkgTranscriptOperation { - p := new(IDkgTranscriptOperation) - *p = x - return p -} - -// Deprecated: Use IDkgTranscriptOperation.Descriptor instead. -func (IDkgTranscriptOperation) EnumDescriptor() ([]byte, []int) { - return file_subnet_proto_rawDescGZIP(), []int{3} -} - -func (x IDkgTranscriptOperation) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -func (x IDkgTranscriptOperation) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (IDkgTranscriptOperation) Type() protoreflect.EnumType { - return &file_subnet_proto_enumTypes[3] -} - -type IDkgTranscriptParams struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - TranscriptId *IDkgTranscriptId `protobuf:"bytes,1,opt,name=transcript_id,json=transcriptId,proto3" json:"transcript_id,omitempty"` - Dealers []*DealerTuple `protobuf:"bytes,2,rep,name=dealers,proto3" json:"dealers,omitempty"` - Receivers []*NodeId `protobuf:"bytes,3,rep,name=receivers,proto3" json:"receivers,omitempty"` - RegistryVersion uint64 `protobuf:"varint,4,opt,name=registry_version,json=registryVersion,proto3" json:"registry_version,omitempty"` - AlgorithmId AlgorithmId `protobuf:"varint,5,opt,name=algorithm_id,json=algorithmId,proto3,enum=registry.subnet.v1.AlgorithmId" json:"algorithm_id,omitempty"` - IdkgTranscriptOperation IDkgTranscriptOperation `protobuf:"varint,6,opt,name=idkg_transcript_operation,json=idkgTranscriptOperation,proto3,enum=registry.subnet.v1.IDkgTranscriptOperation" json:"idkg_transcript_operation,omitempty"` - IdkgTranscriptOperationArgs []*IDkgTranscript `protobuf:"bytes,7,rep,name=idkg_transcript_operation_args,json=idkgTranscriptOperationArgs,proto3" json:"idkg_transcript_operation_args,omitempty"` // 0, 1, or 2 IDkgTranscripts + file_subnet_proto_msgTypes[14].Exporter = func(v any, i int) any { + switch v := v.(*IDkgTranscript); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_subnet_proto_msgTypes[15].Exporter = func(v any, i int) any { + switch v := v.(*DealerTuple); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_subnet_proto_msgTypes[16].Exporter = func(v any, i int) any { + switch v := v.(*SignatureTuple); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_subnet_proto_msgTypes[17].Exporter = func(v any, i int) any { + switch v := v.(*IDkgTranscriptParams); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_subnet_proto_msgTypes[18].Exporter = func(v any, i int) any { + switch v := v.(*IDkgDealing); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_subnet_proto_msgTypes[19].Exporter = func(v any, i int) any { + switch v := v.(*IDkgSignedDealingTuple); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_subnet_proto_msgTypes[20].Exporter = func(v any, i int) any { + switch v := v.(*InitialIDkgDealings); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_subnet_proto_msgTypes[21].Exporter = func(v any, i int) any { + switch v := v.(*IDkgComplaint); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_subnet_proto_msgTypes[22].Exporter = func(v any, i int) any { + switch v := v.(*IDkgOpening); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_subnet_proto_msgTypes[23].Exporter = func(v any, i int) any { + switch v := v.(*ExtendedDerivationPath); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_subnet_proto_msgTypes[24].Exporter = func(v any, i int) any { + switch v := v.(*GossipConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_subnet_proto_msgTypes[25].Exporter = func(v any, i int) any { + switch v := v.(*SubnetFeatures); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_subnet_proto_msgTypes[26].Exporter = func(v any, i int) any { + switch v := v.(*EcdsaConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_subnet_proto_msgTypes[27].Exporter = func(v any, i int) any { + switch v := v.(*SchnorrKeyId); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_subnet_proto_msgTypes[28].Exporter = func(v any, i int) any { + switch v := v.(*MasterPublicKeyId); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_subnet_proto_msgTypes[29].Exporter = func(v any, i int) any { + switch v := v.(*KeyConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_subnet_proto_msgTypes[30].Exporter = func(v any, i int) any { + switch v := v.(*ChainKeyConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_subnet_proto_msgTypes[0].OneofWrappers = []any{} + file_subnet_proto_msgTypes[25].OneofWrappers = []any{} + file_subnet_proto_msgTypes[26].OneofWrappers = []any{} + file_subnet_proto_msgTypes[28].OneofWrappers = []any{ + (*MasterPublicKeyId_Ecdsa)(nil), + (*MasterPublicKeyId_Schnorr)(nil), + } + file_subnet_proto_msgTypes[29].OneofWrappers = []any{} + file_subnet_proto_msgTypes[30].OneofWrappers = []any{} + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_subnet_proto_rawDesc, + NumEnums: 6, + NumMessages: 31, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_subnet_proto_goTypes, + DependencyIndexes: file_subnet_proto_depIdxs, + EnumInfos: file_subnet_proto_enumTypes, + MessageInfos: file_subnet_proto_msgTypes, + }.Build() + File_subnet_proto = out.File + file_subnet_proto_rawDesc = nil + file_subnet_proto_goTypes = nil + file_subnet_proto_depIdxs = nil } -// Deprecated: Use IDkgTranscriptParams.ProtoReflect.Descriptor instead. -func (*IDkgTranscriptParams) Descriptor() ([]byte, []int) { - return file_subnet_proto_rawDescGZIP(), []int{17} +func file_subnet_proto_rawDescGZIP() []byte { + file_subnet_proto_rawDescOnce.Do(func() { + file_subnet_proto_rawDescData = protoimpl.X.CompressGZIP(file_subnet_proto_rawDescData) + }) + return file_subnet_proto_rawDescData } -func (x *IDkgTranscriptParams) GetAlgorithmId() AlgorithmId { - if x != nil { - return x.AlgorithmId - } - return AlgorithmId_ALGORITHM_ID_UNSPECIFIED +func init() { file_subnet_proto_init() } + +// An algorithm ID. This is used to specify the signature algorithm associated with a public key. +type AlgorithmId int32 + +const ( + AlgorithmId_ALGORITHM_ID_UNSPECIFIED AlgorithmId = 0 + AlgorithmId_ALGORITHM_ID_MULTI_BLS12_381 AlgorithmId = 1 + AlgorithmId_ALGORITHM_ID_THRES_BLS12_381 AlgorithmId = 2 + AlgorithmId_ALGORITHM_ID_SCHNORR_SECP256K1 AlgorithmId = 3 + AlgorithmId_ALGORITHM_ID_STATIC_DH_SECP256K1 AlgorithmId = 4 + AlgorithmId_ALGORITHM_ID_HASH_SHA256 AlgorithmId = 5 + AlgorithmId_ALGORITHM_ID_TLS AlgorithmId = 6 + AlgorithmId_ALGORITHM_ID_ED25519 AlgorithmId = 7 + AlgorithmId_ALGORITHM_ID_SECP256K1 AlgorithmId = 8 + AlgorithmId_ALGORITHM_ID_GROTH20_BLS12_381 AlgorithmId = 9 + AlgorithmId_ALGORITHM_ID_NIDKG_GROTH20_BLS12_381 AlgorithmId = 10 + AlgorithmId_ALGORITHM_ID_ECDSA_P256 AlgorithmId = 11 + AlgorithmId_ALGORITHM_ID_ECDSA_SECP_256K1 AlgorithmId = 12 + AlgorithmId_ALGORITHM_ID_IC_CANISTER_SIGNATURE AlgorithmId = 13 + AlgorithmId_ALGORITHM_ID_RSA_SHA256 AlgorithmId = 14 + AlgorithmId_ALGORITHM_ID_THRESHOLD_ECDSA_SECP_256K1 AlgorithmId = 15 + AlgorithmId_ALGORITHM_ID_MEGA_SECP_256K1 AlgorithmId = 16 + AlgorithmId_ALGORITHM_ID_THRESHOLD_ECDSA_SECP_256R1 AlgorithmId = 17 + AlgorithmId_ALGORITHM_ID_THRESHOLD_SCHNORR_BIP340 AlgorithmId = 18 + AlgorithmId_ALGORITHM_ID_THRESHOLD_ED25519 AlgorithmId = 19 +) + +func (AlgorithmId) Descriptor() protoreflect.EnumDescriptor { + return file_subnet_proto_enumTypes[2].Descriptor() } -func (x *IDkgTranscriptParams) GetDealers() []*DealerTuple { +func (x AlgorithmId) Enum() *AlgorithmId { + p := new(AlgorithmId) + *p = x + return p +} + +// Deprecated: Use AlgorithmId.Descriptor instead. +func (AlgorithmId) EnumDescriptor() ([]byte, []int) { + return file_subnet_proto_rawDescGZIP(), []int{2} +} + +func (x AlgorithmId) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +func (x AlgorithmId) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (AlgorithmId) Type() protoreflect.EnumType { + return &file_subnet_proto_enumTypes[2] +} + +// Contains the initial DKG transcripts for the subnet and materials to construct a base CUP (i.e. +// a CUP with no dependencies on previous CUPs or blocks). Such CUP materials can be used to +// construct the genesis CUP or a recovery CUP in the event of a subnet stall. +type CatchUpPackageContents struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Initial non-interactive low-threshold DKG transcript + InitialNiDkgTranscriptLowThreshold *InitialNiDkgTranscriptRecord `protobuf:"bytes,1,opt,name=initial_ni_dkg_transcript_low_threshold,json=initialNiDkgTranscriptLowThreshold,proto3" json:"initial_ni_dkg_transcript_low_threshold,omitempty"` + // Initial non-interactive high-threshold DKG transcript + InitialNiDkgTranscriptHighThreshold *InitialNiDkgTranscriptRecord `protobuf:"bytes,2,opt,name=initial_ni_dkg_transcript_high_threshold,json=initialNiDkgTranscriptHighThreshold,proto3" json:"initial_ni_dkg_transcript_high_threshold,omitempty"` + // The blockchain height that the CUP should have + Height uint64 `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty"` + // Block time for the CUP's block + Time uint64 `protobuf:"varint,4,opt,name=time,proto3" json:"time,omitempty"` + // The hash of the state that the subnet should use + StateHash []byte `protobuf:"bytes,5,opt,name=state_hash,json=stateHash,proto3" json:"state_hash,omitempty"` + // A uri from which data to replace the registry local store should be downloaded + RegistryStoreUri *RegistryStoreUri `protobuf:"bytes,6,opt,name=registry_store_uri,json=registryStoreUri,proto3" json:"registry_store_uri,omitempty"` + // / The initial ECDSA dealings for boot strapping target subnets. + EcdsaInitializations []*EcdsaInitialization `protobuf:"bytes,7,rep,name=ecdsa_initializations,json=ecdsaInitializations,proto3" json:"ecdsa_initializations,omitempty"` +} + +// Deprecated: Use CatchUpPackageContents.ProtoReflect.Descriptor instead. +func (*CatchUpPackageContents) Descriptor() ([]byte, []int) { + return file_subnet_proto_rawDescGZIP(), []int{3} +} + +func (x *CatchUpPackageContents) GetEcdsaInitializations() []*EcdsaInitialization { if x != nil { - return x.Dealers + return x.EcdsaInitializations } return nil } -func (x *IDkgTranscriptParams) GetIdkgTranscriptOperation() IDkgTranscriptOperation { +func (x *CatchUpPackageContents) GetHeight() uint64 { if x != nil { - return x.IdkgTranscriptOperation + return x.Height } - return IDkgTranscriptOperation_I_DKG_TRANSCRIPT_OPERATION_UNSPECIFIED + return 0 } -func (x *IDkgTranscriptParams) GetIdkgTranscriptOperationArgs() []*IDkgTranscript { +func (x *CatchUpPackageContents) GetInitialNiDkgTranscriptHighThreshold() *InitialNiDkgTranscriptRecord { if x != nil { - return x.IdkgTranscriptOperationArgs + return x.InitialNiDkgTranscriptHighThreshold } return nil } -func (x *IDkgTranscriptParams) GetReceivers() []*NodeId { +func (x *CatchUpPackageContents) GetInitialNiDkgTranscriptLowThreshold() *InitialNiDkgTranscriptRecord { if x != nil { - return x.Receivers + return x.InitialNiDkgTranscriptLowThreshold } return nil } -func (x *IDkgTranscriptParams) GetRegistryVersion() uint64 { +func (x *CatchUpPackageContents) GetRegistryStoreUri() *RegistryStoreUri { if x != nil { - return x.RegistryVersion + return x.RegistryStoreUri } - return 0 + return nil } -func (x *IDkgTranscriptParams) GetTranscriptId() *IDkgTranscriptId { +func (x *CatchUpPackageContents) GetStateHash() []byte { if x != nil { - return x.TranscriptId + return x.StateHash } return nil } -func (*IDkgTranscriptParams) ProtoMessage() {} +func (x *CatchUpPackageContents) GetTime() uint64 { + if x != nil { + return x.Time + } + return 0 +} -func (x *IDkgTranscriptParams) ProtoReflect() protoreflect.Message { - mi := &file_subnet_proto_msgTypes[17] +func (*CatchUpPackageContents) ProtoMessage() {} + +func (x *CatchUpPackageContents) ProtoReflect() protoreflect.Message { + mi := &file_subnet_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2071,59 +1414,64 @@ func (x *IDkgTranscriptParams) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -func (x *IDkgTranscriptParams) Reset() { - *x = IDkgTranscriptParams{} +func (x *CatchUpPackageContents) Reset() { + *x = CatchUpPackageContents{} if protoimpl.UnsafeEnabled { - mi := &file_subnet_proto_msgTypes[17] + mi := &file_subnet_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *IDkgTranscriptParams) String() string { +func (x *CatchUpPackageContents) String() string { return protoimpl.X.MessageStringOf(x) } -type InitialIDkgDealings struct { +// Per-subnet chain key configuration +type ChainKeyConfig struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Version uint32 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"` - Params *IDkgTranscriptParams `protobuf:"bytes,2,opt,name=params,proto3" json:"params,omitempty"` - SignedDealings []*IDkgSignedDealingTuple `protobuf:"bytes,4,rep,name=signed_dealings,json=signedDealings,proto3" json:"signed_dealings,omitempty"` + // Configurations for keys held by the subnet. + KeyConfigs []*KeyConfig `protobuf:"bytes,1,rep,name=key_configs,json=keyConfigs,proto3" json:"key_configs,omitempty"` + // Signature requests will timeout after the given number of nano seconds. + SignatureRequestTimeoutNs *uint64 `protobuf:"varint,2,opt,name=signature_request_timeout_ns,json=signatureRequestTimeoutNs,proto3,oneof" json:"signature_request_timeout_ns,omitempty"` + // Key rotation period of a single node in milliseconds. + // If none is specified key rotation is disabled. + IdkgKeyRotationPeriodMs *uint64 `protobuf:"varint,3,opt,name=idkg_key_rotation_period_ms,json=idkgKeyRotationPeriodMs,proto3,oneof" json:"idkg_key_rotation_period_ms,omitempty"` } -// Deprecated: Use InitialIDkgDealings.ProtoReflect.Descriptor instead. -func (*InitialIDkgDealings) Descriptor() ([]byte, []int) { - return file_subnet_proto_rawDescGZIP(), []int{20} +// Deprecated: Use ChainKeyConfig.ProtoReflect.Descriptor instead. +func (*ChainKeyConfig) Descriptor() ([]byte, []int) { + return file_subnet_proto_rawDescGZIP(), []int{30} } -func (x *InitialIDkgDealings) GetParams() *IDkgTranscriptParams { - if x != nil { - return x.Params +func (x *ChainKeyConfig) GetIdkgKeyRotationPeriodMs() uint64 { + if x != nil && x.IdkgKeyRotationPeriodMs != nil { + return *x.IdkgKeyRotationPeriodMs } - return nil + return 0 } -func (x *InitialIDkgDealings) GetSignedDealings() []*IDkgSignedDealingTuple { +func (x *ChainKeyConfig) GetKeyConfigs() []*KeyConfig { if x != nil { - return x.SignedDealings + return x.KeyConfigs } return nil } -func (x *InitialIDkgDealings) GetVersion() uint32 { - if x != nil { - return x.Version +func (x *ChainKeyConfig) GetSignatureRequestTimeoutNs() uint64 { + if x != nil && x.SignatureRequestTimeoutNs != nil { + return *x.SignatureRequestTimeoutNs } return 0 } -func (*InitialIDkgDealings) ProtoMessage() {} +func (*ChainKeyConfig) ProtoMessage() {} -func (x *InitialIDkgDealings) ProtoReflect() protoreflect.Message { - mi := &file_subnet_proto_msgTypes[20] +func (x *ChainKeyConfig) ProtoReflect() protoreflect.Message { + mi := &file_subnet_proto_msgTypes[30] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2134,76 +1482,51 @@ func (x *InitialIDkgDealings) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -func (x *InitialIDkgDealings) Reset() { - *x = InitialIDkgDealings{} +func (x *ChainKeyConfig) Reset() { + *x = ChainKeyConfig{} if protoimpl.UnsafeEnabled { - mi := &file_subnet_proto_msgTypes[20] + mi := &file_subnet_proto_msgTypes[30] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *InitialIDkgDealings) String() string { +func (x *ChainKeyConfig) String() string { return protoimpl.X.MessageStringOf(x) } -// Initial non-interactive DKG transcript record -type InitialNiDkgTranscriptRecord struct { +type DealerTuple struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id *NiDkgId `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Threshold uint32 `protobuf:"varint,2,opt,name=threshold,proto3" json:"threshold,omitempty"` - Committee [][]byte `protobuf:"bytes,3,rep,name=committee,proto3" json:"committee,omitempty"` - RegistryVersion uint64 `protobuf:"varint,4,opt,name=registry_version,json=registryVersion,proto3" json:"registry_version,omitempty"` - InternalCspTranscript []byte `protobuf:"bytes,5,opt,name=internal_csp_transcript,json=internalCspTranscript,proto3" json:"internal_csp_transcript,omitempty"` -} - -// Deprecated: Use InitialNiDkgTranscriptRecord.ProtoReflect.Descriptor instead. -func (*InitialNiDkgTranscriptRecord) Descriptor() ([]byte, []int) { - return file_subnet_proto_rawDescGZIP(), []int{7} -} - -func (x *InitialNiDkgTranscriptRecord) GetCommittee() [][]byte { - if x != nil { - return x.Committee - } - return nil + DealerId *NodeId `protobuf:"bytes,1,opt,name=dealer_id,json=dealerId,proto3" json:"dealer_id,omitempty"` + DealerIndex uint32 `protobuf:"varint,2,opt,name=dealer_index,json=dealerIndex,proto3" json:"dealer_index,omitempty"` } -func (x *InitialNiDkgTranscriptRecord) GetId() *NiDkgId { - if x != nil { - return x.Id - } - return nil +// Deprecated: Use DealerTuple.ProtoReflect.Descriptor instead. +func (*DealerTuple) Descriptor() ([]byte, []int) { + return file_subnet_proto_rawDescGZIP(), []int{15} } -func (x *InitialNiDkgTranscriptRecord) GetInternalCspTranscript() []byte { +func (x *DealerTuple) GetDealerId() *NodeId { if x != nil { - return x.InternalCspTranscript + return x.DealerId } return nil } -func (x *InitialNiDkgTranscriptRecord) GetRegistryVersion() uint64 { - if x != nil { - return x.RegistryVersion - } - return 0 -} - -func (x *InitialNiDkgTranscriptRecord) GetThreshold() uint32 { +func (x *DealerTuple) GetDealerIndex() uint32 { if x != nil { - return x.Threshold + return x.DealerIndex } return 0 } -func (*InitialNiDkgTranscriptRecord) ProtoMessage() {} +func (*DealerTuple) ProtoMessage() {} -func (x *InitialNiDkgTranscriptRecord) ProtoReflect() protoreflect.Message { - mi := &file_subnet_proto_msgTypes[7] +func (x *DealerTuple) ProtoReflect() protoreflect.Message { + mi := &file_subnet_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2214,62 +1537,84 @@ func (x *InitialNiDkgTranscriptRecord) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -func (x *InitialNiDkgTranscriptRecord) Reset() { - *x = InitialNiDkgTranscriptRecord{} +func (x *DealerTuple) Reset() { + *x = DealerTuple{} if protoimpl.UnsafeEnabled { - mi := &file_subnet_proto_msgTypes[7] + mi := &file_subnet_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *InitialNiDkgTranscriptRecord) String() string { +func (x *DealerTuple) String() string { return protoimpl.X.MessageStringOf(x) } -type KeyConfig struct { +// Per subnet ECDSA configuration +// +// Deprecated; please use ChainKeyConfig instead. +type EcdsaConfig struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The key's identifier. - KeyId *MasterPublicKeyId `protobuf:"bytes,1,opt,name=key_id,json=keyId,proto3,oneof" json:"key_id,omitempty"` - // Number of pre-signatures to create in advance. - PreSignaturesToCreateInAdvance *uint32 `protobuf:"varint,3,opt,name=pre_signatures_to_create_in_advance,json=preSignaturesToCreateInAdvance,proto3,oneof" json:"pre_signatures_to_create_in_advance,omitempty"` + // Number of quadruples to create in advance. + QuadruplesToCreateInAdvance uint32 `protobuf:"varint,1,opt,name=quadruples_to_create_in_advance,json=quadruplesToCreateInAdvance,proto3" json:"quadruples_to_create_in_advance,omitempty"` + // Identifiers for threshold ECDSA keys held by the subnet. + KeyIds []*EcdsaKeyId `protobuf:"bytes,3,rep,name=key_ids,json=keyIds,proto3" json:"key_ids,omitempty"` // The maximum number of signature requests that can be enqueued at once. - MaxQueueSize *uint32 `protobuf:"varint,4,opt,name=max_queue_size,json=maxQueueSize,proto3,oneof" json:"max_queue_size,omitempty"` + MaxQueueSize uint32 `protobuf:"varint,4,opt,name=max_queue_size,json=maxQueueSize,proto3" json:"max_queue_size,omitempty"` + // Signature requests will timeout after the given number of nano seconds. + SignatureRequestTimeoutNs *uint64 `protobuf:"varint,5,opt,name=signature_request_timeout_ns,json=signatureRequestTimeoutNs,proto3,oneof" json:"signature_request_timeout_ns,omitempty"` + // Key rotation period of a single node in milliseconds. + // If none is specified key rotation is disabled. + IdkgKeyRotationPeriodMs *uint64 `protobuf:"varint,6,opt,name=idkg_key_rotation_period_ms,json=idkgKeyRotationPeriodMs,proto3,oneof" json:"idkg_key_rotation_period_ms,omitempty"` } -// Deprecated: Use KeyConfig.ProtoReflect.Descriptor instead. -func (*KeyConfig) Descriptor() ([]byte, []int) { - return file_subnet_proto_rawDescGZIP(), []int{29} +// Deprecated: Use EcdsaConfig.ProtoReflect.Descriptor instead. +func (*EcdsaConfig) Descriptor() ([]byte, []int) { + return file_subnet_proto_rawDescGZIP(), []int{26} } -func (x *KeyConfig) GetKeyId() *MasterPublicKeyId { +func (x *EcdsaConfig) GetIdkgKeyRotationPeriodMs() uint64 { + if x != nil && x.IdkgKeyRotationPeriodMs != nil { + return *x.IdkgKeyRotationPeriodMs + } + return 0 +} + +func (x *EcdsaConfig) GetKeyIds() []*EcdsaKeyId { if x != nil { - return x.KeyId + return x.KeyIds } return nil } -func (x *KeyConfig) GetMaxQueueSize() uint32 { - if x != nil && x.MaxQueueSize != nil { - return *x.MaxQueueSize +func (x *EcdsaConfig) GetMaxQueueSize() uint32 { + if x != nil { + return x.MaxQueueSize } return 0 } -func (x *KeyConfig) GetPreSignaturesToCreateInAdvance() uint32 { - if x != nil && x.PreSignaturesToCreateInAdvance != nil { - return *x.PreSignaturesToCreateInAdvance +func (x *EcdsaConfig) GetQuadruplesToCreateInAdvance() uint32 { + if x != nil { + return x.QuadruplesToCreateInAdvance } return 0 } -func (*KeyConfig) ProtoMessage() {} +func (x *EcdsaConfig) GetSignatureRequestTimeoutNs() uint64 { + if x != nil && x.SignatureRequestTimeoutNs != nil { + return *x.SignatureRequestTimeoutNs + } + return 0 +} -func (x *KeyConfig) ProtoReflect() protoreflect.Message { - mi := &file_subnet_proto_msgTypes[29] +func (*EcdsaConfig) ProtoMessage() {} + +func (x *EcdsaConfig) ProtoReflect() protoreflect.Message { + mi := &file_subnet_proto_msgTypes[26] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2280,61 +1625,86 @@ func (x *KeyConfig) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -func (x *KeyConfig) Reset() { - *x = KeyConfig{} +func (x *EcdsaConfig) Reset() { + *x = EcdsaConfig{} if protoimpl.UnsafeEnabled { - mi := &file_subnet_proto_msgTypes[29] + mi := &file_subnet_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *KeyConfig) String() string { +func (x *EcdsaConfig) String() string { return protoimpl.X.MessageStringOf(x) } -type MasterPublicKeyId struct { +// Types of curves that can be used for ECDSA signatures. +type EcdsaCurve int32 + +const ( + EcdsaCurve_ECDSA_CURVE_UNSPECIFIED EcdsaCurve = 0 + EcdsaCurve_ECDSA_CURVE_SECP256K1 EcdsaCurve = 1 +) + +func (EcdsaCurve) Descriptor() protoreflect.EnumDescriptor { + return file_subnet_proto_enumTypes[0].Descriptor() +} + +func (x EcdsaCurve) Enum() *EcdsaCurve { + p := new(EcdsaCurve) + *p = x + return p +} + +// Deprecated: Use EcdsaCurve.Descriptor instead. +func (EcdsaCurve) EnumDescriptor() ([]byte, []int) { + return file_subnet_proto_rawDescGZIP(), []int{0} +} + +func (x EcdsaCurve) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +func (x EcdsaCurve) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (EcdsaCurve) Type() protoreflect.EnumType { + return &file_subnet_proto_enumTypes[0] +} + +type EcdsaInitialization struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Types that are assignable to KeyId: - // - // *MasterPublicKeyId_Ecdsa - // *MasterPublicKeyId_Schnorr - KeyId isMasterPublicKeyId_KeyId `protobuf_oneof:"key_id"` -} - -// Deprecated: Use MasterPublicKeyId.ProtoReflect.Descriptor instead. -func (*MasterPublicKeyId) Descriptor() ([]byte, []int) { - return file_subnet_proto_rawDescGZIP(), []int{28} + KeyId *EcdsaKeyId `protobuf:"bytes,1,opt,name=key_id,json=keyId,proto3" json:"key_id,omitempty"` + Dealings *InitialIDkgDealings `protobuf:"bytes,2,opt,name=dealings,proto3" json:"dealings,omitempty"` } -func (x *MasterPublicKeyId) GetEcdsa() *EcdsaKeyId { - if x, ok := x.GetKeyId().(*MasterPublicKeyId_Ecdsa); ok { - return x.Ecdsa - } - return nil +// Deprecated: Use EcdsaInitialization.ProtoReflect.Descriptor instead. +func (*EcdsaInitialization) Descriptor() ([]byte, []int) { + return file_subnet_proto_rawDescGZIP(), []int{2} } -func (m *MasterPublicKeyId) GetKeyId() isMasterPublicKeyId_KeyId { - if m != nil { - return m.KeyId +func (x *EcdsaInitialization) GetDealings() *InitialIDkgDealings { + if x != nil { + return x.Dealings } return nil } -func (x *MasterPublicKeyId) GetSchnorr() *SchnorrKeyId { - if x, ok := x.GetKeyId().(*MasterPublicKeyId_Schnorr); ok { - return x.Schnorr +func (x *EcdsaInitialization) GetKeyId() *EcdsaKeyId { + if x != nil { + return x.KeyId } return nil } -func (*MasterPublicKeyId) ProtoMessage() {} +func (*EcdsaInitialization) ProtoMessage() {} -func (x *MasterPublicKeyId) ProtoReflect() protoreflect.Message { - mi := &file_subnet_proto_msgTypes[28] +func (x *EcdsaInitialization) ProtoReflect() protoreflect.Message { + mi := &file_subnet_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2345,80 +1715,51 @@ func (x *MasterPublicKeyId) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -func (x *MasterPublicKeyId) Reset() { - *x = MasterPublicKeyId{} +func (x *EcdsaInitialization) Reset() { + *x = EcdsaInitialization{} if protoimpl.UnsafeEnabled { - mi := &file_subnet_proto_msgTypes[28] + mi := &file_subnet_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *MasterPublicKeyId) String() string { +func (x *EcdsaInitialization) String() string { return protoimpl.X.MessageStringOf(x) } -type MasterPublicKeyId_Ecdsa struct { - Ecdsa *EcdsaKeyId `protobuf:"bytes,1,opt,name=ecdsa,proto3,oneof"` -} - -func (*MasterPublicKeyId_Ecdsa) isMasterPublicKeyId_KeyId() {} - -type MasterPublicKeyId_Schnorr struct { - Schnorr *SchnorrKeyId `protobuf:"bytes,2,opt,name=schnorr,proto3,oneof"` -} - -func (*MasterPublicKeyId_Schnorr) isMasterPublicKeyId_KeyId() {} - -// A non-interactive distributed key generation (NI-DKG) ID. -type NiDkgId struct { +type EcdsaKeyId struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - StartBlockHeight uint64 `protobuf:"varint,1,opt,name=start_block_height,json=startBlockHeight,proto3" json:"start_block_height,omitempty"` - DealerSubnet []byte `protobuf:"bytes,2,opt,name=dealer_subnet,json=dealerSubnet,proto3" json:"dealer_subnet,omitempty"` - DkgTag NiDkgTag `protobuf:"varint,4,opt,name=dkg_tag,json=dkgTag,proto3,enum=registry.subnet.v1.NiDkgTag" json:"dkg_tag,omitempty"` - RemoteTargetId *wrapperspb.BytesValue `protobuf:"bytes,5,opt,name=remote_target_id,json=remoteTargetId,proto3" json:"remote_target_id,omitempty"` -} - -// Deprecated: Use NiDkgId.ProtoReflect.Descriptor instead. -func (*NiDkgId) Descriptor() ([]byte, []int) { - return file_subnet_proto_rawDescGZIP(), []int{6} -} - -func (x *NiDkgId) GetDealerSubnet() []byte { - if x != nil { - return x.DealerSubnet - } - return nil + Curve EcdsaCurve `protobuf:"varint,1,opt,name=curve,proto3,enum=registry.subnet.v1.EcdsaCurve" json:"curve,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` } -func (x *NiDkgId) GetDkgTag() NiDkgTag { - if x != nil { - return x.DkgTag - } - return NiDkgTag_NI_DKG_TAG_UNSPECIFIED +// Deprecated: Use EcdsaKeyId.ProtoReflect.Descriptor instead. +func (*EcdsaKeyId) Descriptor() ([]byte, []int) { + return file_subnet_proto_rawDescGZIP(), []int{1} } -func (x *NiDkgId) GetRemoteTargetId() *wrapperspb.BytesValue { +func (x *EcdsaKeyId) GetCurve() EcdsaCurve { if x != nil { - return x.RemoteTargetId + return x.Curve } - return nil + return EcdsaCurve_ECDSA_CURVE_UNSPECIFIED } -func (x *NiDkgId) GetStartBlockHeight() uint64 { +func (x *EcdsaKeyId) GetName() string { if x != nil { - return x.StartBlockHeight + return x.Name } - return 0 + return "" } -func (*NiDkgId) ProtoMessage() {} +func (*EcdsaKeyId) ProtoMessage() {} -func (x *NiDkgId) ProtoReflect() protoreflect.Message { - mi := &file_subnet_proto_msgTypes[6] +func (x *EcdsaKeyId) ProtoReflect() protoreflect.Message { + mi := &file_subnet_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2429,79 +1770,51 @@ func (x *NiDkgId) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -func (x *NiDkgId) Reset() { - *x = NiDkgId{} +func (x *EcdsaKeyId) Reset() { + *x = EcdsaKeyId{} if protoimpl.UnsafeEnabled { - mi := &file_subnet_proto_msgTypes[6] + mi := &file_subnet_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *NiDkgId) String() string { +func (x *EcdsaKeyId) String() string { return protoimpl.X.MessageStringOf(x) } -// A non-interactive distributed key generation (NI-DKG) tag. -type NiDkgTag int32 - -const ( - NiDkgTag_NI_DKG_TAG_UNSPECIFIED NiDkgTag = 0 - NiDkgTag_NI_DKG_TAG_LOW_THRESHOLD NiDkgTag = 1 - NiDkgTag_NI_DKG_TAG_HIGH_THRESHOLD NiDkgTag = 2 -) - -func (NiDkgTag) Descriptor() protoreflect.EnumDescriptor { - return file_subnet_proto_enumTypes[1].Descriptor() -} +type ExtendedDerivationPath struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (x NiDkgTag) Enum() *NiDkgTag { - p := new(NiDkgTag) - *p = x - return p + Caller *PrincipalId `protobuf:"bytes,1,opt,name=caller,proto3" json:"caller,omitempty"` + DerivationPath [][]byte `protobuf:"bytes,2,rep,name=derivation_path,json=derivationPath,proto3" json:"derivation_path,omitempty"` } -// Deprecated: Use NiDkgTag.Descriptor instead. -func (NiDkgTag) EnumDescriptor() ([]byte, []int) { - return file_subnet_proto_rawDescGZIP(), []int{1} +// Deprecated: Use ExtendedDerivationPath.ProtoReflect.Descriptor instead. +func (*ExtendedDerivationPath) Descriptor() ([]byte, []int) { + return file_subnet_proto_rawDescGZIP(), []int{23} } -func (x NiDkgTag) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) +func (x *ExtendedDerivationPath) GetCaller() *PrincipalId { + if x != nil { + return x.Caller + } + return nil } -func (x NiDkgTag) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +func (x *ExtendedDerivationPath) GetDerivationPath() [][]byte { + if x != nil { + return x.DerivationPath + } + return nil } -func (NiDkgTag) Type() protoreflect.EnumType { - return &file_subnet_proto_enumTypes[1] -} +func (*ExtendedDerivationPath) ProtoMessage() {} -type NodeId struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - PrincipalId *PrincipalId `protobuf:"bytes,1,opt,name=principal_id,json=principalId,proto3" json:"principal_id,omitempty"` -} - -// Deprecated: Use NodeId.ProtoReflect.Descriptor instead. -func (*NodeId) Descriptor() ([]byte, []int) { - return file_subnet_proto_rawDescGZIP(), []int{12} -} - -func (x *NodeId) GetPrincipalId() *PrincipalId { - if x != nil { - return x.PrincipalId - } - return nil -} - -func (*NodeId) ProtoMessage() {} - -func (x *NodeId) ProtoReflect() protoreflect.Message { - mi := &file_subnet_proto_msgTypes[12] +func (x *ExtendedDerivationPath) ProtoReflect() protoreflect.Message { + mi := &file_subnet_proto_msgTypes[23] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2512,43 +1825,109 @@ func (x *NodeId) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -func (x *NodeId) Reset() { - *x = NodeId{} +func (x *ExtendedDerivationPath) Reset() { + *x = ExtendedDerivationPath{} if protoimpl.UnsafeEnabled { - mi := &file_subnet_proto_msgTypes[12] + mi := &file_subnet_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *NodeId) String() string { +func (x *ExtendedDerivationPath) String() string { return protoimpl.X.MessageStringOf(x) } -type PrincipalId struct { +// Per subnet P2P configuration +// Note: protoc is mangling the name P2PConfig to P2pConfig +type GossipConfig struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Raw []byte `protobuf:"bytes,1,opt,name=raw,proto3" json:"raw,omitempty"` + // max outstanding request per peer MIN/DEFAULT/MAX 1/20/200 + MaxArtifactStreamsPerPeer uint32 `protobuf:"varint,1,opt,name=max_artifact_streams_per_peer,json=maxArtifactStreamsPerPeer,proto3" json:"max_artifact_streams_per_peer,omitempty"` + // timeout for a outstanding request 3_000/15_000/180_000 + MaxChunkWaitMs uint32 `protobuf:"varint,2,opt,name=max_chunk_wait_ms,json=maxChunkWaitMs,proto3" json:"max_chunk_wait_ms,omitempty"` + // max duplicate requests in underutilized networks 1/28/6000 + MaxDuplicity uint32 `protobuf:"varint,3,opt,name=max_duplicity,json=maxDuplicity,proto3" json:"max_duplicity,omitempty"` + // maximum chunk size supported on this subnet 1024/4096/131_072 + MaxChunkSize uint32 `protobuf:"varint,4,opt,name=max_chunk_size,json=maxChunkSize,proto3" json:"max_chunk_size,omitempty"` + // history size for receive check 1_000/5_000/30_000 + ReceiveCheckCacheSize uint32 `protobuf:"varint,5,opt,name=receive_check_cache_size,json=receiveCheckCacheSize,proto3" json:"receive_check_cache_size,omitempty"` + // period for re evaluating the priority function. 1_000/3_000/30_000 + PfnEvaluationPeriodMs uint32 `protobuf:"varint,6,opt,name=pfn_evaluation_period_ms,json=pfnEvaluationPeriodMs,proto3" json:"pfn_evaluation_period_ms,omitempty"` + // period for polling the registry for updates 1_000/3_000/30_000 + RegistryPollPeriodMs uint32 `protobuf:"varint,7,opt,name=registry_poll_period_ms,json=registryPollPeriodMs,proto3" json:"registry_poll_period_ms,omitempty"` + // period for sending a retransmission request + RetransmissionRequestMs uint32 `protobuf:"varint,8,opt,name=retransmission_request_ms,json=retransmissionRequestMs,proto3" json:"retransmission_request_ms,omitempty"` // config for advert distribution. } -// Deprecated: Use PrincipalId.ProtoReflect.Descriptor instead. -func (*PrincipalId) Descriptor() ([]byte, []int) { - return file_subnet_proto_rawDescGZIP(), []int{8} +// Deprecated: Use GossipConfig.ProtoReflect.Descriptor instead. +func (*GossipConfig) Descriptor() ([]byte, []int) { + return file_subnet_proto_rawDescGZIP(), []int{24} } -func (x *PrincipalId) GetRaw() []byte { +func (x *GossipConfig) GetMaxArtifactStreamsPerPeer() uint32 { if x != nil { - return x.Raw + return x.MaxArtifactStreamsPerPeer } - return nil + return 0 } -func (*PrincipalId) ProtoMessage() {} +func (x *GossipConfig) GetMaxChunkSize() uint32 { + if x != nil { + return x.MaxChunkSize + } + return 0 +} -func (x *PrincipalId) ProtoReflect() protoreflect.Message { - mi := &file_subnet_proto_msgTypes[8] +func (x *GossipConfig) GetMaxChunkWaitMs() uint32 { + if x != nil { + return x.MaxChunkWaitMs + } + return 0 +} + +func (x *GossipConfig) GetMaxDuplicity() uint32 { + if x != nil { + return x.MaxDuplicity + } + return 0 +} + +func (x *GossipConfig) GetPfnEvaluationPeriodMs() uint32 { + if x != nil { + return x.PfnEvaluationPeriodMs + } + return 0 +} + +func (x *GossipConfig) GetReceiveCheckCacheSize() uint32 { + if x != nil { + return x.ReceiveCheckCacheSize + } + return 0 +} + +func (x *GossipConfig) GetRegistryPollPeriodMs() uint32 { + if x != nil { + return x.RegistryPollPeriodMs + } + return 0 +} + +func (x *GossipConfig) GetRetransmissionRequestMs() uint32 { + if x != nil { + return x.RetransmissionRequestMs + } + return 0 +} + +func (*GossipConfig) ProtoMessage() {} + +func (x *GossipConfig) ProtoReflect() protoreflect.Message { + mi := &file_subnet_proto_msgTypes[24] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2559,77 +1938,59 @@ func (x *PrincipalId) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -func (x *PrincipalId) Reset() { - *x = PrincipalId{} +func (x *GossipConfig) Reset() { + *x = GossipConfig{} if protoimpl.UnsafeEnabled { - mi := &file_subnet_proto_msgTypes[8] + mi := &file_subnet_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PrincipalId) String() string { +func (x *GossipConfig) String() string { return protoimpl.X.MessageStringOf(x) } -// A public key. Described by its `AlgorithmId`, the key's value and proof data holding, e.g., a proof of possession (PoP). -type PublicKey struct { +type IDkgComplaint struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Version uint32 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"` - Algorithm AlgorithmId `protobuf:"varint,2,opt,name=algorithm,proto3,enum=registry.subnet.v1.AlgorithmId" json:"algorithm,omitempty"` - KeyValue []byte `protobuf:"bytes,3,opt,name=key_value,json=keyValue,proto3" json:"key_value,omitempty"` - ProofData *wrapperspb.BytesValue `protobuf:"bytes,4,opt,name=proof_data,json=proofData,proto3" json:"proof_data,omitempty"` - // Number of non-leap-milliseconds since January 1, 1970 UTC. - Timestamp *wrapperspb.UInt64Value `protobuf:"bytes,5,opt,name=timestamp,proto3" json:"timestamp,omitempty"` -} - -// Deprecated: Use PublicKey.ProtoReflect.Descriptor instead. -func (*PublicKey) Descriptor() ([]byte, []int) { - return file_subnet_proto_rawDescGZIP(), []int{13} + TranscriptId *IDkgTranscriptId `protobuf:"bytes,1,opt,name=transcript_id,json=transcriptId,proto3" json:"transcript_id,omitempty"` + Dealer *NodeId `protobuf:"bytes,2,opt,name=dealer,proto3" json:"dealer,omitempty"` + RawComplaint []byte `protobuf:"bytes,3,opt,name=raw_complaint,json=rawComplaint,proto3" json:"raw_complaint,omitempty"` } -func (x *PublicKey) GetAlgorithm() AlgorithmId { - if x != nil { - return x.Algorithm - } - return AlgorithmId_ALGORITHM_ID_UNSPECIFIED +// Deprecated: Use IDkgComplaint.ProtoReflect.Descriptor instead. +func (*IDkgComplaint) Descriptor() ([]byte, []int) { + return file_subnet_proto_rawDescGZIP(), []int{21} } -func (x *PublicKey) GetKeyValue() []byte { +func (x *IDkgComplaint) GetDealer() *NodeId { if x != nil { - return x.KeyValue + return x.Dealer } return nil } -func (x *PublicKey) GetProofData() *wrapperspb.BytesValue { +func (x *IDkgComplaint) GetRawComplaint() []byte { if x != nil { - return x.ProofData + return x.RawComplaint } return nil } -func (x *PublicKey) GetTimestamp() *wrapperspb.UInt64Value { +func (x *IDkgComplaint) GetTranscriptId() *IDkgTranscriptId { if x != nil { - return x.Timestamp + return x.TranscriptId } return nil } -func (x *PublicKey) GetVersion() uint32 { - if x != nil { - return x.Version - } - return 0 -} - -func (*PublicKey) ProtoMessage() {} +func (*IDkgComplaint) ProtoMessage() {} -func (x *PublicKey) ProtoReflect() protoreflect.Message { - mi := &file_subnet_proto_msgTypes[13] +func (x *IDkgComplaint) ProtoReflect() protoreflect.Message { + mi := &file_subnet_proto_msgTypes[21] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2640,64 +2001,51 @@ func (x *PublicKey) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -func (x *PublicKey) Reset() { - *x = PublicKey{} +func (x *IDkgComplaint) Reset() { + *x = IDkgComplaint{} if protoimpl.UnsafeEnabled { - mi := &file_subnet_proto_msgTypes[13] + mi := &file_subnet_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PublicKey) String() string { +func (x *IDkgComplaint) String() string { return protoimpl.X.MessageStringOf(x) } -type RegistryStoreUri struct { +type IDkgDealing struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // / The uri at which the registry store data should be retrieved. The data - // / must be provided as gzipped tar archive - Uri string `protobuf:"bytes,1,opt,name=uri,proto3" json:"uri,omitempty"` - // / A SHA-256, hex encoded hash of the contents of the data stored at the - // / provided URI - Hash string `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"` - // / The registry version that should be used for the catch up package contents - RegistryVersion uint64 `protobuf:"varint,3,opt,name=registry_version,json=registryVersion,proto3" json:"registry_version,omitempty"` -} - -// Deprecated: Use RegistryStoreUri.ProtoReflect.Descriptor instead. -func (*RegistryStoreUri) Descriptor() ([]byte, []int) { - return file_subnet_proto_rawDescGZIP(), []int{4} + TranscriptId *IDkgTranscriptId `protobuf:"bytes,1,opt,name=transcript_id,json=transcriptId,proto3" json:"transcript_id,omitempty"` + RawDealing []byte `protobuf:"bytes,2,opt,name=raw_dealing,json=rawDealing,proto3" json:"raw_dealing,omitempty"` // serialised InternalRawDealing } -func (x *RegistryStoreUri) GetHash() string { - if x != nil { - return x.Hash - } - return "" +// Deprecated: Use IDkgDealing.ProtoReflect.Descriptor instead. +func (*IDkgDealing) Descriptor() ([]byte, []int) { + return file_subnet_proto_rawDescGZIP(), []int{18} } -func (x *RegistryStoreUri) GetRegistryVersion() uint64 { +func (x *IDkgDealing) GetRawDealing() []byte { if x != nil { - return x.RegistryVersion + return x.RawDealing } - return 0 + return nil } -func (x *RegistryStoreUri) GetUri() string { +func (x *IDkgDealing) GetTranscriptId() *IDkgTranscriptId { if x != nil { - return x.Uri + return x.TranscriptId } - return "" + return nil } -func (*RegistryStoreUri) ProtoMessage() {} +func (*IDkgDealing) ProtoMessage() {} -func (x *RegistryStoreUri) ProtoReflect() protoreflect.Message { - mi := &file_subnet_proto_msgTypes[4] +func (x *IDkgDealing) ProtoReflect() protoreflect.Message { + mi := &file_subnet_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2708,87 +2056,59 @@ func (x *RegistryStoreUri) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -func (x *RegistryStoreUri) Reset() { - *x = RegistryStoreUri{} +func (x *IDkgDealing) Reset() { + *x = IDkgDealing{} if protoimpl.UnsafeEnabled { - mi := &file_subnet_proto_msgTypes[4] + mi := &file_subnet_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *RegistryStoreUri) String() string { +func (x *IDkgDealing) String() string { return protoimpl.X.MessageStringOf(x) } -// Types of curves that can be used for Schnorr signatures. -type SchnorrAlgorithm int32 +type IDkgOpening struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -const ( - SchnorrAlgorithm_SCHNORR_ALGORITHM_UNSPECIFIED SchnorrAlgorithm = 0 - SchnorrAlgorithm_SCHNORR_ALGORITHM_BIP340SECP256K1 SchnorrAlgorithm = 1 - SchnorrAlgorithm_SCHNORR_ALGORITHM_ED25519 SchnorrAlgorithm = 2 -) + TranscriptId *IDkgTranscriptId `protobuf:"bytes,1,opt,name=transcript_id,json=transcriptId,proto3" json:"transcript_id,omitempty"` + Dealer *NodeId `protobuf:"bytes,2,opt,name=dealer,proto3" json:"dealer,omitempty"` + RawOpening []byte `protobuf:"bytes,3,opt,name=raw_opening,json=rawOpening,proto3" json:"raw_opening,omitempty"` +} -func (SchnorrAlgorithm) Descriptor() protoreflect.EnumDescriptor { - return file_subnet_proto_enumTypes[5].Descriptor() +// Deprecated: Use IDkgOpening.ProtoReflect.Descriptor instead. +func (*IDkgOpening) Descriptor() ([]byte, []int) { + return file_subnet_proto_rawDescGZIP(), []int{22} } -func (x SchnorrAlgorithm) Enum() *SchnorrAlgorithm { - p := new(SchnorrAlgorithm) - *p = x - return p -} - -// Deprecated: Use SchnorrAlgorithm.Descriptor instead. -func (SchnorrAlgorithm) EnumDescriptor() ([]byte, []int) { - return file_subnet_proto_rawDescGZIP(), []int{5} -} - -func (x SchnorrAlgorithm) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -func (x SchnorrAlgorithm) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (SchnorrAlgorithm) Type() protoreflect.EnumType { - return &file_subnet_proto_enumTypes[5] -} - -type SchnorrKeyId struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Algorithm SchnorrAlgorithm `protobuf:"varint,1,opt,name=algorithm,proto3,enum=registry.subnet.v1.SchnorrAlgorithm" json:"algorithm,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` -} - -// Deprecated: Use SchnorrKeyId.ProtoReflect.Descriptor instead. -func (*SchnorrKeyId) Descriptor() ([]byte, []int) { - return file_subnet_proto_rawDescGZIP(), []int{27} +func (x *IDkgOpening) GetDealer() *NodeId { + if x != nil { + return x.Dealer + } + return nil } -func (x *SchnorrKeyId) GetAlgorithm() SchnorrAlgorithm { +func (x *IDkgOpening) GetRawOpening() []byte { if x != nil { - return x.Algorithm + return x.RawOpening } - return SchnorrAlgorithm_SCHNORR_ALGORITHM_UNSPECIFIED + return nil } -func (x *SchnorrKeyId) GetName() string { +func (x *IDkgOpening) GetTranscriptId() *IDkgTranscriptId { if x != nil { - return x.Name + return x.TranscriptId } - return "" + return nil } -func (*SchnorrKeyId) ProtoMessage() {} +func (*IDkgOpening) ProtoMessage() {} -func (x *SchnorrKeyId) ProtoReflect() protoreflect.Message { - mi := &file_subnet_proto_msgTypes[27] +func (x *IDkgOpening) ProtoReflect() protoreflect.Message { + mi := &file_subnet_proto_msgTypes[22] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2799,51 +2119,59 @@ func (x *SchnorrKeyId) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -func (x *SchnorrKeyId) Reset() { - *x = SchnorrKeyId{} +func (x *IDkgOpening) Reset() { + *x = IDkgOpening{} if protoimpl.UnsafeEnabled { - mi := &file_subnet_proto_msgTypes[27] + mi := &file_subnet_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *SchnorrKeyId) String() string { +func (x *IDkgOpening) String() string { return protoimpl.X.MessageStringOf(x) } -type SignatureTuple struct { +type IDkgSignedDealingTuple struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Signer *NodeId `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty"` - Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` + Dealer *NodeId `protobuf:"bytes,1,opt,name=dealer,proto3" json:"dealer,omitempty"` + Dealing *IDkgDealing `protobuf:"bytes,2,opt,name=dealing,proto3" json:"dealing,omitempty"` + Signature []byte `protobuf:"bytes,3,opt,name=signature,proto3" json:"signature,omitempty"` } -// Deprecated: Use SignatureTuple.ProtoReflect.Descriptor instead. -func (*SignatureTuple) Descriptor() ([]byte, []int) { - return file_subnet_proto_rawDescGZIP(), []int{16} +// Deprecated: Use IDkgSignedDealingTuple.ProtoReflect.Descriptor instead. +func (*IDkgSignedDealingTuple) Descriptor() ([]byte, []int) { + return file_subnet_proto_rawDescGZIP(), []int{19} } -func (x *SignatureTuple) GetSignature() []byte { +func (x *IDkgSignedDealingTuple) GetDealer() *NodeId { if x != nil { - return x.Signature + return x.Dealer } return nil } -func (x *SignatureTuple) GetSigner() *NodeId { +func (x *IDkgSignedDealingTuple) GetDealing() *IDkgDealing { if x != nil { - return x.Signer + return x.Dealing } return nil } -func (*SignatureTuple) ProtoMessage() {} +func (x *IDkgSignedDealingTuple) GetSignature() []byte { + if x != nil { + return x.Signature + } + return nil +} -func (x *SignatureTuple) ProtoReflect() protoreflect.Message { - mi := &file_subnet_proto_msgTypes[16] +func (*IDkgSignedDealingTuple) ProtoMessage() {} + +func (x *IDkgSignedDealingTuple) ProtoReflect() protoreflect.Message { + mi := &file_subnet_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2854,111 +2182,99 @@ func (x *SignatureTuple) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -func (x *SignatureTuple) Reset() { - *x = SignatureTuple{} +func (x *IDkgSignedDealingTuple) Reset() { + *x = IDkgSignedDealingTuple{} if protoimpl.UnsafeEnabled { - mi := &file_subnet_proto_msgTypes[16] + mi := &file_subnet_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *SignatureTuple) String() string { +func (x *IDkgSignedDealingTuple) String() string { return protoimpl.X.MessageStringOf(x) } -type SubnetFeatures struct { +type IDkgTranscript struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // This feature flag controls whether canister execution happens - // in sandboxed process or not. It is disabled by default. - CanisterSandboxing bool `protobuf:"varint,2,opt,name=canister_sandboxing,json=canisterSandboxing,proto3" json:"canister_sandboxing,omitempty"` - // This feature flag controls whether canisters of this subnet are capable of - // performing http(s) requests to the web2. - HttpRequests bool `protobuf:"varint,3,opt,name=http_requests,json=httpRequests,proto3" json:"http_requests,omitempty"` - // Status of the SEV-SNP feature. - SevEnabled *bool `protobuf:"varint,9,opt,name=sev_enabled,json=sevEnabled,proto3,oneof" json:"sev_enabled,omitempty"` + TranscriptId *IDkgTranscriptId `protobuf:"bytes,1,opt,name=transcript_id,json=transcriptId,proto3" json:"transcript_id,omitempty"` + Dealers []*NodeId `protobuf:"bytes,2,rep,name=dealers,proto3" json:"dealers,omitempty"` + Receivers []*NodeId `protobuf:"bytes,3,rep,name=receivers,proto3" json:"receivers,omitempty"` + RegistryVersion uint64 `protobuf:"varint,4,opt,name=registry_version,json=registryVersion,proto3" json:"registry_version,omitempty"` + VerifiedDealings []*VerifiedIDkgDealing `protobuf:"bytes,5,rep,name=verified_dealings,json=verifiedDealings,proto3" json:"verified_dealings,omitempty"` + TranscriptType []byte `protobuf:"bytes,6,opt,name=transcript_type,json=transcriptType,proto3" json:"transcript_type,omitempty"` // CBOR serialized IDkgTranscriptType + AlgorithmId AlgorithmId `protobuf:"varint,7,opt,name=algorithm_id,json=algorithmId,proto3,enum=registry.subnet.v1.AlgorithmId" json:"algorithm_id,omitempty"` + RawTranscript []byte `protobuf:"bytes,8,opt,name=raw_transcript,json=rawTranscript,proto3" json:"raw_transcript,omitempty"` // serialised InternalRawTranscript } -// Deprecated: Use SubnetFeatures.ProtoReflect.Descriptor instead. -func (*SubnetFeatures) Descriptor() ([]byte, []int) { - return file_subnet_proto_rawDescGZIP(), []int{25} +// Deprecated: Use IDkgTranscript.ProtoReflect.Descriptor instead. +func (*IDkgTranscript) Descriptor() ([]byte, []int) { + return file_subnet_proto_rawDescGZIP(), []int{14} } -func (x *SubnetFeatures) GetCanisterSandboxing() bool { +func (x *IDkgTranscript) GetAlgorithmId() AlgorithmId { if x != nil { - return x.CanisterSandboxing + return x.AlgorithmId } - return false + return AlgorithmId_ALGORITHM_ID_UNSPECIFIED } -func (x *SubnetFeatures) GetHttpRequests() bool { +func (x *IDkgTranscript) GetDealers() []*NodeId { if x != nil { - return x.HttpRequests + return x.Dealers } - return false + return nil } -func (x *SubnetFeatures) GetSevEnabled() bool { - if x != nil && x.SevEnabled != nil { - return *x.SevEnabled +func (x *IDkgTranscript) GetRawTranscript() []byte { + if x != nil { + return x.RawTranscript } - return false + return nil } -func (*SubnetFeatures) ProtoMessage() {} - -func (x *SubnetFeatures) ProtoReflect() protoreflect.Message { - mi := &file_subnet_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *IDkgTranscript) GetReceivers() []*NodeId { + if x != nil { + return x.Receivers } - return mi.MessageOf(x) + return nil } -func (x *SubnetFeatures) Reset() { - *x = SubnetFeatures{} - if protoimpl.UnsafeEnabled { - mi := &file_subnet_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *IDkgTranscript) GetRegistryVersion() uint64 { + if x != nil { + return x.RegistryVersion } + return 0 } -func (x *SubnetFeatures) String() string { - return protoimpl.X.MessageStringOf(x) -} - -type SubnetId struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - PrincipalId *PrincipalId `protobuf:"bytes,1,opt,name=principal_id,json=principalId,proto3" json:"principal_id,omitempty"` +func (x *IDkgTranscript) GetTranscriptId() *IDkgTranscriptId { + if x != nil { + return x.TranscriptId + } + return nil } -// Deprecated: Use SubnetId.ProtoReflect.Descriptor instead. -func (*SubnetId) Descriptor() ([]byte, []int) { - return file_subnet_proto_rawDescGZIP(), []int{9} +func (x *IDkgTranscript) GetTranscriptType() []byte { + if x != nil { + return x.TranscriptType + } + return nil } -func (x *SubnetId) GetPrincipalId() *PrincipalId { +func (x *IDkgTranscript) GetVerifiedDealings() []*VerifiedIDkgDealing { if x != nil { - return x.PrincipalId + return x.VerifiedDealings } return nil } -func (*SubnetId) ProtoMessage() {} +func (*IDkgTranscript) ProtoMessage() {} -func (x *SubnetId) ProtoReflect() protoreflect.Message { - mi := &file_subnet_proto_msgTypes[9] +func (x *IDkgTranscript) ProtoReflect() protoreflect.Message { + mi := &file_subnet_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2969,45 +2285,59 @@ func (x *SubnetId) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -func (x *SubnetId) Reset() { - *x = SubnetId{} +func (x *IDkgTranscript) Reset() { + *x = IDkgTranscript{} if protoimpl.UnsafeEnabled { - mi := &file_subnet_proto_msgTypes[9] + mi := &file_subnet_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *SubnetId) String() string { +func (x *IDkgTranscript) String() string { return protoimpl.X.MessageStringOf(x) } -// Contains information pertaining to all subnets in the IC and their params. -type SubnetListRecord struct { +type IDkgTranscriptId struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // A list of subnet ids of all subnets present in this instance of the IC. - Subnets [][]byte `protobuf:"bytes,2,rep,name=subnets,proto3" json:"subnets,omitempty"` + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + SubnetId *SubnetId `protobuf:"bytes,2,opt,name=subnet_id,json=subnetId,proto3" json:"subnet_id,omitempty"` + SourceHeight uint64 `protobuf:"varint,3,opt,name=source_height,json=sourceHeight,proto3" json:"source_height,omitempty"` } -// Deprecated: Use SubnetListRecord.ProtoReflect.Descriptor instead. -func (*SubnetListRecord) Descriptor() ([]byte, []int) { - return file_subnet_proto_rawDescGZIP(), []int{5} +// Deprecated: Use IDkgTranscriptId.ProtoReflect.Descriptor instead. +func (*IDkgTranscriptId) Descriptor() ([]byte, []int) { + return file_subnet_proto_rawDescGZIP(), []int{10} } -func (x *SubnetListRecord) GetSubnets() [][]byte { +func (x *IDkgTranscriptId) GetId() uint64 { if x != nil { - return x.Subnets + return x.Id + } + return 0 +} + +func (x *IDkgTranscriptId) GetSourceHeight() uint64 { + if x != nil { + return x.SourceHeight + } + return 0 +} + +func (x *IDkgTranscriptId) GetSubnetId() *SubnetId { + if x != nil { + return x.SubnetId } return nil } -func (*SubnetListRecord) ProtoMessage() {} +func (*IDkgTranscriptId) ProtoMessage() {} -func (x *SubnetListRecord) ProtoReflect() protoreflect.Message { - mi := &file_subnet_proto_msgTypes[5] +func (x *IDkgTranscriptId) ProtoReflect() protoreflect.Message { + mi := &file_subnet_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3018,263 +2348,272 @@ func (x *SubnetListRecord) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -func (x *SubnetListRecord) Reset() { - *x = SubnetListRecord{} +func (x *IDkgTranscriptId) Reset() { + *x = IDkgTranscriptId{} if protoimpl.UnsafeEnabled { - mi := &file_subnet_proto_msgTypes[5] + mi := &file_subnet_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *SubnetListRecord) String() string { +func (x *IDkgTranscriptId) String() string { return protoimpl.X.MessageStringOf(x) } -// A subnet: A logical group of nodes that run consensus -type SubnetRecord struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +type IDkgTranscriptOperation int32 - Membership [][]byte `protobuf:"bytes,3,rep,name=membership,proto3" json:"membership,omitempty"` - // Maximum amount of bytes per message. This is a hard cap, which means - // ingress messages greater than the limit will be dropped. - MaxIngressBytesPerMessage uint64 `protobuf:"varint,5,opt,name=max_ingress_bytes_per_message,json=maxIngressBytesPerMessage,proto3" json:"max_ingress_bytes_per_message,omitempty"` - // Unit delay for blockmaker (in milliseconds). - UnitDelayMillis uint64 `protobuf:"varint,7,opt,name=unit_delay_millis,json=unitDelayMillis,proto3" json:"unit_delay_millis,omitempty"` - // Initial delay for notary (in milliseconds), to give time to rank-0 block - // propagation. - InitialNotaryDelayMillis uint64 `protobuf:"varint,8,opt,name=initial_notary_delay_millis,json=initialNotaryDelayMillis,proto3" json:"initial_notary_delay_millis,omitempty"` - // ID of the Replica version to run - ReplicaVersionId string `protobuf:"bytes,9,opt,name=replica_version_id,json=replicaVersionId,proto3" json:"replica_version_id,omitempty"` - // The length of all DKG intervals. The DKG interval length is the number of rounds following the DKG summary. - DkgIntervalLength uint64 `protobuf:"varint,10,opt,name=dkg_interval_length,json=dkgIntervalLength,proto3" json:"dkg_interval_length,omitempty"` - // Gossip Config - GossipConfig *GossipConfig `protobuf:"bytes,13,opt,name=gossip_config,json=gossipConfig,proto3" json:"gossip_config,omitempty"` - // If set to yes, the subnet starts as a (new) NNS - StartAsNns bool `protobuf:"varint,14,opt,name=start_as_nns,json=startAsNns,proto3" json:"start_as_nns,omitempty"` - // The type of subnet. - SubnetType SubnetType `protobuf:"varint,15,opt,name=subnet_type,json=subnetType,proto3,enum=registry.subnet.v1.SubnetType" json:"subnet_type,omitempty"` - // The upper bound for the number of dealings we allow in a block. - DkgDealingsPerBlock uint64 `protobuf:"varint,16,opt,name=dkg_dealings_per_block,json=dkgDealingsPerBlock,proto3" json:"dkg_dealings_per_block,omitempty"` - // If `true`, the subnet will be halted: it will no longer create or execute blocks. - IsHalted bool `protobuf:"varint,17,opt,name=is_halted,json=isHalted,proto3" json:"is_halted,omitempty"` - // Max number of ingress messages per block. - MaxIngressMessagesPerBlock uint64 `protobuf:"varint,18,opt,name=max_ingress_messages_per_block,json=maxIngressMessagesPerBlock,proto3" json:"max_ingress_messages_per_block,omitempty"` - // The maximum combined size of the ingress and xnet messages that fit into a block. - MaxBlockPayloadSize uint64 `protobuf:"varint,19,opt,name=max_block_payload_size,json=maxBlockPayloadSize,proto3" json:"max_block_payload_size,omitempty"` - // The maximum number of instructions a message can execute. - // See the comments in `subnet_config.rs` for more details. - MaxInstructionsPerMessage uint64 `protobuf:"varint,20,opt,name=max_instructions_per_message,json=maxInstructionsPerMessage,proto3" json:"max_instructions_per_message,omitempty"` - // The maximum number of instructions a round can execute. - // See the comments in `subnet_config.rs` for more details. - MaxInstructionsPerRound uint64 `protobuf:"varint,21,opt,name=max_instructions_per_round,json=maxInstructionsPerRound,proto3" json:"max_instructions_per_round,omitempty"` - // The maximum number of instructions an `install_code` message can execute. - // See the comments in `subnet_config.rs` for more details. - MaxInstructionsPerInstallCode uint64 `protobuf:"varint,22,opt,name=max_instructions_per_install_code,json=maxInstructionsPerInstallCode,proto3" json:"max_instructions_per_install_code,omitempty"` - // Information on whether a feature is supported by this subnet. - Features *SubnetFeatures `protobuf:"bytes,23,opt,name=features,proto3" json:"features,omitempty"` - // The maximum number of canisters that may be present on the subnet at any given time. - // - // A value of 0 is equivalent to setting no limit. This also provides an easy way - // to maintain compatibility of different versions of replica and registry. - MaxNumberOfCanisters uint64 `protobuf:"varint,24,opt,name=max_number_of_canisters,json=maxNumberOfCanisters,proto3" json:"max_number_of_canisters,omitempty"` - // The list of public keys whose owners have "readonly" SSH access to all replicas on this subnet, - // in case it is necessary to perform subnet recovery. - SshReadonlyAccess []string `protobuf:"bytes,25,rep,name=ssh_readonly_access,json=sshReadonlyAccess,proto3" json:"ssh_readonly_access,omitempty"` - // The list of public keys whose owners have "backup" SSH access to nodes on the NNS subnet - // to make sure the NNS can be backed up. - SshBackupAccess []string `protobuf:"bytes,26,rep,name=ssh_backup_access,json=sshBackupAccess,proto3" json:"ssh_backup_access,omitempty"` - // ECDSA Config. This field cannot be set back to `None` once it has been set - // to `Some`. To remove a key, the list of `key_ids` can be set to not include a particular key. - // If a removed key is not held by another subnet, it will be lost. - // - // Deprecated; please use chain_key_config instead. - EcdsaConfig *EcdsaConfig `protobuf:"bytes,27,opt,name=ecdsa_config,json=ecdsaConfig,proto3" json:"ecdsa_config,omitempty"` - // If `true`, the subnet will be halted after reaching the next cup height: it will no longer - // create or execute blocks. - // - // Note: this flag is reset automatically when a new CUP proposal is approved. When that - // happens, the `is_halted` flag is set to `true`, so the Subnet remains halted until an - // appropriate proposal which sets `is_halted` to `false` is approved. - HaltAtCupHeight bool `protobuf:"varint,28,opt,name=halt_at_cup_height,json=haltAtCupHeight,proto3" json:"halt_at_cup_height,omitempty"` - // Cryptographic key configuration. This field cannot be set back to `None` once it has been set - // to `Some`. To remove a key, the list of `key_configs` can be set to not include a particular - // key. If the removed key is not held by another subnet, it will be lost. - ChainKeyConfig *ChainKeyConfig `protobuf:"bytes,29,opt,name=chain_key_config,json=chainKeyConfig,proto3,oneof" json:"chain_key_config,omitempty"` +const ( + IDkgTranscriptOperation_I_DKG_TRANSCRIPT_OPERATION_UNSPECIFIED IDkgTranscriptOperation = 0 + IDkgTranscriptOperation_I_DKG_TRANSCRIPT_OPERATION_RANDOM IDkgTranscriptOperation = 1 + IDkgTranscriptOperation_I_DKG_TRANSCRIPT_OPERATION_RESHARE_OF_MASKED IDkgTranscriptOperation = 2 + IDkgTranscriptOperation_I_DKG_TRANSCRIPT_OPERATION_RESHARE_OF_UNMASKED IDkgTranscriptOperation = 3 + IDkgTranscriptOperation_I_DKG_TRANSCRIPT_OPERATION_UNMASKED_TIMES_MASKED IDkgTranscriptOperation = 4 + IDkgTranscriptOperation_I_DKG_TRANSCRIPT_OPERATION_RANDOM_UNMASKED IDkgTranscriptOperation = 5 +) + +func (IDkgTranscriptOperation) Descriptor() protoreflect.EnumDescriptor { + return file_subnet_proto_enumTypes[3].Descriptor() } -// Deprecated: Use SubnetRecord.ProtoReflect.Descriptor instead. -func (*SubnetRecord) Descriptor() ([]byte, []int) { - return file_subnet_proto_rawDescGZIP(), []int{0} +func (x IDkgTranscriptOperation) Enum() *IDkgTranscriptOperation { + p := new(IDkgTranscriptOperation) + *p = x + return p } -func (x *SubnetRecord) GetChainKeyConfig() *ChainKeyConfig { - if x != nil { - return x.ChainKeyConfig - } - return nil +// Deprecated: Use IDkgTranscriptOperation.Descriptor instead. +func (IDkgTranscriptOperation) EnumDescriptor() ([]byte, []int) { + return file_subnet_proto_rawDescGZIP(), []int{3} } -func (x *SubnetRecord) GetDkgDealingsPerBlock() uint64 { - if x != nil { - return x.DkgDealingsPerBlock - } - return 0 +func (x IDkgTranscriptOperation) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) } -func (x *SubnetRecord) GetDkgIntervalLength() uint64 { - if x != nil { - return x.DkgIntervalLength - } - return 0 +func (x IDkgTranscriptOperation) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } -func (x *SubnetRecord) GetEcdsaConfig() *EcdsaConfig { - if x != nil { - return x.EcdsaConfig - } - return nil +func (IDkgTranscriptOperation) Type() protoreflect.EnumType { + return &file_subnet_proto_enumTypes[3] } -func (x *SubnetRecord) GetFeatures() *SubnetFeatures { - if x != nil { - return x.Features - } - return nil +type IDkgTranscriptParams struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TranscriptId *IDkgTranscriptId `protobuf:"bytes,1,opt,name=transcript_id,json=transcriptId,proto3" json:"transcript_id,omitempty"` + Dealers []*DealerTuple `protobuf:"bytes,2,rep,name=dealers,proto3" json:"dealers,omitempty"` + Receivers []*NodeId `protobuf:"bytes,3,rep,name=receivers,proto3" json:"receivers,omitempty"` + RegistryVersion uint64 `protobuf:"varint,4,opt,name=registry_version,json=registryVersion,proto3" json:"registry_version,omitempty"` + AlgorithmId AlgorithmId `protobuf:"varint,5,opt,name=algorithm_id,json=algorithmId,proto3,enum=registry.subnet.v1.AlgorithmId" json:"algorithm_id,omitempty"` + IdkgTranscriptOperation IDkgTranscriptOperation `protobuf:"varint,6,opt,name=idkg_transcript_operation,json=idkgTranscriptOperation,proto3,enum=registry.subnet.v1.IDkgTranscriptOperation" json:"idkg_transcript_operation,omitempty"` + IdkgTranscriptOperationArgs []*IDkgTranscript `protobuf:"bytes,7,rep,name=idkg_transcript_operation_args,json=idkgTranscriptOperationArgs,proto3" json:"idkg_transcript_operation_args,omitempty"` // 0, 1, or 2 IDkgTranscripts } -func (x *SubnetRecord) GetGossipConfig() *GossipConfig { - if x != nil { - return x.GossipConfig - } - return nil +// Deprecated: Use IDkgTranscriptParams.ProtoReflect.Descriptor instead. +func (*IDkgTranscriptParams) Descriptor() ([]byte, []int) { + return file_subnet_proto_rawDescGZIP(), []int{17} } -func (x *SubnetRecord) GetHaltAtCupHeight() bool { +func (x *IDkgTranscriptParams) GetAlgorithmId() AlgorithmId { if x != nil { - return x.HaltAtCupHeight + return x.AlgorithmId } - return false + return AlgorithmId_ALGORITHM_ID_UNSPECIFIED } -func (x *SubnetRecord) GetInitialNotaryDelayMillis() uint64 { +func (x *IDkgTranscriptParams) GetDealers() []*DealerTuple { if x != nil { - return x.InitialNotaryDelayMillis + return x.Dealers } - return 0 + return nil } -func (x *SubnetRecord) GetIsHalted() bool { +func (x *IDkgTranscriptParams) GetIdkgTranscriptOperation() IDkgTranscriptOperation { if x != nil { - return x.IsHalted + return x.IdkgTranscriptOperation } - return false + return IDkgTranscriptOperation_I_DKG_TRANSCRIPT_OPERATION_UNSPECIFIED } -func (x *SubnetRecord) GetMaxBlockPayloadSize() uint64 { +func (x *IDkgTranscriptParams) GetIdkgTranscriptOperationArgs() []*IDkgTranscript { if x != nil { - return x.MaxBlockPayloadSize + return x.IdkgTranscriptOperationArgs } - return 0 + return nil } -func (x *SubnetRecord) GetMaxIngressBytesPerMessage() uint64 { +func (x *IDkgTranscriptParams) GetReceivers() []*NodeId { if x != nil { - return x.MaxIngressBytesPerMessage + return x.Receivers } - return 0 + return nil } -func (x *SubnetRecord) GetMaxIngressMessagesPerBlock() uint64 { +func (x *IDkgTranscriptParams) GetRegistryVersion() uint64 { if x != nil { - return x.MaxIngressMessagesPerBlock + return x.RegistryVersion } return 0 } -func (x *SubnetRecord) GetMaxInstructionsPerInstallCode() uint64 { +func (x *IDkgTranscriptParams) GetTranscriptId() *IDkgTranscriptId { if x != nil { - return x.MaxInstructionsPerInstallCode + return x.TranscriptId } - return 0 + return nil } -func (x *SubnetRecord) GetMaxInstructionsPerMessage() uint64 { - if x != nil { - return x.MaxInstructionsPerMessage +func (*IDkgTranscriptParams) ProtoMessage() {} + +func (x *IDkgTranscriptParams) ProtoReflect() protoreflect.Message { + mi := &file_subnet_proto_msgTypes[17] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return 0 + return mi.MessageOf(x) } -func (x *SubnetRecord) GetMaxInstructionsPerRound() uint64 { - if x != nil { - return x.MaxInstructionsPerRound +func (x *IDkgTranscriptParams) Reset() { + *x = IDkgTranscriptParams{} + if protoimpl.UnsafeEnabled { + mi := &file_subnet_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return 0 } -func (x *SubnetRecord) GetMaxNumberOfCanisters() uint64 { - if x != nil { - return x.MaxNumberOfCanisters - } - return 0 +func (x *IDkgTranscriptParams) String() string { + return protoimpl.X.MessageStringOf(x) } -func (x *SubnetRecord) GetMembership() [][]byte { - if x != nil { - return x.Membership - } - return nil +type InitialIDkgDealings struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Version uint32 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"` + Params *IDkgTranscriptParams `protobuf:"bytes,2,opt,name=params,proto3" json:"params,omitempty"` + SignedDealings []*IDkgSignedDealingTuple `protobuf:"bytes,4,rep,name=signed_dealings,json=signedDealings,proto3" json:"signed_dealings,omitempty"` } -func (x *SubnetRecord) GetReplicaVersionId() string { - if x != nil { - return x.ReplicaVersionId - } - return "" +// Deprecated: Use InitialIDkgDealings.ProtoReflect.Descriptor instead. +func (*InitialIDkgDealings) Descriptor() ([]byte, []int) { + return file_subnet_proto_rawDescGZIP(), []int{20} } -func (x *SubnetRecord) GetSshBackupAccess() []string { +func (x *InitialIDkgDealings) GetParams() *IDkgTranscriptParams { if x != nil { - return x.SshBackupAccess + return x.Params } return nil } -func (x *SubnetRecord) GetSshReadonlyAccess() []string { +func (x *InitialIDkgDealings) GetSignedDealings() []*IDkgSignedDealingTuple { if x != nil { - return x.SshReadonlyAccess + return x.SignedDealings } return nil } -func (x *SubnetRecord) GetStartAsNns() bool { +func (x *InitialIDkgDealings) GetVersion() uint32 { if x != nil { - return x.StartAsNns + return x.Version } - return false + return 0 } -func (x *SubnetRecord) GetSubnetType() SubnetType { +func (*InitialIDkgDealings) ProtoMessage() {} + +func (x *InitialIDkgDealings) ProtoReflect() protoreflect.Message { + mi := &file_subnet_proto_msgTypes[20] + 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) +} + +func (x *InitialIDkgDealings) Reset() { + *x = InitialIDkgDealings{} + if protoimpl.UnsafeEnabled { + mi := &file_subnet_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InitialIDkgDealings) String() string { + return protoimpl.X.MessageStringOf(x) +} + +// Initial non-interactive DKG transcript record +type InitialNiDkgTranscriptRecord struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id *NiDkgId `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Threshold uint32 `protobuf:"varint,2,opt,name=threshold,proto3" json:"threshold,omitempty"` + Committee [][]byte `protobuf:"bytes,3,rep,name=committee,proto3" json:"committee,omitempty"` + RegistryVersion uint64 `protobuf:"varint,4,opt,name=registry_version,json=registryVersion,proto3" json:"registry_version,omitempty"` + InternalCspTranscript []byte `protobuf:"bytes,5,opt,name=internal_csp_transcript,json=internalCspTranscript,proto3" json:"internal_csp_transcript,omitempty"` +} + +// Deprecated: Use InitialNiDkgTranscriptRecord.ProtoReflect.Descriptor instead. +func (*InitialNiDkgTranscriptRecord) Descriptor() ([]byte, []int) { + return file_subnet_proto_rawDescGZIP(), []int{7} +} + +func (x *InitialNiDkgTranscriptRecord) GetCommittee() [][]byte { if x != nil { - return x.SubnetType + return x.Committee } - return SubnetType_SUBNET_TYPE_UNSPECIFIED + return nil } -func (x *SubnetRecord) GetUnitDelayMillis() uint64 { +func (x *InitialNiDkgTranscriptRecord) GetId() *NiDkgId { if x != nil { - return x.UnitDelayMillis + return x.Id + } + return nil +} + +func (x *InitialNiDkgTranscriptRecord) GetInternalCspTranscript() []byte { + if x != nil { + return x.InternalCspTranscript + } + return nil +} + +func (x *InitialNiDkgTranscriptRecord) GetRegistryVersion() uint64 { + if x != nil { + return x.RegistryVersion } return 0 } -func (*SubnetRecord) ProtoMessage() {} +func (x *InitialNiDkgTranscriptRecord) GetThreshold() uint32 { + if x != nil { + return x.Threshold + } + return 0 +} -func (x *SubnetRecord) ProtoReflect() protoreflect.Message { - mi := &file_subnet_proto_msgTypes[0] +func (*InitialNiDkgTranscriptRecord) ProtoMessage() {} + +func (x *InitialNiDkgTranscriptRecord) ProtoReflect() protoreflect.Message { + mi := &file_subnet_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3285,104 +2624,127 @@ func (x *SubnetRecord) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -func (x *SubnetRecord) Reset() { - *x = SubnetRecord{} +func (x *InitialNiDkgTranscriptRecord) Reset() { + *x = InitialNiDkgTranscriptRecord{} if protoimpl.UnsafeEnabled { - mi := &file_subnet_proto_msgTypes[0] + mi := &file_subnet_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *SubnetRecord) String() string { +func (x *InitialNiDkgTranscriptRecord) String() string { return protoimpl.X.MessageStringOf(x) } -// Represents the type of subnet. Subnets of different type might exhibit different -// behavior, e.g. being more restrictive in what operations are allowed or privileged -// compared to other subnet types. -type SubnetType int32 +type KeyConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -const ( - SubnetType_SUBNET_TYPE_UNSPECIFIED SubnetType = 0 - // A normal subnet where no restrictions are applied. - SubnetType_SUBNET_TYPE_APPLICATION SubnetType = 1 - // A more privileged subnet where certain restrictions are applied, - // like not charging for cycles or restricting who can create and - // install canisters on it. - SubnetType_SUBNET_TYPE_SYSTEM SubnetType = 2 - // A subnet type that is like application subnets but can have some - // additional features. - SubnetType_SUBNET_TYPE_VERIFIED_APPLICATION SubnetType = 4 -) + // The key's identifier. + KeyId *MasterPublicKeyId `protobuf:"bytes,1,opt,name=key_id,json=keyId,proto3,oneof" json:"key_id,omitempty"` + // Number of pre-signatures to create in advance. + PreSignaturesToCreateInAdvance *uint32 `protobuf:"varint,3,opt,name=pre_signatures_to_create_in_advance,json=preSignaturesToCreateInAdvance,proto3,oneof" json:"pre_signatures_to_create_in_advance,omitempty"` + // The maximum number of signature requests that can be enqueued at once. + MaxQueueSize *uint32 `protobuf:"varint,4,opt,name=max_queue_size,json=maxQueueSize,proto3,oneof" json:"max_queue_size,omitempty"` +} -func (SubnetType) Descriptor() protoreflect.EnumDescriptor { - return file_subnet_proto_enumTypes[4].Descriptor() +// Deprecated: Use KeyConfig.ProtoReflect.Descriptor instead. +func (*KeyConfig) Descriptor() ([]byte, []int) { + return file_subnet_proto_rawDescGZIP(), []int{29} } -func (x SubnetType) Enum() *SubnetType { - p := new(SubnetType) - *p = x - return p +func (x *KeyConfig) GetKeyId() *MasterPublicKeyId { + if x != nil { + return x.KeyId + } + return nil } -// Deprecated: Use SubnetType.Descriptor instead. -func (SubnetType) EnumDescriptor() ([]byte, []int) { - return file_subnet_proto_rawDescGZIP(), []int{4} +func (x *KeyConfig) GetMaxQueueSize() uint32 { + if x != nil && x.MaxQueueSize != nil { + return *x.MaxQueueSize + } + return 0 } -func (x SubnetType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) +func (x *KeyConfig) GetPreSignaturesToCreateInAdvance() uint32 { + if x != nil && x.PreSignaturesToCreateInAdvance != nil { + return *x.PreSignaturesToCreateInAdvance + } + return 0 } -func (x SubnetType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +func (*KeyConfig) ProtoMessage() {} + +func (x *KeyConfig) ProtoReflect() protoreflect.Message { + mi := &file_subnet_proto_msgTypes[29] + 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) } -func (SubnetType) Type() protoreflect.EnumType { - return &file_subnet_proto_enumTypes[4] +func (x *KeyConfig) Reset() { + *x = KeyConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_subnet_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -type VerifiedIDkgDealing struct { +func (x *KeyConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +type MasterPublicKeyId struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - DealerIndex uint32 `protobuf:"varint,1,opt,name=dealer_index,json=dealerIndex,proto3" json:"dealer_index,omitempty"` - SignedDealingTuple *IDkgSignedDealingTuple `protobuf:"bytes,6,opt,name=signed_dealing_tuple,json=signedDealingTuple,proto3" json:"signed_dealing_tuple,omitempty"` - SupportTuples []*SignatureTuple `protobuf:"bytes,7,rep,name=support_tuples,json=supportTuples,proto3" json:"support_tuples,omitempty"` + // Types that are assignable to KeyId: + // + // *MasterPublicKeyId_Ecdsa + // *MasterPublicKeyId_Schnorr + KeyId isMasterPublicKeyId_KeyId `protobuf_oneof:"key_id"` } -// Deprecated: Use VerifiedIDkgDealing.ProtoReflect.Descriptor instead. -func (*VerifiedIDkgDealing) Descriptor() ([]byte, []int) { - return file_subnet_proto_rawDescGZIP(), []int{11} +// Deprecated: Use MasterPublicKeyId.ProtoReflect.Descriptor instead. +func (*MasterPublicKeyId) Descriptor() ([]byte, []int) { + return file_subnet_proto_rawDescGZIP(), []int{28} } -func (x *VerifiedIDkgDealing) GetDealerIndex() uint32 { - if x != nil { - return x.DealerIndex +func (x *MasterPublicKeyId) GetEcdsa() *EcdsaKeyId { + if x, ok := x.GetKeyId().(*MasterPublicKeyId_Ecdsa); ok { + return x.Ecdsa } - return 0 + return nil } -func (x *VerifiedIDkgDealing) GetSignedDealingTuple() *IDkgSignedDealingTuple { - if x != nil { - return x.SignedDealingTuple +func (m *MasterPublicKeyId) GetKeyId() isMasterPublicKeyId_KeyId { + if m != nil { + return m.KeyId } return nil } -func (x *VerifiedIDkgDealing) GetSupportTuples() []*SignatureTuple { - if x != nil { - return x.SupportTuples +func (x *MasterPublicKeyId) GetSchnorr() *SchnorrKeyId { + if x, ok := x.GetKeyId().(*MasterPublicKeyId_Schnorr); ok { + return x.Schnorr } return nil } -func (*VerifiedIDkgDealing) ProtoMessage() {} +func (*MasterPublicKeyId) ProtoMessage() {} -func (x *VerifiedIDkgDealing) ProtoReflect() protoreflect.Message { - mi := &file_subnet_proto_msgTypes[11] +func (x *MasterPublicKeyId) ProtoReflect() protoreflect.Message { + mi := &file_subnet_proto_msgTypes[28] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3392,426 +2754,1066 @@ func (x *VerifiedIDkgDealing) ProtoReflect() protoreflect.Message { } return mi.MessageOf(x) } -func (x *VerifiedIDkgDealing) Reset() { - *x = VerifiedIDkgDealing{} + +func (x *MasterPublicKeyId) Reset() { + *x = MasterPublicKeyId{} if protoimpl.UnsafeEnabled { - mi := &file_subnet_proto_msgTypes[11] + mi := &file_subnet_proto_msgTypes[28] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *VerifiedIDkgDealing) String() string { + +func (x *MasterPublicKeyId) String() string { return protoimpl.X.MessageStringOf(x) } -type isMasterPublicKeyId_KeyId interface { - isMasterPublicKeyId_KeyId() + +type MasterPublicKeyId_Ecdsa struct { + Ecdsa *EcdsaKeyId `protobuf:"bytes,1,opt,name=ecdsa,proto3,oneof"` } -func init() { file_subnet_proto_init() } -func file_subnet_proto_init() { - if File_subnet_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_subnet_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*SubnetRecord); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_subnet_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*EcdsaKeyId); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_subnet_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*EcdsaInitialization); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_subnet_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*CatchUpPackageContents); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_subnet_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*RegistryStoreUri); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } +func (*MasterPublicKeyId_Ecdsa) isMasterPublicKeyId_KeyId() {} + +type MasterPublicKeyId_Schnorr struct { + Schnorr *SchnorrKeyId `protobuf:"bytes,2,opt,name=schnorr,proto3,oneof"` +} + +func (*MasterPublicKeyId_Schnorr) isMasterPublicKeyId_KeyId() {} + +// A non-interactive distributed key generation (NI-DKG) ID. +type NiDkgId struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + StartBlockHeight uint64 `protobuf:"varint,1,opt,name=start_block_height,json=startBlockHeight,proto3" json:"start_block_height,omitempty"` + DealerSubnet []byte `protobuf:"bytes,2,opt,name=dealer_subnet,json=dealerSubnet,proto3" json:"dealer_subnet,omitempty"` + DkgTag NiDkgTag `protobuf:"varint,4,opt,name=dkg_tag,json=dkgTag,proto3,enum=registry.subnet.v1.NiDkgTag" json:"dkg_tag,omitempty"` + RemoteTargetId *wrapperspb.BytesValue `protobuf:"bytes,5,opt,name=remote_target_id,json=remoteTargetId,proto3" json:"remote_target_id,omitempty"` +} + +// Deprecated: Use NiDkgId.ProtoReflect.Descriptor instead. +func (*NiDkgId) Descriptor() ([]byte, []int) { + return file_subnet_proto_rawDescGZIP(), []int{6} +} + +func (x *NiDkgId) GetDealerSubnet() []byte { + if x != nil { + return x.DealerSubnet + } + return nil +} + +func (x *NiDkgId) GetDkgTag() NiDkgTag { + if x != nil { + return x.DkgTag + } + return NiDkgTag_NI_DKG_TAG_UNSPECIFIED +} + +func (x *NiDkgId) GetRemoteTargetId() *wrapperspb.BytesValue { + if x != nil { + return x.RemoteTargetId + } + return nil +} + +func (x *NiDkgId) GetStartBlockHeight() uint64 { + if x != nil { + return x.StartBlockHeight + } + return 0 +} + +func (*NiDkgId) ProtoMessage() {} + +func (x *NiDkgId) ProtoReflect() protoreflect.Message { + mi := &file_subnet_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } - file_subnet_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*SubnetListRecord); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } + return ms + } + return mi.MessageOf(x) +} + +func (x *NiDkgId) Reset() { + *x = NiDkgId{} + if protoimpl.UnsafeEnabled { + mi := &file_subnet_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NiDkgId) String() string { + return protoimpl.X.MessageStringOf(x) +} + +// A non-interactive distributed key generation (NI-DKG) tag. +type NiDkgTag int32 + +const ( + NiDkgTag_NI_DKG_TAG_UNSPECIFIED NiDkgTag = 0 + NiDkgTag_NI_DKG_TAG_LOW_THRESHOLD NiDkgTag = 1 + NiDkgTag_NI_DKG_TAG_HIGH_THRESHOLD NiDkgTag = 2 +) + +func (NiDkgTag) Descriptor() protoreflect.EnumDescriptor { + return file_subnet_proto_enumTypes[1].Descriptor() +} + +func (x NiDkgTag) Enum() *NiDkgTag { + p := new(NiDkgTag) + *p = x + return p +} + +// Deprecated: Use NiDkgTag.Descriptor instead. +func (NiDkgTag) EnumDescriptor() ([]byte, []int) { + return file_subnet_proto_rawDescGZIP(), []int{1} +} + +func (x NiDkgTag) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +func (x NiDkgTag) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (NiDkgTag) Type() protoreflect.EnumType { + return &file_subnet_proto_enumTypes[1] +} + +type NodeId struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PrincipalId *PrincipalId `protobuf:"bytes,1,opt,name=principal_id,json=principalId,proto3" json:"principal_id,omitempty"` +} + +// Deprecated: Use NodeId.ProtoReflect.Descriptor instead. +func (*NodeId) Descriptor() ([]byte, []int) { + return file_subnet_proto_rawDescGZIP(), []int{12} +} + +func (x *NodeId) GetPrincipalId() *PrincipalId { + if x != nil { + return x.PrincipalId + } + return nil +} + +func (*NodeId) ProtoMessage() {} + +func (x *NodeId) ProtoReflect() protoreflect.Message { + mi := &file_subnet_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } - file_subnet_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*NiDkgId); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } + return ms + } + return mi.MessageOf(x) +} + +func (x *NodeId) Reset() { + *x = NodeId{} + if protoimpl.UnsafeEnabled { + mi := &file_subnet_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NodeId) String() string { + return protoimpl.X.MessageStringOf(x) +} + +type PrincipalId struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Raw []byte `protobuf:"bytes,1,opt,name=raw,proto3" json:"raw,omitempty"` +} + +// Deprecated: Use PrincipalId.ProtoReflect.Descriptor instead. +func (*PrincipalId) Descriptor() ([]byte, []int) { + return file_subnet_proto_rawDescGZIP(), []int{8} +} + +func (x *PrincipalId) GetRaw() []byte { + if x != nil { + return x.Raw + } + return nil +} + +func (*PrincipalId) ProtoMessage() {} + +func (x *PrincipalId) ProtoReflect() protoreflect.Message { + mi := &file_subnet_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } - file_subnet_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*InitialNiDkgTranscriptRecord); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_subnet_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*PrincipalId); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_subnet_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*SubnetId); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_subnet_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*IDkgTranscriptId); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_subnet_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*VerifiedIDkgDealing); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_subnet_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*NodeId); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_subnet_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*PublicKey); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_subnet_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*IDkgTranscript); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_subnet_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*DealerTuple); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_subnet_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*SignatureTuple); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_subnet_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*IDkgTranscriptParams); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_subnet_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*IDkgDealing); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_subnet_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*IDkgSignedDealingTuple); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_subnet_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*InitialIDkgDealings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_subnet_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*IDkgComplaint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_subnet_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*IDkgOpening); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } + return ms + } + return mi.MessageOf(x) +} + +func (x *PrincipalId) Reset() { + *x = PrincipalId{} + if protoimpl.UnsafeEnabled { + mi := &file_subnet_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PrincipalId) String() string { + return protoimpl.X.MessageStringOf(x) +} + +// A public key. Described by its `AlgorithmId`, the key's value and proof data holding, e.g., a proof of possession (PoP). +type PublicKey struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Version uint32 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"` + Algorithm AlgorithmId `protobuf:"varint,2,opt,name=algorithm,proto3,enum=registry.subnet.v1.AlgorithmId" json:"algorithm,omitempty"` + KeyValue []byte `protobuf:"bytes,3,opt,name=key_value,json=keyValue,proto3" json:"key_value,omitempty"` + ProofData *wrapperspb.BytesValue `protobuf:"bytes,4,opt,name=proof_data,json=proofData,proto3" json:"proof_data,omitempty"` + // Number of non-leap-milliseconds since January 1, 1970 UTC. + Timestamp *wrapperspb.UInt64Value `protobuf:"bytes,5,opt,name=timestamp,proto3" json:"timestamp,omitempty"` +} + +// Deprecated: Use PublicKey.ProtoReflect.Descriptor instead. +func (*PublicKey) Descriptor() ([]byte, []int) { + return file_subnet_proto_rawDescGZIP(), []int{13} +} + +func (x *PublicKey) GetAlgorithm() AlgorithmId { + if x != nil { + return x.Algorithm + } + return AlgorithmId_ALGORITHM_ID_UNSPECIFIED +} + +func (x *PublicKey) GetKeyValue() []byte { + if x != nil { + return x.KeyValue + } + return nil +} + +func (x *PublicKey) GetProofData() *wrapperspb.BytesValue { + if x != nil { + return x.ProofData + } + return nil +} + +func (x *PublicKey) GetTimestamp() *wrapperspb.UInt64Value { + if x != nil { + return x.Timestamp + } + return nil +} + +func (x *PublicKey) GetVersion() uint32 { + if x != nil { + return x.Version + } + return 0 +} + +func (*PublicKey) ProtoMessage() {} + +func (x *PublicKey) ProtoReflect() protoreflect.Message { + mi := &file_subnet_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } - file_subnet_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*ExtendedDerivationPath); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } + return ms + } + return mi.MessageOf(x) +} + +func (x *PublicKey) Reset() { + *x = PublicKey{} + if protoimpl.UnsafeEnabled { + mi := &file_subnet_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PublicKey) String() string { + return protoimpl.X.MessageStringOf(x) +} + +type RegistryStoreUri struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // / The uri at which the registry store data should be retrieved. The data + // / must be provided as gzipped tar archive + Uri string `protobuf:"bytes,1,opt,name=uri,proto3" json:"uri,omitempty"` + // / A SHA-256, hex encoded hash of the contents of the data stored at the + // / provided URI + Hash string `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"` + // / The registry version that should be used for the catch up package contents + RegistryVersion uint64 `protobuf:"varint,3,opt,name=registry_version,json=registryVersion,proto3" json:"registry_version,omitempty"` +} + +// Deprecated: Use RegistryStoreUri.ProtoReflect.Descriptor instead. +func (*RegistryStoreUri) Descriptor() ([]byte, []int) { + return file_subnet_proto_rawDescGZIP(), []int{4} +} + +func (x *RegistryStoreUri) GetHash() string { + if x != nil { + return x.Hash + } + return "" +} + +func (x *RegistryStoreUri) GetRegistryVersion() uint64 { + if x != nil { + return x.RegistryVersion + } + return 0 +} + +func (x *RegistryStoreUri) GetUri() string { + if x != nil { + return x.Uri + } + return "" +} + +func (*RegistryStoreUri) ProtoMessage() {} + +func (x *RegistryStoreUri) ProtoReflect() protoreflect.Message { + mi := &file_subnet_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } - file_subnet_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*GossipConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } + return ms + } + return mi.MessageOf(x) +} + +func (x *RegistryStoreUri) Reset() { + *x = RegistryStoreUri{} + if protoimpl.UnsafeEnabled { + mi := &file_subnet_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RegistryStoreUri) String() string { + return protoimpl.X.MessageStringOf(x) +} + +// Types of curves that can be used for Schnorr signatures. +type SchnorrAlgorithm int32 + +const ( + SchnorrAlgorithm_SCHNORR_ALGORITHM_UNSPECIFIED SchnorrAlgorithm = 0 + SchnorrAlgorithm_SCHNORR_ALGORITHM_BIP340SECP256K1 SchnorrAlgorithm = 1 + SchnorrAlgorithm_SCHNORR_ALGORITHM_ED25519 SchnorrAlgorithm = 2 +) + +func (SchnorrAlgorithm) Descriptor() protoreflect.EnumDescriptor { + return file_subnet_proto_enumTypes[5].Descriptor() +} + +func (x SchnorrAlgorithm) Enum() *SchnorrAlgorithm { + p := new(SchnorrAlgorithm) + *p = x + return p +} + +// Deprecated: Use SchnorrAlgorithm.Descriptor instead. +func (SchnorrAlgorithm) EnumDescriptor() ([]byte, []int) { + return file_subnet_proto_rawDescGZIP(), []int{5} +} + +func (x SchnorrAlgorithm) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +func (x SchnorrAlgorithm) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SchnorrAlgorithm) Type() protoreflect.EnumType { + return &file_subnet_proto_enumTypes[5] +} + +type SchnorrKeyId struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Algorithm SchnorrAlgorithm `protobuf:"varint,1,opt,name=algorithm,proto3,enum=registry.subnet.v1.SchnorrAlgorithm" json:"algorithm,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` +} + +// Deprecated: Use SchnorrKeyId.ProtoReflect.Descriptor instead. +func (*SchnorrKeyId) Descriptor() ([]byte, []int) { + return file_subnet_proto_rawDescGZIP(), []int{27} +} + +func (x *SchnorrKeyId) GetAlgorithm() SchnorrAlgorithm { + if x != nil { + return x.Algorithm + } + return SchnorrAlgorithm_SCHNORR_ALGORITHM_UNSPECIFIED +} + +func (x *SchnorrKeyId) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (*SchnorrKeyId) ProtoMessage() {} + +func (x *SchnorrKeyId) ProtoReflect() protoreflect.Message { + mi := &file_subnet_proto_msgTypes[27] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } - file_subnet_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*SubnetFeatures); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } + return ms + } + return mi.MessageOf(x) +} + +func (x *SchnorrKeyId) Reset() { + *x = SchnorrKeyId{} + if protoimpl.UnsafeEnabled { + mi := &file_subnet_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SchnorrKeyId) String() string { + return protoimpl.X.MessageStringOf(x) +} + +type SignatureTuple struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Signer *NodeId `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty"` + Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` +} + +// Deprecated: Use SignatureTuple.ProtoReflect.Descriptor instead. +func (*SignatureTuple) Descriptor() ([]byte, []int) { + return file_subnet_proto_rawDescGZIP(), []int{16} +} + +func (x *SignatureTuple) GetSignature() []byte { + if x != nil { + return x.Signature + } + return nil +} + +func (x *SignatureTuple) GetSigner() *NodeId { + if x != nil { + return x.Signer + } + return nil +} + +func (*SignatureTuple) ProtoMessage() {} + +func (x *SignatureTuple) ProtoReflect() protoreflect.Message { + mi := &file_subnet_proto_msgTypes[16] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } - file_subnet_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*EcdsaConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } + return ms + } + return mi.MessageOf(x) +} + +func (x *SignatureTuple) Reset() { + *x = SignatureTuple{} + if protoimpl.UnsafeEnabled { + mi := &file_subnet_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SignatureTuple) String() string { + return protoimpl.X.MessageStringOf(x) +} + +type SubnetFeatures struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // This feature flag controls whether canister execution happens + // in sandboxed process or not. It is disabled by default. + CanisterSandboxing bool `protobuf:"varint,2,opt,name=canister_sandboxing,json=canisterSandboxing,proto3" json:"canister_sandboxing,omitempty"` + // This feature flag controls whether canisters of this subnet are capable of + // performing http(s) requests to the web2. + HttpRequests bool `protobuf:"varint,3,opt,name=http_requests,json=httpRequests,proto3" json:"http_requests,omitempty"` + // Status of the SEV-SNP feature. + SevEnabled *bool `protobuf:"varint,9,opt,name=sev_enabled,json=sevEnabled,proto3,oneof" json:"sev_enabled,omitempty"` +} + +// Deprecated: Use SubnetFeatures.ProtoReflect.Descriptor instead. +func (*SubnetFeatures) Descriptor() ([]byte, []int) { + return file_subnet_proto_rawDescGZIP(), []int{25} +} + +func (x *SubnetFeatures) GetCanisterSandboxing() bool { + if x != nil { + return x.CanisterSandboxing + } + return false +} + +func (x *SubnetFeatures) GetHttpRequests() bool { + if x != nil { + return x.HttpRequests + } + return false +} + +func (x *SubnetFeatures) GetSevEnabled() bool { + if x != nil && x.SevEnabled != nil { + return *x.SevEnabled + } + return false +} + +func (*SubnetFeatures) ProtoMessage() {} + +func (x *SubnetFeatures) ProtoReflect() protoreflect.Message { + mi := &file_subnet_proto_msgTypes[25] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } - file_subnet_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*SchnorrKeyId); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } + return ms + } + return mi.MessageOf(x) +} + +func (x *SubnetFeatures) Reset() { + *x = SubnetFeatures{} + if protoimpl.UnsafeEnabled { + mi := &file_subnet_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SubnetFeatures) String() string { + return protoimpl.X.MessageStringOf(x) +} + +type SubnetId struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PrincipalId *PrincipalId `protobuf:"bytes,1,opt,name=principal_id,json=principalId,proto3" json:"principal_id,omitempty"` +} + +// Deprecated: Use SubnetId.ProtoReflect.Descriptor instead. +func (*SubnetId) Descriptor() ([]byte, []int) { + return file_subnet_proto_rawDescGZIP(), []int{9} +} + +func (x *SubnetId) GetPrincipalId() *PrincipalId { + if x != nil { + return x.PrincipalId + } + return nil +} + +func (*SubnetId) ProtoMessage() {} + +func (x *SubnetId) ProtoReflect() protoreflect.Message { + mi := &file_subnet_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } - file_subnet_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*MasterPublicKeyId); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } + return ms + } + return mi.MessageOf(x) +} + +func (x *SubnetId) Reset() { + *x = SubnetId{} + if protoimpl.UnsafeEnabled { + mi := &file_subnet_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SubnetId) String() string { + return protoimpl.X.MessageStringOf(x) +} + +// Contains information pertaining to all subnets in the IC and their params. +type SubnetListRecord struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // A list of subnet ids of all subnets present in this instance of the IC. + Subnets [][]byte `protobuf:"bytes,2,rep,name=subnets,proto3" json:"subnets,omitempty"` +} + +// Deprecated: Use SubnetListRecord.ProtoReflect.Descriptor instead. +func (*SubnetListRecord) Descriptor() ([]byte, []int) { + return file_subnet_proto_rawDescGZIP(), []int{5} +} + +func (x *SubnetListRecord) GetSubnets() [][]byte { + if x != nil { + return x.Subnets + } + return nil +} + +func (*SubnetListRecord) ProtoMessage() {} + +func (x *SubnetListRecord) ProtoReflect() protoreflect.Message { + mi := &file_subnet_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } - file_subnet_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*KeyConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } + return ms + } + return mi.MessageOf(x) +} + +func (x *SubnetListRecord) Reset() { + *x = SubnetListRecord{} + if protoimpl.UnsafeEnabled { + mi := &file_subnet_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SubnetListRecord) String() string { + return protoimpl.X.MessageStringOf(x) +} + +// A subnet: A logical group of nodes that run consensus +type SubnetRecord struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Membership [][]byte `protobuf:"bytes,3,rep,name=membership,proto3" json:"membership,omitempty"` + // Maximum amount of bytes per message. This is a hard cap, which means + // ingress messages greater than the limit will be dropped. + MaxIngressBytesPerMessage uint64 `protobuf:"varint,5,opt,name=max_ingress_bytes_per_message,json=maxIngressBytesPerMessage,proto3" json:"max_ingress_bytes_per_message,omitempty"` + // Unit delay for blockmaker (in milliseconds). + UnitDelayMillis uint64 `protobuf:"varint,7,opt,name=unit_delay_millis,json=unitDelayMillis,proto3" json:"unit_delay_millis,omitempty"` + // Initial delay for notary (in milliseconds), to give time to rank-0 block + // propagation. + InitialNotaryDelayMillis uint64 `protobuf:"varint,8,opt,name=initial_notary_delay_millis,json=initialNotaryDelayMillis,proto3" json:"initial_notary_delay_millis,omitempty"` + // ID of the Replica version to run + ReplicaVersionId string `protobuf:"bytes,9,opt,name=replica_version_id,json=replicaVersionId,proto3" json:"replica_version_id,omitempty"` + // The length of all DKG intervals. The DKG interval length is the number of rounds following the DKG summary. + DkgIntervalLength uint64 `protobuf:"varint,10,opt,name=dkg_interval_length,json=dkgIntervalLength,proto3" json:"dkg_interval_length,omitempty"` + // Gossip Config + GossipConfig *GossipConfig `protobuf:"bytes,13,opt,name=gossip_config,json=gossipConfig,proto3" json:"gossip_config,omitempty"` + // If set to yes, the subnet starts as a (new) NNS + StartAsNns bool `protobuf:"varint,14,opt,name=start_as_nns,json=startAsNns,proto3" json:"start_as_nns,omitempty"` + // The type of subnet. + SubnetType SubnetType `protobuf:"varint,15,opt,name=subnet_type,json=subnetType,proto3,enum=registry.subnet.v1.SubnetType" json:"subnet_type,omitempty"` + // The upper bound for the number of dealings we allow in a block. + DkgDealingsPerBlock uint64 `protobuf:"varint,16,opt,name=dkg_dealings_per_block,json=dkgDealingsPerBlock,proto3" json:"dkg_dealings_per_block,omitempty"` + // If `true`, the subnet will be halted: it will no longer create or execute blocks. + IsHalted bool `protobuf:"varint,17,opt,name=is_halted,json=isHalted,proto3" json:"is_halted,omitempty"` + // Max number of ingress messages per block. + MaxIngressMessagesPerBlock uint64 `protobuf:"varint,18,opt,name=max_ingress_messages_per_block,json=maxIngressMessagesPerBlock,proto3" json:"max_ingress_messages_per_block,omitempty"` + // The maximum combined size of the ingress and xnet messages that fit into a block. + MaxBlockPayloadSize uint64 `protobuf:"varint,19,opt,name=max_block_payload_size,json=maxBlockPayloadSize,proto3" json:"max_block_payload_size,omitempty"` + // The maximum number of instructions a message can execute. + // See the comments in `subnet_config.rs` for more details. + MaxInstructionsPerMessage uint64 `protobuf:"varint,20,opt,name=max_instructions_per_message,json=maxInstructionsPerMessage,proto3" json:"max_instructions_per_message,omitempty"` + // The maximum number of instructions a round can execute. + // See the comments in `subnet_config.rs` for more details. + MaxInstructionsPerRound uint64 `protobuf:"varint,21,opt,name=max_instructions_per_round,json=maxInstructionsPerRound,proto3" json:"max_instructions_per_round,omitempty"` + // The maximum number of instructions an `install_code` message can execute. + // See the comments in `subnet_config.rs` for more details. + MaxInstructionsPerInstallCode uint64 `protobuf:"varint,22,opt,name=max_instructions_per_install_code,json=maxInstructionsPerInstallCode,proto3" json:"max_instructions_per_install_code,omitempty"` + // Information on whether a feature is supported by this subnet. + Features *SubnetFeatures `protobuf:"bytes,23,opt,name=features,proto3" json:"features,omitempty"` + // The maximum number of canisters that may be present on the subnet at any given time. + // + // A value of 0 is equivalent to setting no limit. This also provides an easy way + // to maintain compatibility of different versions of replica and registry. + MaxNumberOfCanisters uint64 `protobuf:"varint,24,opt,name=max_number_of_canisters,json=maxNumberOfCanisters,proto3" json:"max_number_of_canisters,omitempty"` + // The list of public keys whose owners have "readonly" SSH access to all replicas on this subnet, + // in case it is necessary to perform subnet recovery. + SshReadonlyAccess []string `protobuf:"bytes,25,rep,name=ssh_readonly_access,json=sshReadonlyAccess,proto3" json:"ssh_readonly_access,omitempty"` + // The list of public keys whose owners have "backup" SSH access to nodes on the NNS subnet + // to make sure the NNS can be backed up. + SshBackupAccess []string `protobuf:"bytes,26,rep,name=ssh_backup_access,json=sshBackupAccess,proto3" json:"ssh_backup_access,omitempty"` + // ECDSA Config. This field cannot be set back to `None` once it has been set + // to `Some`. To remove a key, the list of `key_ids` can be set to not include a particular key. + // If a removed key is not held by another subnet, it will be lost. + // + // Deprecated; please use chain_key_config instead. + EcdsaConfig *EcdsaConfig `protobuf:"bytes,27,opt,name=ecdsa_config,json=ecdsaConfig,proto3" json:"ecdsa_config,omitempty"` + // If `true`, the subnet will be halted after reaching the next cup height: it will no longer + // create or execute blocks. + // + // Note: this flag is reset automatically when a new CUP proposal is approved. When that + // happens, the `is_halted` flag is set to `true`, so the Subnet remains halted until an + // appropriate proposal which sets `is_halted` to `false` is approved. + HaltAtCupHeight bool `protobuf:"varint,28,opt,name=halt_at_cup_height,json=haltAtCupHeight,proto3" json:"halt_at_cup_height,omitempty"` + // Cryptographic key configuration. This field cannot be set back to `None` once it has been set + // to `Some`. To remove a key, the list of `key_configs` can be set to not include a particular + // key. If the removed key is not held by another subnet, it will be lost. + ChainKeyConfig *ChainKeyConfig `protobuf:"bytes,29,opt,name=chain_key_config,json=chainKeyConfig,proto3,oneof" json:"chain_key_config,omitempty"` +} + +// Deprecated: Use SubnetRecord.ProtoReflect.Descriptor instead. +func (*SubnetRecord) Descriptor() ([]byte, []int) { + return file_subnet_proto_rawDescGZIP(), []int{0} +} + +func (x *SubnetRecord) GetChainKeyConfig() *ChainKeyConfig { + if x != nil { + return x.ChainKeyConfig + } + return nil +} + +func (x *SubnetRecord) GetDkgDealingsPerBlock() uint64 { + if x != nil { + return x.DkgDealingsPerBlock + } + return 0 +} + +func (x *SubnetRecord) GetDkgIntervalLength() uint64 { + if x != nil { + return x.DkgIntervalLength + } + return 0 +} + +func (x *SubnetRecord) GetEcdsaConfig() *EcdsaConfig { + if x != nil { + return x.EcdsaConfig + } + return nil +} + +func (x *SubnetRecord) GetFeatures() *SubnetFeatures { + if x != nil { + return x.Features + } + return nil +} + +func (x *SubnetRecord) GetGossipConfig() *GossipConfig { + if x != nil { + return x.GossipConfig + } + return nil +} + +func (x *SubnetRecord) GetHaltAtCupHeight() bool { + if x != nil { + return x.HaltAtCupHeight + } + return false +} + +func (x *SubnetRecord) GetInitialNotaryDelayMillis() uint64 { + if x != nil { + return x.InitialNotaryDelayMillis + } + return 0 +} + +func (x *SubnetRecord) GetIsHalted() bool { + if x != nil { + return x.IsHalted + } + return false +} + +func (x *SubnetRecord) GetMaxBlockPayloadSize() uint64 { + if x != nil { + return x.MaxBlockPayloadSize + } + return 0 +} + +func (x *SubnetRecord) GetMaxIngressBytesPerMessage() uint64 { + if x != nil { + return x.MaxIngressBytesPerMessage + } + return 0 +} + +func (x *SubnetRecord) GetMaxIngressMessagesPerBlock() uint64 { + if x != nil { + return x.MaxIngressMessagesPerBlock + } + return 0 +} + +func (x *SubnetRecord) GetMaxInstructionsPerInstallCode() uint64 { + if x != nil { + return x.MaxInstructionsPerInstallCode + } + return 0 +} + +func (x *SubnetRecord) GetMaxInstructionsPerMessage() uint64 { + if x != nil { + return x.MaxInstructionsPerMessage + } + return 0 +} + +func (x *SubnetRecord) GetMaxInstructionsPerRound() uint64 { + if x != nil { + return x.MaxInstructionsPerRound + } + return 0 +} + +func (x *SubnetRecord) GetMaxNumberOfCanisters() uint64 { + if x != nil { + return x.MaxNumberOfCanisters + } + return 0 +} + +func (x *SubnetRecord) GetMembership() [][]byte { + if x != nil { + return x.Membership + } + return nil +} + +func (x *SubnetRecord) GetReplicaVersionId() string { + if x != nil { + return x.ReplicaVersionId + } + return "" +} + +func (x *SubnetRecord) GetSshBackupAccess() []string { + if x != nil { + return x.SshBackupAccess + } + return nil +} + +func (x *SubnetRecord) GetSshReadonlyAccess() []string { + if x != nil { + return x.SshReadonlyAccess + } + return nil +} + +func (x *SubnetRecord) GetStartAsNns() bool { + if x != nil { + return x.StartAsNns + } + return false +} + +func (x *SubnetRecord) GetSubnetType() SubnetType { + if x != nil { + return x.SubnetType + } + return SubnetType_SUBNET_TYPE_UNSPECIFIED +} + +func (x *SubnetRecord) GetUnitDelayMillis() uint64 { + if x != nil { + return x.UnitDelayMillis + } + return 0 +} + +func (*SubnetRecord) ProtoMessage() {} + +func (x *SubnetRecord) ProtoReflect() protoreflect.Message { + mi := &file_subnet_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } - file_subnet_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*ChainKeyConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } + return ms + } + return mi.MessageOf(x) +} + +func (x *SubnetRecord) Reset() { + *x = SubnetRecord{} + if protoimpl.UnsafeEnabled { + mi := &file_subnet_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SubnetRecord) String() string { + return protoimpl.X.MessageStringOf(x) +} + +// Represents the type of subnet. Subnets of different type might exhibit different +// behavior, e.g. being more restrictive in what operations are allowed or privileged +// compared to other subnet types. +type SubnetType int32 + +const ( + SubnetType_SUBNET_TYPE_UNSPECIFIED SubnetType = 0 + // A normal subnet where no restrictions are applied. + SubnetType_SUBNET_TYPE_APPLICATION SubnetType = 1 + // A more privileged subnet where certain restrictions are applied, + // like not charging for cycles or restricting who can create and + // install canisters on it. + SubnetType_SUBNET_TYPE_SYSTEM SubnetType = 2 + // A subnet type that is like application subnets but can have some + // additional features. + SubnetType_SUBNET_TYPE_VERIFIED_APPLICATION SubnetType = 4 +) + +func (SubnetType) Descriptor() protoreflect.EnumDescriptor { + return file_subnet_proto_enumTypes[4].Descriptor() +} + +func (x SubnetType) Enum() *SubnetType { + p := new(SubnetType) + *p = x + return p +} + +// Deprecated: Use SubnetType.Descriptor instead. +func (SubnetType) EnumDescriptor() ([]byte, []int) { + return file_subnet_proto_rawDescGZIP(), []int{4} +} + +func (x SubnetType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +func (x SubnetType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SubnetType) Type() protoreflect.EnumType { + return &file_subnet_proto_enumTypes[4] +} + +type VerifiedIDkgDealing struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + DealerIndex uint32 `protobuf:"varint,1,opt,name=dealer_index,json=dealerIndex,proto3" json:"dealer_index,omitempty"` + SignedDealingTuple *IDkgSignedDealingTuple `protobuf:"bytes,6,opt,name=signed_dealing_tuple,json=signedDealingTuple,proto3" json:"signed_dealing_tuple,omitempty"` + SupportTuples []*SignatureTuple `protobuf:"bytes,7,rep,name=support_tuples,json=supportTuples,proto3" json:"support_tuples,omitempty"` +} + +// Deprecated: Use VerifiedIDkgDealing.ProtoReflect.Descriptor instead. +func (*VerifiedIDkgDealing) Descriptor() ([]byte, []int) { + return file_subnet_proto_rawDescGZIP(), []int{11} +} + +func (x *VerifiedIDkgDealing) GetDealerIndex() uint32 { + if x != nil { + return x.DealerIndex + } + return 0 +} + +func (x *VerifiedIDkgDealing) GetSignedDealingTuple() *IDkgSignedDealingTuple { + if x != nil { + return x.SignedDealingTuple + } + return nil +} + +func (x *VerifiedIDkgDealing) GetSupportTuples() []*SignatureTuple { + if x != nil { + return x.SupportTuples + } + return nil +} +func (*VerifiedIDkgDealing) ProtoMessage() {} +func (x *VerifiedIDkgDealing) ProtoReflect() protoreflect.Message { + mi := &file_subnet_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } + return ms } - file_subnet_proto_msgTypes[0].OneofWrappers = []any{} - file_subnet_proto_msgTypes[25].OneofWrappers = []any{} - file_subnet_proto_msgTypes[26].OneofWrappers = []any{} - file_subnet_proto_msgTypes[28].OneofWrappers = []any{ - (*MasterPublicKeyId_Ecdsa)(nil), - (*MasterPublicKeyId_Schnorr)(nil), + return mi.MessageOf(x) +} + +func (x *VerifiedIDkgDealing) Reset() { + *x = VerifiedIDkgDealing{} + if protoimpl.UnsafeEnabled { + mi := &file_subnet_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - file_subnet_proto_msgTypes[29].OneofWrappers = []any{} - file_subnet_proto_msgTypes[30].OneofWrappers = []any{} - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_subnet_proto_rawDesc, - NumEnums: 6, - NumMessages: 31, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_subnet_proto_goTypes, - DependencyIndexes: file_subnet_proto_depIdxs, - EnumInfos: file_subnet_proto_enumTypes, - MessageInfos: file_subnet_proto_msgTypes, - }.Build() - File_subnet_proto = out.File - file_subnet_proto_rawDesc = nil - file_subnet_proto_goTypes = nil - file_subnet_proto_depIdxs = nil +} + +func (x *VerifiedIDkgDealing) String() string { + return protoimpl.X.MessageStringOf(x) +} + +type isMasterPublicKeyId_KeyId interface { + isMasterPublicKeyId_KeyId() } diff --git a/clients/registry/proto/v1/transport.pb.go b/clients/registry/proto/v1/transport.pb.go index 0a966bf..19f902a 100644 --- a/clients/registry/proto/v1/transport.pb.go +++ b/clients/registry/proto/v1/transport.pb.go @@ -1670,6 +1670,7 @@ func (x *RegistryValue) Reset() { func (x *RegistryValue) String() string { return protoimpl.X.MessageStringOf(x) } + type isMixedHashTree_TreeEnum interface { isMixedHashTree_TreeEnum() } diff --git a/ic/sns/ledger/agent.go b/ic/sns/ledger/agent.go index 544880a..ae5e401 100755 --- a/ic/sns/ledger/agent.go +++ b/ic/sns/ledger/agent.go @@ -519,7 +519,7 @@ type GetBlocksResult struct { } `ic:"blocks" json:"blocks"` ArchivedBlocks []struct { Args []GetBlocksArgs `ic:"args" json:"args"` - Callback struct { /* NOT SUPPORTED */ + Callback struct { /* NOT SUPPORTED */ } `ic:"callback" json:"callback"` } `ic:"archived_blocks" json:"archived_blocks"` } diff --git a/query.go b/query.go index fb74e7b..730e6c2 100644 --- a/query.go +++ b/query.go @@ -15,7 +15,7 @@ import ( ) // Query calls a method on a canister and unmarshals the result into the given values. -func (q APIRequest[In, Out]) Query(out Out) error { +func (q APIRequest[In, Out]) Query(out Out, skipVerification bool) error { q.a.logger.Printf("[AGENT] QUERY %s %s", q.effectiveCanisterID, q.methodName) ctx, cancel := context.WithTimeout(q.a.ctx, q.a.ingressExpiry) defer cancel() @@ -29,7 +29,7 @@ func (q APIRequest[In, Out]) Query(out Out) error { } // Verify query signatures. - if q.a.verifySignatures { + if !skipVerification && q.a.verifySignatures { if len(resp.Signatures) == 0 { return fmt.Errorf("no signatures") } @@ -76,7 +76,7 @@ func (q APIRequest[In, Out]) Query(out Out) error { append([]byte("\x0Bic-response"), sig[:]...), signature.Signature, ) { - return fmt.Errorf("invalid signature") + return fmt.Errorf("invalid replied signature") } case "rejected": code, err := leb128.EncodeUnsigned(big.NewInt(int64(resp.RejectCode))) @@ -99,7 +99,7 @@ func (q APIRequest[In, Out]) Query(out Out) error { append([]byte("\x0Bic-response"), sig[:]...), signature.Signature, ) { - return fmt.Errorf("invalid signature") + return fmt.Errorf("invalid rejected signature") } default: panic("unreachable") @@ -128,45 +128,14 @@ func (a Agent) Query(canisterID principal.Principal, methodName string, in, out if err != nil { return err } - return query.Query(out) + return query.Query(out, false) } // QueryProto calls a method on a canister and unmarshals the result into the given proto message. func (a Agent) QueryProto(canisterID principal.Principal, methodName string, in, out proto.Message) error { - payload, err := proto.Marshal(in) + query, err := a.CreateProtoAPIRequest(RequestTypeQuery, canisterID, methodName, in) if err != nil { return err } - if len(payload) == 0 { - payload = []byte{} - } - _, data, err := a.sign(Request{ - Type: RequestTypeQuery, - Sender: a.Sender(), - IngressExpiry: a.expiryDate(), - CanisterID: canisterID, - MethodName: methodName, - Arguments: payload, - }) - if err != nil { - return err - } - ctx, cancel := context.WithTimeout(a.ctx, a.ingressExpiry) - defer cancel() - resp, err := a.client.Query(ctx, canisterID, data) - if err != nil { - return err - } - var response Response - if err := cbor.Unmarshal(resp, &response); err != nil { - return err - } - if response.Status != "replied" { - return fmt.Errorf("status: %s", response.Status) - } - var reply map[string][]byte - if err := cbor.Unmarshal(response.Reply, &reply); err != nil { - return err - } - return proto.Unmarshal(reply["arg"], out) + return query.Query(out, true) }