From 479f1be9f419fd3834bd759d503c6188b7fba022 Mon Sep 17 00:00:00 2001 From: Quint Daenen Date: Fri, 14 Jun 2024 10:20:28 +0200 Subject: [PATCH 1/4] Move registry to sub module. --- Makefile | 4 +- agent.go | 91 +++++++++- call.go | 105 +++--------- client.go | 46 +++-- clients/ledger/client.go | 1 + {registry => clients/registry}/README.md | 0 {registry => clients/registry}/client.go | 2 +- {registry => clients/registry}/client_test.go | 2 +- .../registry}/dataprovider.go | 2 +- .../registry}/dataprovider_test.go | 2 +- {registry => clients/registry}/hashtree.go | 2 +- {registry => clients/registry}/proto.go | 0 .../registry}/proto/v1/local.pb.go | 14 +- .../registry}/proto/v1/node.pb.go | 20 +-- .../registry}/proto/v1/operator.pb.go | 12 +- .../registry}/proto/v1/registry.pb.go | 6 +- .../registry}/proto/v1/subnet.pb.go | 80 ++++----- .../registry}/proto/v1/transport.pb.go | 40 ++--- .../registry}/testdata/local.proto | 0 .../registry}/testdata/node.proto | 0 .../registry}/testdata/operator.proto | 0 .../registry}/testdata/registry.proto | 0 .../registry}/testdata/subnet.proto | 0 .../registry}/testdata/transport.proto | 0 gen/templates/agent_indirect.gotmpl | 5 +- ic/ic/agent.go | 142 +++++++++------- ic/registry/agent.go | 13 -- ic/sns/ledger/agent.go | 88 ++++++++++ ic/sns/swap/agent.go | 15 -- ic/sns/testdata/gen.go | 15 +- ic/testdata/did/ic.did | 64 ++----- ic/testdata/gen.go | 20 ++- pocketic/agent_test.go | 10 +- pocketic/endpoints_test.go | 2 +- pocketic/pocketic_test.go | 8 +- query.go | 157 +++++++----------- 36 files changed, 526 insertions(+), 442 deletions(-) create mode 100644 clients/ledger/client.go rename {registry => clients/registry}/README.md (100%) rename {registry => clients/registry}/client.go (99%) rename {registry => clients/registry}/client_test.go (91%) rename {registry => clients/registry}/dataprovider.go (98%) rename {registry => clients/registry}/dataprovider_test.go (83%) rename {registry => clients/registry}/hashtree.go (94%) rename {registry => clients/registry}/proto.go (100%) rename {registry => clients/registry}/proto/v1/local.pb.go (97%) rename {registry => clients/registry}/proto/v1/node.pb.go (97%) rename {registry => clients/registry}/proto/v1/operator.pb.go (97%) rename {registry => clients/registry}/proto/v1/registry.pb.go (98%) rename {registry => clients/registry}/proto/v1/subnet.pb.go (98%) rename {registry => clients/registry}/proto/v1/transport.pb.go (97%) rename {registry => clients/registry}/testdata/local.proto (100%) rename {registry => clients/registry}/testdata/node.proto (100%) rename {registry => clients/registry}/testdata/operator.proto (100%) rename {registry => clients/registry}/testdata/registry.proto (100%) rename {registry => clients/registry}/testdata/subnet.proto (100%) rename {registry => clients/registry}/testdata/transport.proto (100%) diff --git a/Makefile b/Makefile index 1bbe377..09976ef 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ 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/... check-moc: find ic -type f -name '*.mo' -print0 | xargs -0 $(shell dfx cache show)/moc --check @@ -16,7 +16,7 @@ test-cover: gen: cd candid && go generate cd pocketic && go generate - cd registry && go generate + cd clients/registry && go generate gen-ic: go run ic/testdata/gen.go diff --git a/agent.go b/agent.go index c596b67..b9f2e7a 100644 --- a/agent.go +++ b/agent.go @@ -1,11 +1,13 @@ package agent import ( + "context" "crypto/rand" "encoding/binary" "encoding/hex" "errors" "fmt" + "github.com/aviate-labs/agent-go/candid/idl" "net/url" "reflect" "time" @@ -89,9 +91,66 @@ func uint64FromBytes(raw []byte) uint64 { } } +type APIRequest[In, Out any] struct { + a *Agent + unmarshal func([]byte, Out) error + typ RequestType + methodName string + effectiveCanisterID principal.Principal + requestID RequestID + data []byte +} + +func CreateAPIRequest[In, Out any]( + a *Agent, + marshal func(In) ([]byte, error), + unmarshal func([]byte, Out) error, + typ RequestType, + canisterID principal.Principal, + methodName string, + in In, +) (*APIRequest[In, Out], error) { + rawArgs, err := marshal(in) + if err != nil { + return nil, err + } + nonce, err := newNonce() + if err != nil { + return nil, err + } + requestID, data, err := a.sign(Request{ + Type: typ, + Sender: a.Sender(), + CanisterID: canisterID, + MethodName: methodName, + Arguments: rawArgs, + IngressExpiry: a.expiryDate(), + Nonce: nonce, + }) + if err != nil { + return nil, err + } + return &APIRequest[In, Out]{ + a: a, + unmarshal: unmarshal, + typ: typ, + methodName: methodName, + effectiveCanisterID: canisterID, + requestID: *requestID, + data: data, + }, nil +} + +// WithEffectiveCanisterID sets the effective canister ID for the Call. +func (c *APIRequest[In, Out]) WithEffectiveCanisterID(canisterID principal.Principal) *APIRequest[In, Out] { + c.effectiveCanisterID = canisterID + return c +} + // Agent is a client for the Internet Computer. type Agent struct { client Client + ctx context.Context identity identity.Identity ingressExpiry time.Duration rootKey []byte @@ -103,7 +162,7 @@ type Agent struct { // New returns a new Agent based on the given configuration. func New(cfg Config) (*Agent, error) { if cfg.IngressExpiry == 0 { - cfg.IngressExpiry = time.Minute + cfg.IngressExpiry = 5 * time.Minute } // By default, use the anonymous identity. var id identity.Identity = new(identity.AnonymousIdentity) @@ -139,6 +198,7 @@ func New(cfg Config) (*Agent, error) { } return &Agent{ client: client, + ctx: context.Background(), identity: id, ingressExpiry: cfg.IngressExpiry, rootKey: rootKey, @@ -154,6 +214,19 @@ func (a Agent) Client() *Client { return &a.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]( + a, + idl.Marshal, + idl.Unmarshal, + typ, + effectiveCanisterID(canisterID, args), + methodName, + args, + ) +} + // 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") @@ -252,7 +325,9 @@ func (a Agent) Sender() principal.Principal { } func (a Agent) call(ecID principal.Principal, data []byte) ([]byte, error) { - return a.client.Call(ecID, data) + ctx, cancel := context.WithTimeout(a.ctx, a.ingressExpiry) + defer cancel() + return a.client.Call(ctx, ecID, data) } func (a Agent) expiryDate() uint64 { @@ -299,7 +374,9 @@ func (a Agent) poll(ecID principal.Principal, requestID RequestID) ([]byte, erro } func (a Agent) readState(ecID principal.Principal, data []byte) (map[string][]byte, error) { - resp, err := a.client.ReadState(ecID, data) + ctx, cancel := context.WithTimeout(a.ctx, a.ingressExpiry) + defer cancel() + resp, err := a.client.ReadState(ctx, ecID, data) if err != nil { return nil, err } @@ -336,7 +413,9 @@ func (a Agent) readStateCertificate(ecID principal.Principal, paths [][]hashtree } func (a Agent) readSubnetState(subnetID principal.Principal, data []byte) (map[string][]byte, error) { - resp, err := a.client.ReadSubnetState(subnetID, data) + ctx, cancel := context.WithTimeout(a.ctx, a.ingressExpiry) + defer cancel() + resp, err := a.client.ReadSubnetState(ctx, subnetID, data) if err != nil { return nil, err } @@ -385,12 +464,14 @@ func (a Agent) sign(request Request) (*RequestID, []byte, error) { return &requestID, data, nil } +type CandidAPIRequest = APIRequest[[]any, []any] + // Config is the configuration for an Agent. type Config struct { // Identity is the identity used by the Agent. Identity identity.Identity // IngressExpiry is the duration for which an ingress message is valid. - // The default is set to 1 minute. + // The default is set to 5 minutes. IngressExpiry time.Duration // ClientConfig is the configuration for the underlying Client. ClientConfig *ClientConfig diff --git a/call.go b/call.go index 6d4ab34..7e8c4b0 100644 --- a/call.go +++ b/call.go @@ -1,18 +1,41 @@ package agent import ( - "github.com/aviate-labs/agent-go/candid/idl" "github.com/aviate-labs/agent-go/principal" "google.golang.org/protobuf/proto" ) +// Call calls a method on a canister, it does not wait for the result. +func (c APIRequest[_, _]) Call() error { + c.a.logger.Printf("[AGENT] CALL %s %s (%x)", c.effectiveCanisterID, c.methodName, c.requestID) + _, err := c.a.call(c.effectiveCanisterID, c.data) + return err +} + +// CallAndWait calls a method on a canister and waits for the result. +func (c APIRequest[_, Out]) CallAndWait(out Out) error { + if err := c.Call(); err != nil { + return err + } + return c.Wait(out) +} + +// Wait waits for the result of the Call and unmarshals it into the given values. +func (c APIRequest[_, Out]) Wait(out Out) error { + raw, err := c.a.poll(c.effectiveCanisterID, c.requestID) + if err != nil { + return err + } + return c.unmarshal(raw, out) +} + // Call calls a method on a canister and unmarshals the result into the given values. -func (a Agent) Call(canisterID principal.Principal, methodName string, args []any, values []any) error { - call, err := a.CreateCall(canisterID, methodName, args...) +func (a Agent) Call(canisterID principal.Principal, methodName string, in []any, out []any) error { + call, err := a.CreateCandidAPIRequest(RequestTypeCall, canisterID, methodName, in...) if err != nil { return err } - return call.CallAndWait(values...) + return call.CallAndWait(out) } // CallProto calls a method on a canister and unmarshals the result into the given proto message. @@ -41,77 +64,3 @@ func (a Agent) CallProto(canisterID principal.Principal, methodName string, in, } return proto.Unmarshal(raw, out) } - -// CreateCall creates a new Call to the given canister and method. -func (a *Agent) CreateCall(canisterID principal.Principal, methodName string, args ...any) (*Call, error) { - rawArgs, err := idl.Marshal(args) - if err != nil { - return nil, err - } - if len(args) == 0 { - // Default to the empty Candid argument list. - rawArgs = []byte{'D', 'I', 'D', 'L', 0, 0} - } - nonce, err := newNonce() - if err != nil { - return nil, err - } - requestID, data, err := a.sign(Request{ - Type: RequestTypeCall, - Sender: a.Sender(), - CanisterID: canisterID, - MethodName: methodName, - Arguments: rawArgs, - IngressExpiry: a.expiryDate(), - Nonce: nonce, - }) - if err != nil { - return nil, err - } - return &Call{ - a: a, - methodName: methodName, - effectiveCanisterID: effectiveCanisterID(canisterID, args), - requestID: *requestID, - data: data, - }, nil -} - -// Call is an intermediate representation of a Call to a canister. -type Call struct { - a *Agent - methodName string - effectiveCanisterID principal.Principal - requestID RequestID - data []byte -} - -// Call calls a method on a canister, it does not wait for the result. -func (c Call) Call() error { - c.a.logger.Printf("[AGENT] CALL %s %s (%x)", c.effectiveCanisterID, c.methodName, c.requestID) - _, err := c.a.call(c.effectiveCanisterID, c.data) - return err -} - -// CallAndWait calls a method on a canister and waits for the result. -func (c Call) CallAndWait(values ...any) error { - if err := c.Call(); err != nil { - return err - } - return c.Wait(values...) -} - -// Wait waits for the result of the Call and unmarshals it into the given values. -func (c Call) Wait(values ...any) error { - raw, err := c.a.poll(c.effectiveCanisterID, c.requestID) - if err != nil { - return err - } - return idl.Unmarshal(raw, values) -} - -// WithEffectiveCanisterID sets the effective canister ID for the Call. -func (c *Call) WithEffectiveCanisterID(canisterID principal.Principal) *Call { - c.effectiveCanisterID = canisterID - return c -} diff --git a/client.go b/client.go index b45e57b..ffedc4b 100644 --- a/client.go +++ b/client.go @@ -2,6 +2,7 @@ package agent import ( "bytes" + "context" "fmt" "io" "net/http" @@ -40,10 +41,14 @@ func NewClientWithLogger(cfg ClientConfig, logger Logger) Client { } } -func (c Client) Call(canisterID principal.Principal, data []byte) ([]byte, error) { +func (c Client) Call(ctx context.Context, canisterID principal.Principal, data []byte) ([]byte, error) { u := c.url(fmt.Sprintf("/api/v2/canister/%s/call", canisterID.Encode())) c.logger.Printf("[CLIENT] CALL %s", u) - resp, err := c.client.Post(u, "application/cbor", bytes.NewBuffer(data)) + req, err := c.newRequest(ctx, "POST", u, bytes.NewBuffer(data)) + if err != nil { + return nil, err + } + resp, err := c.client.Do(req) if err != nil { return nil, err } @@ -63,16 +68,16 @@ func (c Client) Call(canisterID principal.Principal, data []byte) ([]byte, error } } -func (c Client) Query(canisterID principal.Principal, data []byte) ([]byte, error) { - return c.post("query", canisterID, data) +func (c Client) Query(ctx context.Context, canisterID principal.Principal, data []byte) ([]byte, error) { + return c.post(ctx, "query", canisterID, data) } -func (c Client) ReadState(canisterID principal.Principal, data []byte) ([]byte, error) { - return c.post("read_state", canisterID, data) +func (c Client) ReadState(ctx context.Context, canisterID principal.Principal, data []byte) ([]byte, error) { + return c.post(ctx, "read_state", canisterID, data) } -func (c Client) ReadSubnetState(subnetID principal.Principal, data []byte) ([]byte, error) { - return c.postSubnet("read_state", subnetID, data) +func (c Client) ReadSubnetState(ctx context.Context, subnetID principal.Principal, data []byte) ([]byte, error) { + return c.postSubnet(ctx, "read_state", subnetID, data) } // Status returns the status of the IC. @@ -94,10 +99,23 @@ func (c Client) get(path string) ([]byte, error) { return io.ReadAll(resp.Body) } -func (c Client) post(path string, canisterID principal.Principal, data []byte) ([]byte, error) { +func (c Client) newRequest(ctx context.Context, method, url string, body io.Reader) (*http.Request, error) { + req, err := http.NewRequestWithContext(ctx, method, url, body) + if err != nil { + return nil, err + } + req.Header.Set("Content-Type", "application/cbor") + return req, nil +} + +func (c Client) post(ctx context.Context, path string, canisterID principal.Principal, data []byte) ([]byte, error) { u := c.url(fmt.Sprintf("/api/v2/canister/%s/%s", canisterID.Encode(), path)) c.logger.Printf("[CLIENT] POST %s", u) - resp, err := c.client.Post(u, "application/cbor", bytes.NewBuffer(data)) + req, err := c.newRequest(ctx, "POST", u, bytes.NewBuffer(data)) + if err != nil { + return nil, err + } + resp, err := c.client.Do(req) if err != nil { return nil, err } @@ -110,10 +128,14 @@ func (c Client) post(path string, canisterID principal.Principal, data []byte) ( } } -func (c Client) postSubnet(path string, subnetID principal.Principal, data []byte) ([]byte, error) { +func (c Client) postSubnet(ctx context.Context, path string, subnetID principal.Principal, data []byte) ([]byte, error) { u := c.url(fmt.Sprintf("/api/v2/subnet/%s/%s", subnetID.Encode(), path)) c.logger.Printf("[CLIENT] POST %s", u) - resp, err := c.client.Post(u, "application/cbor", bytes.NewBuffer(data)) + req, err := c.newRequest(ctx, "POST", u, bytes.NewBuffer(data)) + if err != nil { + return nil, err + } + resp, err := c.client.Do(req) if err != nil { return nil, err } diff --git a/clients/ledger/client.go b/clients/ledger/client.go new file mode 100644 index 0000000..d190348 --- /dev/null +++ b/clients/ledger/client.go @@ -0,0 +1 @@ +package ledger diff --git a/registry/README.md b/clients/registry/README.md similarity index 100% rename from registry/README.md rename to clients/registry/README.md diff --git a/registry/client.go b/clients/registry/client.go similarity index 99% rename from registry/client.go rename to clients/registry/client.go index c2591b5..f81dfe2 100644 --- a/registry/client.go +++ b/clients/registry/client.go @@ -3,8 +3,8 @@ package registry import ( "fmt" "github.com/aviate-labs/agent-go/certification" + v1 "github.com/aviate-labs/agent-go/clients/registry/proto/v1" "github.com/aviate-labs/agent-go/principal" - v1 "github.com/aviate-labs/agent-go/registry/proto/v1" "google.golang.org/protobuf/proto" "strings" ) diff --git a/registry/client_test.go b/clients/registry/client_test.go similarity index 91% rename from registry/client_test.go rename to clients/registry/client_test.go index 61c0129..f2c3685 100644 --- a/registry/client_test.go +++ b/clients/registry/client_test.go @@ -1,7 +1,7 @@ package registry_test import ( - "github.com/aviate-labs/agent-go/registry" + "github.com/aviate-labs/agent-go/clients/registry" "os" "testing" ) diff --git a/registry/dataprovider.go b/clients/registry/dataprovider.go similarity index 98% rename from registry/dataprovider.go rename to clients/registry/dataprovider.go index 2a01c4a..89eb96e 100644 --- a/registry/dataprovider.go +++ b/clients/registry/dataprovider.go @@ -7,8 +7,8 @@ import ( "github.com/aviate-labs/agent-go" "github.com/aviate-labs/agent-go/certification" "github.com/aviate-labs/agent-go/certification/hashtree" + "github.com/aviate-labs/agent-go/clients/registry/proto/v1" "github.com/aviate-labs/agent-go/ic" - "github.com/aviate-labs/agent-go/registry/proto/v1" "github.com/aviate-labs/leb128" "github.com/fxamacker/cbor/v2" "google.golang.org/protobuf/proto" diff --git a/registry/dataprovider_test.go b/clients/registry/dataprovider_test.go similarity index 83% rename from registry/dataprovider_test.go rename to clients/registry/dataprovider_test.go index 98031e5..2a4da23 100644 --- a/registry/dataprovider_test.go +++ b/clients/registry/dataprovider_test.go @@ -1,7 +1,7 @@ package registry_test import ( - "github.com/aviate-labs/agent-go/registry" + "github.com/aviate-labs/agent-go/clients/registry" "testing" ) diff --git a/registry/hashtree.go b/clients/registry/hashtree.go similarity index 94% rename from registry/hashtree.go rename to clients/registry/hashtree.go index cc2337e..84ac231 100644 --- a/registry/hashtree.go +++ b/clients/registry/hashtree.go @@ -3,7 +3,7 @@ package registry import ( "fmt" "github.com/aviate-labs/agent-go/certification/hashtree" - v1 "github.com/aviate-labs/agent-go/registry/proto/v1" + v1 "github.com/aviate-labs/agent-go/clients/registry/proto/v1" ) func NewHashTree(tree *v1.MixedHashTree) (*hashtree.HashTree, error) { diff --git a/registry/proto.go b/clients/registry/proto.go similarity index 100% rename from registry/proto.go rename to clients/registry/proto.go diff --git a/registry/proto/v1/local.pb.go b/clients/registry/proto/v1/local.pb.go similarity index 97% rename from registry/proto/v1/local.pb.go rename to clients/registry/proto/v1/local.pb.go index 5de8427..db16176 100644 --- a/registry/proto/v1/local.pb.go +++ b/clients/registry/proto/v1/local.pb.go @@ -2,8 +2,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.1 -// protoc v5.26.1 +// protoc-gen-go v1.34.2 +// protoc v5.27.0 // source: local.proto package v1 @@ -56,7 +56,7 @@ var file_local_proto_depIdxs = []int32{ var file_local_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_local_proto_goTypes = []interface{}{ +var file_local_proto_goTypes = []any{ (MutationType)(0), // 0: ic_registry_common.pb.local_store.v1.MutationType (*ChangelogEntry)(nil), // 1: ic_registry_common.pb.local_store.v1.ChangelogEntry (*KeyMutation)(nil), // 2: ic_registry_common.pb.local_store.v1.KeyMutation @@ -375,7 +375,7 @@ func file_local_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_local_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_local_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*ChangelogEntry); i { case 0: return &v.state @@ -387,7 +387,7 @@ func file_local_proto_init() { return nil } } - file_local_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_local_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*KeyMutation); i { case 0: return &v.state @@ -399,7 +399,7 @@ func file_local_proto_init() { return nil } } - file_local_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_local_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*CertifiedTime); i { case 0: return &v.state @@ -411,7 +411,7 @@ func file_local_proto_init() { return nil } } - file_local_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_local_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*Delta); i { case 0: return &v.state diff --git a/registry/proto/v1/node.pb.go b/clients/registry/proto/v1/node.pb.go similarity index 97% rename from registry/proto/v1/node.pb.go rename to clients/registry/proto/v1/node.pb.go index 0d9fc22..c7bbc1f 100644 --- a/registry/proto/v1/node.pb.go +++ b/clients/registry/proto/v1/node.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.1 -// protoc v5.26.1 +// protoc-gen-go v1.34.2 +// protoc v5.27.0 // source: node.proto package v1 @@ -38,7 +38,7 @@ var file_node_proto_depIdxs = []int32{ 0, // [0:3] is the sub-list for field type_name } -var file_node_proto_goTypes = []interface{}{ +var file_node_proto_goTypes = []any{ (*ConnectionEndpoint)(nil), // 0: registry.node.v1.ConnectionEndpoint (*IPv4InterfaceConfig)(nil), // 1: registry.node.v1.IPv4InterfaceConfig (*NodeRecord)(nil), // 2: registry.node.v1.NodeRecord @@ -115,7 +115,7 @@ func file_node_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_node_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_node_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*ConnectionEndpoint); i { case 0: return &v.state @@ -127,7 +127,7 @@ func file_node_proto_init() { return nil } } - file_node_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_node_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*IPv4InterfaceConfig); i { case 0: return &v.state @@ -139,7 +139,7 @@ func file_node_proto_init() { return nil } } - file_node_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_node_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*NodeRecord); i { case 0: return &v.state @@ -152,7 +152,7 @@ func file_node_proto_init() { } } } - file_node_proto_msgTypes[2].OneofWrappers = []interface{}{} + file_node_proto_msgTypes[2].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ @@ -180,8 +180,6 @@ func file_node_proto_rawDescGZIP() []byte { return file_node_proto_rawDescData } -func init() { file_node_proto_init() } - // A connection endpoint. type ConnectionEndpoint struct { state protoimpl.MessageState @@ -384,6 +382,7 @@ func (x *NodeRecord) GetXnet() *ConnectionEndpoint { } return nil } + func (*NodeRecord) ProtoMessage() {} func (x *NodeRecord) ProtoReflect() protoreflect.Message { mi := &file_node_proto_msgTypes[2] @@ -396,7 +395,6 @@ func (x *NodeRecord) ProtoReflect() protoreflect.Message { } return mi.MessageOf(x) } - func (x *NodeRecord) Reset() { *x = NodeRecord{} if protoimpl.UnsafeEnabled { @@ -405,6 +403,8 @@ func (x *NodeRecord) Reset() { ms.StoreMessageInfo(mi) } } + func (x *NodeRecord) String() string { return protoimpl.X.MessageStringOf(x) } +func init() { file_node_proto_init() } diff --git a/registry/proto/v1/operator.pb.go b/clients/registry/proto/v1/operator.pb.go similarity index 97% rename from registry/proto/v1/operator.pb.go rename to clients/registry/proto/v1/operator.pb.go index 13a63a9..0a3e7aa 100644 --- a/registry/proto/v1/operator.pb.go +++ b/clients/registry/proto/v1/operator.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.1 -// protoc v5.26.1 +// protoc-gen-go v1.34.2 +// protoc v5.27.0 // source: operator.proto package v1 @@ -36,7 +36,7 @@ var file_operator_proto_depIdxs = []int32{ 0, // [0:1] is the sub-list for field type_name } -var file_operator_proto_goTypes = []interface{}{ +var file_operator_proto_goTypes = []any{ (*NodeOperatorRecord)(nil), // 0: registry.node_operator.v1.NodeOperatorRecord (*RemoveNodeOperatorsPayload)(nil), // 1: registry.node_operator.v1.RemoveNodeOperatorsPayload nil, // 2: registry.node_operator.v1.NodeOperatorRecord.RewardableNodesEntry @@ -244,7 +244,7 @@ func file_operator_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_operator_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_operator_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*NodeOperatorRecord); i { case 0: return &v.state @@ -256,7 +256,7 @@ func file_operator_proto_init() { return nil } } - file_operator_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_operator_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*RemoveNodeOperatorsPayload); i { case 0: return &v.state @@ -269,7 +269,7 @@ func file_operator_proto_init() { } } } - file_operator_proto_msgTypes[0].OneofWrappers = []interface{}{} + file_operator_proto_msgTypes[0].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/registry/proto/v1/registry.pb.go b/clients/registry/proto/v1/registry.pb.go similarity index 98% rename from registry/proto/v1/registry.pb.go rename to clients/registry/proto/v1/registry.pb.go index 08380d2..161fe61 100644 --- a/registry/proto/v1/registry.pb.go +++ b/clients/registry/proto/v1/registry.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.1 -// protoc v5.26.1 +// protoc-gen-go v1.34.2 +// protoc v5.27.0 // source: registry.proto package v1 @@ -38,7 +38,7 @@ var file_registry_proto_depIdxs = []int32{ 0, // [0:2] is the sub-list for field type_name } -var file_registry_proto_goTypes = []interface{}{ +var file_registry_proto_goTypes = []any{ (*ProtoRegistry)(nil), // 0: ic_registry_common.pb.proto_registry.v1.ProtoRegistry (*ProtoRegistryRecord)(nil), // 1: ic_registry_common.pb.proto_registry.v1.ProtoRegistryRecord (*wrapperspb.BytesValue)(nil), // 2: google.protobuf.BytesValue diff --git a/registry/proto/v1/subnet.pb.go b/clients/registry/proto/v1/subnet.pb.go similarity index 98% rename from registry/proto/v1/subnet.pb.go rename to clients/registry/proto/v1/subnet.pb.go index 0b67deb..428ca37 100644 --- a/registry/proto/v1/subnet.pb.go +++ b/clients/registry/proto/v1/subnet.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.1 -// protoc v5.26.1 +// protoc-gen-go v1.34.2 +// protoc v5.27.0 // source: subnet.proto package v1 @@ -214,7 +214,7 @@ var file_subnet_proto_depIdxs = []int32{ var file_subnet_proto_enumTypes = make([]protoimpl.EnumInfo, 6) -var file_subnet_proto_goTypes = []interface{}{ +var file_subnet_proto_goTypes = []any{ (EcdsaCurve)(0), // 0: registry.subnet.v1.EcdsaCurve (NiDkgTag)(0), // 1: registry.subnet.v1.NiDkgTag (AlgorithmId)(0), // 2: registry.subnet.v1.AlgorithmId @@ -3414,7 +3414,7 @@ func file_subnet_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_subnet_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_subnet_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*SubnetRecord); i { case 0: return &v.state @@ -3426,7 +3426,7 @@ func file_subnet_proto_init() { return nil } } - file_subnet_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_subnet_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*EcdsaKeyId); i { case 0: return &v.state @@ -3438,7 +3438,7 @@ func file_subnet_proto_init() { return nil } } - file_subnet_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_subnet_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*EcdsaInitialization); i { case 0: return &v.state @@ -3450,7 +3450,7 @@ func file_subnet_proto_init() { return nil } } - file_subnet_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_subnet_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*CatchUpPackageContents); i { case 0: return &v.state @@ -3462,7 +3462,7 @@ func file_subnet_proto_init() { return nil } } - file_subnet_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_subnet_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*RegistryStoreUri); i { case 0: return &v.state @@ -3474,7 +3474,7 @@ func file_subnet_proto_init() { return nil } } - file_subnet_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_subnet_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*SubnetListRecord); i { case 0: return &v.state @@ -3486,7 +3486,7 @@ func file_subnet_proto_init() { return nil } } - file_subnet_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_subnet_proto_msgTypes[6].Exporter = func(v any, i int) any { switch v := v.(*NiDkgId); i { case 0: return &v.state @@ -3498,7 +3498,7 @@ func file_subnet_proto_init() { return nil } } - file_subnet_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_subnet_proto_msgTypes[7].Exporter = func(v any, i int) any { switch v := v.(*InitialNiDkgTranscriptRecord); i { case 0: return &v.state @@ -3510,7 +3510,7 @@ func file_subnet_proto_init() { return nil } } - file_subnet_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_subnet_proto_msgTypes[8].Exporter = func(v any, i int) any { switch v := v.(*PrincipalId); i { case 0: return &v.state @@ -3522,7 +3522,7 @@ func file_subnet_proto_init() { return nil } } - file_subnet_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + file_subnet_proto_msgTypes[9].Exporter = func(v any, i int) any { switch v := v.(*SubnetId); i { case 0: return &v.state @@ -3534,7 +3534,7 @@ func file_subnet_proto_init() { return nil } } - file_subnet_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + file_subnet_proto_msgTypes[10].Exporter = func(v any, i int) any { switch v := v.(*IDkgTranscriptId); i { case 0: return &v.state @@ -3546,7 +3546,7 @@ func file_subnet_proto_init() { return nil } } - file_subnet_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + file_subnet_proto_msgTypes[11].Exporter = func(v any, i int) any { switch v := v.(*VerifiedIDkgDealing); i { case 0: return &v.state @@ -3558,7 +3558,7 @@ func file_subnet_proto_init() { return nil } } - file_subnet_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + file_subnet_proto_msgTypes[12].Exporter = func(v any, i int) any { switch v := v.(*NodeId); i { case 0: return &v.state @@ -3570,7 +3570,7 @@ func file_subnet_proto_init() { return nil } } - file_subnet_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + file_subnet_proto_msgTypes[13].Exporter = func(v any, i int) any { switch v := v.(*PublicKey); i { case 0: return &v.state @@ -3582,7 +3582,7 @@ func file_subnet_proto_init() { return nil } } - file_subnet_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + file_subnet_proto_msgTypes[14].Exporter = func(v any, i int) any { switch v := v.(*IDkgTranscript); i { case 0: return &v.state @@ -3594,7 +3594,7 @@ func file_subnet_proto_init() { return nil } } - file_subnet_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + file_subnet_proto_msgTypes[15].Exporter = func(v any, i int) any { switch v := v.(*DealerTuple); i { case 0: return &v.state @@ -3606,7 +3606,7 @@ func file_subnet_proto_init() { return nil } } - file_subnet_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + file_subnet_proto_msgTypes[16].Exporter = func(v any, i int) any { switch v := v.(*SignatureTuple); i { case 0: return &v.state @@ -3618,7 +3618,7 @@ func file_subnet_proto_init() { return nil } } - file_subnet_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + file_subnet_proto_msgTypes[17].Exporter = func(v any, i int) any { switch v := v.(*IDkgTranscriptParams); i { case 0: return &v.state @@ -3630,7 +3630,7 @@ func file_subnet_proto_init() { return nil } } - file_subnet_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + file_subnet_proto_msgTypes[18].Exporter = func(v any, i int) any { switch v := v.(*IDkgDealing); i { case 0: return &v.state @@ -3642,7 +3642,7 @@ func file_subnet_proto_init() { return nil } } - file_subnet_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + file_subnet_proto_msgTypes[19].Exporter = func(v any, i int) any { switch v := v.(*IDkgSignedDealingTuple); i { case 0: return &v.state @@ -3654,7 +3654,7 @@ func file_subnet_proto_init() { return nil } } - file_subnet_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + file_subnet_proto_msgTypes[20].Exporter = func(v any, i int) any { switch v := v.(*InitialIDkgDealings); i { case 0: return &v.state @@ -3666,7 +3666,7 @@ func file_subnet_proto_init() { return nil } } - file_subnet_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + file_subnet_proto_msgTypes[21].Exporter = func(v any, i int) any { switch v := v.(*IDkgComplaint); i { case 0: return &v.state @@ -3678,7 +3678,7 @@ func file_subnet_proto_init() { return nil } } - file_subnet_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + file_subnet_proto_msgTypes[22].Exporter = func(v any, i int) any { switch v := v.(*IDkgOpening); i { case 0: return &v.state @@ -3690,7 +3690,7 @@ func file_subnet_proto_init() { return nil } } - file_subnet_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + file_subnet_proto_msgTypes[23].Exporter = func(v any, i int) any { switch v := v.(*ExtendedDerivationPath); i { case 0: return &v.state @@ -3702,7 +3702,7 @@ func file_subnet_proto_init() { return nil } } - file_subnet_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + file_subnet_proto_msgTypes[24].Exporter = func(v any, i int) any { switch v := v.(*GossipConfig); i { case 0: return &v.state @@ -3714,7 +3714,7 @@ func file_subnet_proto_init() { return nil } } - file_subnet_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + file_subnet_proto_msgTypes[25].Exporter = func(v any, i int) any { switch v := v.(*SubnetFeatures); i { case 0: return &v.state @@ -3726,7 +3726,7 @@ func file_subnet_proto_init() { return nil } } - file_subnet_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { + file_subnet_proto_msgTypes[26].Exporter = func(v any, i int) any { switch v := v.(*EcdsaConfig); i { case 0: return &v.state @@ -3738,7 +3738,7 @@ func file_subnet_proto_init() { return nil } } - file_subnet_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { + file_subnet_proto_msgTypes[27].Exporter = func(v any, i int) any { switch v := v.(*SchnorrKeyId); i { case 0: return &v.state @@ -3750,7 +3750,7 @@ func file_subnet_proto_init() { return nil } } - file_subnet_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { + file_subnet_proto_msgTypes[28].Exporter = func(v any, i int) any { switch v := v.(*MasterPublicKeyId); i { case 0: return &v.state @@ -3762,7 +3762,7 @@ func file_subnet_proto_init() { return nil } } - file_subnet_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { + file_subnet_proto_msgTypes[29].Exporter = func(v any, i int) any { switch v := v.(*KeyConfig); i { case 0: return &v.state @@ -3774,7 +3774,7 @@ func file_subnet_proto_init() { return nil } } - file_subnet_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { + file_subnet_proto_msgTypes[30].Exporter = func(v any, i int) any { switch v := v.(*ChainKeyConfig); i { case 0: return &v.state @@ -3787,15 +3787,15 @@ func file_subnet_proto_init() { } } } - file_subnet_proto_msgTypes[0].OneofWrappers = []interface{}{} - file_subnet_proto_msgTypes[25].OneofWrappers = []interface{}{} - file_subnet_proto_msgTypes[26].OneofWrappers = []interface{}{} - file_subnet_proto_msgTypes[28].OneofWrappers = []interface{}{ + 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 = []interface{}{} - file_subnet_proto_msgTypes[30].OneofWrappers = []interface{}{} + file_subnet_proto_msgTypes[29].OneofWrappers = []any{} + file_subnet_proto_msgTypes[30].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/registry/proto/v1/transport.pb.go b/clients/registry/proto/v1/transport.pb.go similarity index 97% rename from registry/proto/v1/transport.pb.go rename to clients/registry/proto/v1/transport.pb.go index 26c43d9..19f902a 100644 --- a/registry/proto/v1/transport.pb.go +++ b/clients/registry/proto/v1/transport.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.1 -// protoc v5.26.1 +// protoc-gen-go v1.34.2 +// protoc v5.27.0 // source: transport.proto // Set of messages used to interact with the registry canister. @@ -117,7 +117,7 @@ var file_transport_proto_depIdxs = []int32{ var file_transport_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_transport_proto_goTypes = []interface{}{ +var file_transport_proto_goTypes = []any{ (RegistryError_Code)(0), // 0: ic_registry_transport.pb.v1.RegistryError.Code (RegistryMutation_Type)(0), // 1: ic_registry_transport.pb.v1.RegistryMutation.Type (*RegistryError)(nil), // 2: ic_registry_transport.pb.v1.RegistryError @@ -305,7 +305,7 @@ func file_transport_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_transport_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_transport_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*RegistryError); i { case 0: return &v.state @@ -317,7 +317,7 @@ func file_transport_proto_init() { return nil } } - file_transport_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_transport_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*RegistryValue); i { case 0: return &v.state @@ -329,7 +329,7 @@ func file_transport_proto_init() { return nil } } - file_transport_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_transport_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*RegistryDelta); i { case 0: return &v.state @@ -341,7 +341,7 @@ func file_transport_proto_init() { return nil } } - file_transport_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_transport_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*RegistryGetChangesSinceRequest); i { case 0: return &v.state @@ -353,7 +353,7 @@ func file_transport_proto_init() { return nil } } - file_transport_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_transport_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*RegistryGetChangesSinceResponse); i { case 0: return &v.state @@ -365,7 +365,7 @@ func file_transport_proto_init() { return nil } } - file_transport_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_transport_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*RegistryGetValueRequest); i { case 0: return &v.state @@ -377,7 +377,7 @@ func file_transport_proto_init() { return nil } } - file_transport_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_transport_proto_msgTypes[6].Exporter = func(v any, i int) any { switch v := v.(*RegistryGetValueResponse); i { case 0: return &v.state @@ -389,7 +389,7 @@ func file_transport_proto_init() { return nil } } - file_transport_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_transport_proto_msgTypes[7].Exporter = func(v any, i int) any { switch v := v.(*RegistryGetLatestVersionResponse); i { case 0: return &v.state @@ -401,7 +401,7 @@ func file_transport_proto_init() { return nil } } - file_transport_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_transport_proto_msgTypes[8].Exporter = func(v any, i int) any { switch v := v.(*RegistryMutation); i { case 0: return &v.state @@ -413,7 +413,7 @@ func file_transport_proto_init() { return nil } } - file_transport_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + file_transport_proto_msgTypes[9].Exporter = func(v any, i int) any { switch v := v.(*Precondition); i { case 0: return &v.state @@ -425,7 +425,7 @@ func file_transport_proto_init() { return nil } } - file_transport_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + file_transport_proto_msgTypes[10].Exporter = func(v any, i int) any { switch v := v.(*RegistryAtomicMutateRequest); i { case 0: return &v.state @@ -437,7 +437,7 @@ func file_transport_proto_init() { return nil } } - file_transport_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + file_transport_proto_msgTypes[11].Exporter = func(v any, i int) any { switch v := v.(*RegistryAtomicMutateResponse); i { case 0: return &v.state @@ -449,7 +449,7 @@ func file_transport_proto_init() { return nil } } - file_transport_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + file_transport_proto_msgTypes[12].Exporter = func(v any, i int) any { switch v := v.(*MixedHashTree); i { case 0: return &v.state @@ -461,7 +461,7 @@ func file_transport_proto_init() { return nil } } - file_transport_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + file_transport_proto_msgTypes[13].Exporter = func(v any, i int) any { switch v := v.(*CertifiedResponse); i { case 0: return &v.state @@ -473,7 +473,7 @@ func file_transport_proto_init() { return nil } } - file_transport_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + file_transport_proto_msgTypes[14].Exporter = func(v any, i int) any { switch v := v.(*MixedHashTree_Fork); i { case 0: return &v.state @@ -485,7 +485,7 @@ func file_transport_proto_init() { return nil } } - file_transport_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + file_transport_proto_msgTypes[15].Exporter = func(v any, i int) any { switch v := v.(*MixedHashTree_Labeled); i { case 0: return &v.state @@ -498,7 +498,7 @@ func file_transport_proto_init() { } } } - file_transport_proto_msgTypes[12].OneofWrappers = []interface{}{ + file_transport_proto_msgTypes[12].OneofWrappers = []any{ (*MixedHashTree_Empty)(nil), (*MixedHashTree_Fork_)(nil), (*MixedHashTree_Labeled_)(nil), diff --git a/registry/testdata/local.proto b/clients/registry/testdata/local.proto similarity index 100% rename from registry/testdata/local.proto rename to clients/registry/testdata/local.proto diff --git a/registry/testdata/node.proto b/clients/registry/testdata/node.proto similarity index 100% rename from registry/testdata/node.proto rename to clients/registry/testdata/node.proto diff --git a/registry/testdata/operator.proto b/clients/registry/testdata/operator.proto similarity index 100% rename from registry/testdata/operator.proto rename to clients/registry/testdata/operator.proto diff --git a/registry/testdata/registry.proto b/clients/registry/testdata/registry.proto similarity index 100% rename from registry/testdata/registry.proto rename to clients/registry/testdata/registry.proto diff --git a/registry/testdata/subnet.proto b/clients/registry/testdata/subnet.proto similarity index 100% rename from registry/testdata/subnet.proto rename to clients/registry/testdata/subnet.proto diff --git a/registry/testdata/transport.proto b/clients/registry/testdata/transport.proto similarity index 100% rename from registry/testdata/transport.proto rename to clients/registry/testdata/transport.proto diff --git a/gen/templates/agent_indirect.gotmpl b/gen/templates/agent_indirect.gotmpl index 5f5a9a2..cc4c63d 100644 --- a/gen/templates/agent_indirect.gotmpl +++ b/gen/templates/agent_indirect.gotmpl @@ -49,8 +49,9 @@ func (a {{ $.AgentName }}Agent) {{ .Name }}({{ range $i, $e := .ArgumentTypes }} } // {{ .Name }}{{ .Type }} creates an indirect representation of the "{{ .RawName }}" method on the "{{ $.CanisterName }}" canister. -func (a {{ $.AgentName }}Agent) {{ .Name }}{{ .Type }}({{ range $i, $e := .ArgumentTypes }}{{ if $i }}, {{ end }}{{ $e.Name }} {{ $e.Type }}{{ end }}) (*agent.{{ .Type }},error) { - return a.Agent.Create{{ .Type }}( +func (a {{ $.AgentName }}Agent) {{ .Name }}{{ .Type }}({{ range $i, $e := .ArgumentTypes }}{{ if $i }}, {{ end }}{{ $e.Name }} {{ $e.Type }}{{ end }}) (*agent.CandidAPIRequest, error) { + return a.Agent.CreateCandidAPIRequest( + agent.RequestType{{ .Type }}, a.CanisterId, "{{ .RawName }}",{{ range $i, $e := .ArgumentTypes }} {{ $e.Name }},{{ end }} diff --git a/ic/ic/agent.go b/ic/ic/agent.go index 563ed56..3ef4537 100755 --- a/ic/ic/agent.go +++ b/ic/ic/agent.go @@ -41,8 +41,9 @@ func (a Agent) BitcoinGetBalance(arg0 BitcoinGetBalanceArgs) (*BitcoinGetBalance } // BitcoinGetBalanceCall creates an indirect representation of the "bitcoin_get_balance" method on the "ic" canister. -func (a Agent) BitcoinGetBalanceCall(arg0 BitcoinGetBalanceArgs) (*agent.Call, error) { - return a.Agent.CreateCall( +func (a Agent) BitcoinGetBalanceCall(arg0 BitcoinGetBalanceArgs) (*agent.CandidAPIRequest, error) { + return a.Agent.CreateCandidAPIRequest( + agent.RequestTypeCall, a.CanisterId, "bitcoin_get_balance", arg0, @@ -64,8 +65,9 @@ func (a Agent) BitcoinGetBalanceQuery(arg0 BitcoinGetBalanceQueryArgs) (*Bitcoin } // BitcoinGetBalanceQueryQuery creates an indirect representation of the "bitcoin_get_balance_query" method on the "ic" canister. -func (a Agent) BitcoinGetBalanceQueryQuery(arg0 BitcoinGetBalanceQueryArgs) (*agent.Query, error) { - return a.Agent.CreateQuery( +func (a Agent) BitcoinGetBalanceQueryQuery(arg0 BitcoinGetBalanceQueryArgs) (*agent.CandidAPIRequest, error) { + return a.Agent.CreateCandidAPIRequest( + agent.RequestTypeQuery, a.CanisterId, "bitcoin_get_balance_query", arg0, @@ -87,8 +89,9 @@ func (a Agent) BitcoinGetCurrentFeePercentiles(arg0 BitcoinGetCurrentFeePercenti } // BitcoinGetCurrentFeePercentilesCall creates an indirect representation of the "bitcoin_get_current_fee_percentiles" method on the "ic" canister. -func (a Agent) BitcoinGetCurrentFeePercentilesCall(arg0 BitcoinGetCurrentFeePercentilesArgs) (*agent.Call, error) { - return a.Agent.CreateCall( +func (a Agent) BitcoinGetCurrentFeePercentilesCall(arg0 BitcoinGetCurrentFeePercentilesArgs) (*agent.CandidAPIRequest, error) { + return a.Agent.CreateCandidAPIRequest( + agent.RequestTypeCall, a.CanisterId, "bitcoin_get_current_fee_percentiles", arg0, @@ -110,8 +113,9 @@ func (a Agent) BitcoinGetUtxos(arg0 BitcoinGetUtxosArgs) (*BitcoinGetUtxosResult } // BitcoinGetUtxosCall creates an indirect representation of the "bitcoin_get_utxos" method on the "ic" canister. -func (a Agent) BitcoinGetUtxosCall(arg0 BitcoinGetUtxosArgs) (*agent.Call, error) { - return a.Agent.CreateCall( +func (a Agent) BitcoinGetUtxosCall(arg0 BitcoinGetUtxosArgs) (*agent.CandidAPIRequest, error) { + return a.Agent.CreateCandidAPIRequest( + agent.RequestTypeCall, a.CanisterId, "bitcoin_get_utxos", arg0, @@ -133,8 +137,9 @@ func (a Agent) BitcoinGetUtxosQuery(arg0 BitcoinGetUtxosQueryArgs) (*BitcoinGetU } // BitcoinGetUtxosQueryQuery creates an indirect representation of the "bitcoin_get_utxos_query" method on the "ic" canister. -func (a Agent) BitcoinGetUtxosQueryQuery(arg0 BitcoinGetUtxosQueryArgs) (*agent.Query, error) { - return a.Agent.CreateQuery( +func (a Agent) BitcoinGetUtxosQueryQuery(arg0 BitcoinGetUtxosQueryArgs) (*agent.CandidAPIRequest, error) { + return a.Agent.CreateCandidAPIRequest( + agent.RequestTypeQuery, a.CanisterId, "bitcoin_get_utxos_query", arg0, @@ -155,8 +160,9 @@ func (a Agent) BitcoinSendTransaction(arg0 BitcoinSendTransactionArgs) error { } // BitcoinSendTransactionCall creates an indirect representation of the "bitcoin_send_transaction" method on the "ic" canister. -func (a Agent) BitcoinSendTransactionCall(arg0 BitcoinSendTransactionArgs) (*agent.Call, error) { - return a.Agent.CreateCall( +func (a Agent) BitcoinSendTransactionCall(arg0 BitcoinSendTransactionArgs) (*agent.CandidAPIRequest, error) { + return a.Agent.CreateCandidAPIRequest( + agent.RequestTypeCall, a.CanisterId, "bitcoin_send_transaction", arg0, @@ -178,8 +184,9 @@ func (a Agent) CanisterInfo(arg0 CanisterInfoArgs) (*CanisterInfoResult, error) } // CanisterInfoCall creates an indirect representation of the "canister_info" method on the "ic" canister. -func (a Agent) CanisterInfoCall(arg0 CanisterInfoArgs) (*agent.Call, error) { - return a.Agent.CreateCall( +func (a Agent) CanisterInfoCall(arg0 CanisterInfoArgs) (*agent.CandidAPIRequest, error) { + return a.Agent.CreateCandidAPIRequest( + agent.RequestTypeCall, a.CanisterId, "canister_info", arg0, @@ -201,8 +208,9 @@ func (a Agent) CanisterStatus(arg0 CanisterStatusArgs) (*CanisterStatusResult, e } // CanisterStatusCall creates an indirect representation of the "canister_status" method on the "ic" canister. -func (a Agent) CanisterStatusCall(arg0 CanisterStatusArgs) (*agent.Call, error) { - return a.Agent.CreateCall( +func (a Agent) CanisterStatusCall(arg0 CanisterStatusArgs) (*agent.CandidAPIRequest, error) { + return a.Agent.CreateCandidAPIRequest( + agent.RequestTypeCall, a.CanisterId, "canister_status", arg0, @@ -223,8 +231,9 @@ func (a Agent) ClearChunkStore(arg0 ClearChunkStoreArgs) error { } // ClearChunkStoreCall creates an indirect representation of the "clear_chunk_store" method on the "ic" canister. -func (a Agent) ClearChunkStoreCall(arg0 ClearChunkStoreArgs) (*agent.Call, error) { - return a.Agent.CreateCall( +func (a Agent) ClearChunkStoreCall(arg0 ClearChunkStoreArgs) (*agent.CandidAPIRequest, error) { + return a.Agent.CreateCandidAPIRequest( + agent.RequestTypeCall, a.CanisterId, "clear_chunk_store", arg0, @@ -246,8 +255,9 @@ func (a Agent) CreateCanister(arg0 CreateCanisterArgs) (*CreateCanisterResult, e } // CreateCanisterCall creates an indirect representation of the "create_canister" method on the "ic" canister. -func (a Agent) CreateCanisterCall(arg0 CreateCanisterArgs) (*agent.Call, error) { - return a.Agent.CreateCall( +func (a Agent) CreateCanisterCall(arg0 CreateCanisterArgs) (*agent.CandidAPIRequest, error) { + return a.Agent.CreateCandidAPIRequest( + agent.RequestTypeCall, a.CanisterId, "create_canister", arg0, @@ -268,8 +278,9 @@ func (a Agent) DeleteCanister(arg0 DeleteCanisterArgs) error { } // DeleteCanisterCall creates an indirect representation of the "delete_canister" method on the "ic" canister. -func (a Agent) DeleteCanisterCall(arg0 DeleteCanisterArgs) (*agent.Call, error) { - return a.Agent.CreateCall( +func (a Agent) DeleteCanisterCall(arg0 DeleteCanisterArgs) (*agent.CandidAPIRequest, error) { + return a.Agent.CreateCandidAPIRequest( + agent.RequestTypeCall, a.CanisterId, "delete_canister", arg0, @@ -290,8 +301,9 @@ func (a Agent) DepositCycles(arg0 DepositCyclesArgs) error { } // DepositCyclesCall creates an indirect representation of the "deposit_cycles" method on the "ic" canister. -func (a Agent) DepositCyclesCall(arg0 DepositCyclesArgs) (*agent.Call, error) { - return a.Agent.CreateCall( +func (a Agent) DepositCyclesCall(arg0 DepositCyclesArgs) (*agent.CandidAPIRequest, error) { + return a.Agent.CreateCandidAPIRequest( + agent.RequestTypeCall, a.CanisterId, "deposit_cycles", arg0, @@ -313,8 +325,9 @@ func (a Agent) EcdsaPublicKey(arg0 EcdsaPublicKeyArgs) (*EcdsaPublicKeyResult, e } // EcdsaPublicKeyCall creates an indirect representation of the "ecdsa_public_key" method on the "ic" canister. -func (a Agent) EcdsaPublicKeyCall(arg0 EcdsaPublicKeyArgs) (*agent.Call, error) { - return a.Agent.CreateCall( +func (a Agent) EcdsaPublicKeyCall(arg0 EcdsaPublicKeyArgs) (*agent.CandidAPIRequest, error) { + return a.Agent.CreateCandidAPIRequest( + agent.RequestTypeCall, a.CanisterId, "ecdsa_public_key", arg0, @@ -336,8 +349,9 @@ func (a Agent) FetchCanisterLogs(arg0 FetchCanisterLogsArgs) (*FetchCanisterLogs } // FetchCanisterLogsQuery creates an indirect representation of the "fetch_canister_logs" method on the "ic" canister. -func (a Agent) FetchCanisterLogsQuery(arg0 FetchCanisterLogsArgs) (*agent.Query, error) { - return a.Agent.CreateQuery( +func (a Agent) FetchCanisterLogsQuery(arg0 FetchCanisterLogsArgs) (*agent.CandidAPIRequest, error) { + return a.Agent.CreateCandidAPIRequest( + agent.RequestTypeQuery, a.CanisterId, "fetch_canister_logs", arg0, @@ -359,8 +373,9 @@ func (a Agent) HttpRequest(arg0 HttpRequestArgs) (*HttpRequestResult, error) { } // HttpRequestCall creates an indirect representation of the "http_request" method on the "ic" canister. -func (a Agent) HttpRequestCall(arg0 HttpRequestArgs) (*agent.Call, error) { - return a.Agent.CreateCall( +func (a Agent) HttpRequestCall(arg0 HttpRequestArgs) (*agent.CandidAPIRequest, error) { + return a.Agent.CreateCandidAPIRequest( + agent.RequestTypeCall, a.CanisterId, "http_request", arg0, @@ -381,8 +396,9 @@ func (a Agent) InstallChunkedCode(arg0 InstallChunkedCodeArgs) error { } // InstallChunkedCodeCall creates an indirect representation of the "install_chunked_code" method on the "ic" canister. -func (a Agent) InstallChunkedCodeCall(arg0 InstallChunkedCodeArgs) (*agent.Call, error) { - return a.Agent.CreateCall( +func (a Agent) InstallChunkedCodeCall(arg0 InstallChunkedCodeArgs) (*agent.CandidAPIRequest, error) { + return a.Agent.CreateCandidAPIRequest( + agent.RequestTypeCall, a.CanisterId, "install_chunked_code", arg0, @@ -403,8 +419,9 @@ func (a Agent) InstallCode(arg0 InstallCodeArgs) error { } // InstallCodeCall creates an indirect representation of the "install_code" method on the "ic" canister. -func (a Agent) InstallCodeCall(arg0 InstallCodeArgs) (*agent.Call, error) { - return a.Agent.CreateCall( +func (a Agent) InstallCodeCall(arg0 InstallCodeArgs) (*agent.CandidAPIRequest, error) { + return a.Agent.CreateCandidAPIRequest( + agent.RequestTypeCall, a.CanisterId, "install_code", arg0, @@ -426,8 +443,9 @@ func (a Agent) NodeMetricsHistory(arg0 NodeMetricsHistoryArgs) (*NodeMetricsHist } // NodeMetricsHistoryCall creates an indirect representation of the "node_metrics_history" method on the "ic" canister. -func (a Agent) NodeMetricsHistoryCall(arg0 NodeMetricsHistoryArgs) (*agent.Call, error) { - return a.Agent.CreateCall( +func (a Agent) NodeMetricsHistoryCall(arg0 NodeMetricsHistoryArgs) (*agent.CandidAPIRequest, error) { + return a.Agent.CreateCandidAPIRequest( + agent.RequestTypeCall, a.CanisterId, "node_metrics_history", arg0, @@ -449,8 +467,9 @@ func (a Agent) ProvisionalCreateCanisterWithCycles(arg0 ProvisionalCreateCaniste } // ProvisionalCreateCanisterWithCyclesCall creates an indirect representation of the "provisional_create_canister_with_cycles" method on the "ic" canister. -func (a Agent) ProvisionalCreateCanisterWithCyclesCall(arg0 ProvisionalCreateCanisterWithCyclesArgs) (*agent.Call, error) { - return a.Agent.CreateCall( +func (a Agent) ProvisionalCreateCanisterWithCyclesCall(arg0 ProvisionalCreateCanisterWithCyclesArgs) (*agent.CandidAPIRequest, error) { + return a.Agent.CreateCandidAPIRequest( + agent.RequestTypeCall, a.CanisterId, "provisional_create_canister_with_cycles", arg0, @@ -471,8 +490,9 @@ func (a Agent) ProvisionalTopUpCanister(arg0 ProvisionalTopUpCanisterArgs) error } // ProvisionalTopUpCanisterCall creates an indirect representation of the "provisional_top_up_canister" method on the "ic" canister. -func (a Agent) ProvisionalTopUpCanisterCall(arg0 ProvisionalTopUpCanisterArgs) (*agent.Call, error) { - return a.Agent.CreateCall( +func (a Agent) ProvisionalTopUpCanisterCall(arg0 ProvisionalTopUpCanisterArgs) (*agent.CandidAPIRequest, error) { + return a.Agent.CreateCandidAPIRequest( + agent.RequestTypeCall, a.CanisterId, "provisional_top_up_canister", arg0, @@ -494,8 +514,9 @@ func (a Agent) RawRand() (*RawRandResult, error) { } // RawRandCall creates an indirect representation of the "raw_rand" method on the "ic" canister. -func (a Agent) RawRandCall() (*agent.Call, error) { - return a.Agent.CreateCall( +func (a Agent) RawRandCall() (*agent.CandidAPIRequest, error) { + return a.Agent.CreateCandidAPIRequest( + agent.RequestTypeCall, a.CanisterId, "raw_rand", ) @@ -516,8 +537,9 @@ func (a Agent) SignWithEcdsa(arg0 SignWithEcdsaArgs) (*SignWithEcdsaResult, erro } // SignWithEcdsaCall creates an indirect representation of the "sign_with_ecdsa" method on the "ic" canister. -func (a Agent) SignWithEcdsaCall(arg0 SignWithEcdsaArgs) (*agent.Call, error) { - return a.Agent.CreateCall( +func (a Agent) SignWithEcdsaCall(arg0 SignWithEcdsaArgs) (*agent.CandidAPIRequest, error) { + return a.Agent.CreateCandidAPIRequest( + agent.RequestTypeCall, a.CanisterId, "sign_with_ecdsa", arg0, @@ -538,8 +560,9 @@ func (a Agent) StartCanister(arg0 StartCanisterArgs) error { } // StartCanisterCall creates an indirect representation of the "start_canister" method on the "ic" canister. -func (a Agent) StartCanisterCall(arg0 StartCanisterArgs) (*agent.Call, error) { - return a.Agent.CreateCall( +func (a Agent) StartCanisterCall(arg0 StartCanisterArgs) (*agent.CandidAPIRequest, error) { + return a.Agent.CreateCandidAPIRequest( + agent.RequestTypeCall, a.CanisterId, "start_canister", arg0, @@ -560,8 +583,9 @@ func (a Agent) StopCanister(arg0 StopCanisterArgs) error { } // StopCanisterCall creates an indirect representation of the "stop_canister" method on the "ic" canister. -func (a Agent) StopCanisterCall(arg0 StopCanisterArgs) (*agent.Call, error) { - return a.Agent.CreateCall( +func (a Agent) StopCanisterCall(arg0 StopCanisterArgs) (*agent.CandidAPIRequest, error) { + return a.Agent.CreateCandidAPIRequest( + agent.RequestTypeCall, a.CanisterId, "stop_canister", arg0, @@ -583,8 +607,9 @@ func (a Agent) StoredChunks(arg0 StoredChunksArgs) (*StoredChunksResult, error) } // StoredChunksCall creates an indirect representation of the "stored_chunks" method on the "ic" canister. -func (a Agent) StoredChunksCall(arg0 StoredChunksArgs) (*agent.Call, error) { - return a.Agent.CreateCall( +func (a Agent) StoredChunksCall(arg0 StoredChunksArgs) (*agent.CandidAPIRequest, error) { + return a.Agent.CreateCandidAPIRequest( + agent.RequestTypeCall, a.CanisterId, "stored_chunks", arg0, @@ -605,8 +630,9 @@ func (a Agent) UninstallCode(arg0 UninstallCodeArgs) error { } // UninstallCodeCall creates an indirect representation of the "uninstall_code" method on the "ic" canister. -func (a Agent) UninstallCodeCall(arg0 UninstallCodeArgs) (*agent.Call, error) { - return a.Agent.CreateCall( +func (a Agent) UninstallCodeCall(arg0 UninstallCodeArgs) (*agent.CandidAPIRequest, error) { + return a.Agent.CreateCandidAPIRequest( + agent.RequestTypeCall, a.CanisterId, "uninstall_code", arg0, @@ -627,8 +653,9 @@ func (a Agent) UpdateSettings(arg0 UpdateSettingsArgs) error { } // UpdateSettingsCall creates an indirect representation of the "update_settings" method on the "ic" canister. -func (a Agent) UpdateSettingsCall(arg0 UpdateSettingsArgs) (*agent.Call, error) { - return a.Agent.CreateCall( +func (a Agent) UpdateSettingsCall(arg0 UpdateSettingsArgs) (*agent.CandidAPIRequest, error) { + return a.Agent.CreateCandidAPIRequest( + agent.RequestTypeCall, a.CanisterId, "update_settings", arg0, @@ -650,8 +677,9 @@ func (a Agent) UploadChunk(arg0 UploadChunkArgs) (*UploadChunkResult, error) { } // UploadChunkCall creates an indirect representation of the "upload_chunk" method on the "ic" canister. -func (a Agent) UploadChunkCall(arg0 UploadChunkArgs) (*agent.Call, error) { - return a.Agent.CreateCall( +func (a Agent) UploadChunkCall(arg0 UploadChunkArgs) (*agent.CandidAPIRequest, error) { + return a.Agent.CreateCandidAPIRequest( + agent.RequestTypeCall, a.CanisterId, "upload_chunk", arg0, @@ -765,6 +793,7 @@ type CanisterSettings struct { FreezingThreshold *idl.Nat `ic:"freezing_threshold,omitempty" json:"freezing_threshold,omitempty"` ReservedCyclesLimit *idl.Nat `ic:"reserved_cycles_limit,omitempty" json:"reserved_cycles_limit,omitempty"` LogVisibility *LogVisibility `ic:"log_visibility,omitempty" json:"log_visibility,omitempty"` + WasmMemoryLimit *idl.Nat `ic:"wasm_memory_limit,omitempty" json:"wasm_memory_limit,omitempty"` } type CanisterStatusArgs struct { @@ -850,6 +879,7 @@ type DefiniteCanisterSettings struct { FreezingThreshold idl.Nat `ic:"freezing_threshold" json:"freezing_threshold"` ReservedCyclesLimit idl.Nat `ic:"reserved_cycles_limit" json:"reserved_cycles_limit"` LogVisibility LogVisibility `ic:"log_visibility" json:"log_visibility"` + WasmMemoryLimit idl.Nat `ic:"wasm_memory_limit" json:"wasm_memory_limit"` } type DeleteCanisterArgs struct { diff --git a/ic/registry/agent.go b/ic/registry/agent.go index 8319f60..7592519 100755 --- a/ic/registry/agent.go +++ b/ic/registry/agent.go @@ -219,19 +219,6 @@ func (a Agent) CreateSubnet(arg0 CreateSubnetPayload) error { return nil } -// DeleteSubnet calls the "delete_subnet" method on the "registry" canister. -func (a Agent) DeleteSubnet(arg0 DeleteSubnetPayload) error { - if err := a.Agent.Call( - a.CanisterId, - "delete_subnet", - []any{arg0}, - []any{}, - ); err != nil { - return err - } - return nil -} - // DeployGuestosToAllSubnetNodes calls the "deploy_guestos_to_all_subnet_nodes" method on the "registry" canister. func (a Agent) DeployGuestosToAllSubnetNodes(arg0 DeployGuestosToAllSubnetNodesPayload) error { if err := a.Agent.Call( diff --git a/ic/sns/ledger/agent.go b/ic/sns/ledger/agent.go index 9f0704a..ae5e401 100755 --- a/ic/sns/ledger/agent.go +++ b/ic/sns/ledger/agent.go @@ -87,6 +87,26 @@ func (a Agent) GetTransactions(arg0 GetTransactionsRequest) (*GetTransactionsRes return &r0, nil } +// Icrc10SupportedStandards calls the "icrc10_supported_standards" method on the "ledger" canister. +func (a Agent) Icrc10SupportedStandards() (*[]struct { + Name string `ic:"name" json:"name"` + Url string `ic:"url" json:"url"` +}, error) { + var r0 []struct { + Name string `ic:"name" json:"name"` + Url string `ic:"url" json:"url"` + } + if err := a.Agent.Query( + a.CanisterId, + "icrc10_supported_standards", + []any{}, + []any{&r0}, + ); err != nil { + return nil, err + } + return &r0, nil +} + // Icrc1BalanceOf calls the "icrc1_balance_of" method on the "ledger" canister. func (a Agent) Icrc1BalanceOf(arg0 Account) (*Tokens, error) { var r0 Tokens @@ -233,6 +253,20 @@ func (a Agent) Icrc1Transfer(arg0 TransferArg) (*TransferResult, error) { return &r0, nil } +// Icrc21CanisterCallConsentMessage calls the "icrc21_canister_call_consent_message" method on the "ledger" canister. +func (a Agent) Icrc21CanisterCallConsentMessage(arg0 Icrc21ConsentMessageRequest) (*Icrc21ConsentMessageResponse, error) { + var r0 Icrc21ConsentMessageResponse + if err := a.Agent.Call( + a.CanisterId, + "icrc21_canister_call_consent_message", + []any{arg0}, + []any{&r0}, + ); err != nil { + return nil, err + } + return &r0, nil +} + // Icrc2Allowance calls the "icrc2_allowance" method on the "ledger" canister. func (a Agent) Icrc2Allowance(arg0 AllowanceArgs) (*Allowance, error) { var r0 Allowance @@ -542,6 +576,60 @@ type ICRC3Value struct { } `ic:"Map,variant"` } +type Icrc21ConsentInfo struct { + ConsentMessage Icrc21ConsentMessage `ic:"consent_message" json:"consent_message"` + Metadata Icrc21ConsentMessageMetadata `ic:"metadata" json:"metadata"` +} + +type Icrc21ConsentMessage struct { + GenericDisplayMessage *string `ic:"GenericDisplayMessage,variant"` + LineDisplayMessage *struct { + Pages []struct { + Lines []string `ic:"lines" json:"lines"` + } `ic:"pages" json:"pages"` + } `ic:"LineDisplayMessage,variant"` +} + +type Icrc21ConsentMessageMetadata struct { + Language string `ic:"language" json:"language"` +} + +type Icrc21ConsentMessageRequest struct { + Method string `ic:"method" json:"method"` + Arg []byte `ic:"arg" json:"arg"` + UserPreferences Icrc21ConsentMessageSpec `ic:"user_preferences" json:"user_preferences"` +} + +type Icrc21ConsentMessageResponse struct { + Ok *Icrc21ConsentInfo `ic:"Ok,variant"` + Err *Icrc21Error `ic:"Err,variant"` +} + +type Icrc21ConsentMessageSpec struct { + Metadata Icrc21ConsentMessageMetadata `ic:"metadata" json:"metadata"` + DeviceSpec *struct { + GenericDisplay *idl.Null `ic:"GenericDisplay,variant"` + LineDisplay *struct { + CharactersPerLine uint16 `ic:"characters_per_line" json:"characters_per_line"` + LinesPerPage uint16 `ic:"lines_per_page" json:"lines_per_page"` + } `ic:"LineDisplay,variant"` + } `ic:"device_spec,omitempty" json:"device_spec,omitempty"` +} + +type Icrc21Error struct { + UnsupportedCanisterCall *Icrc21ErrorInfo `ic:"UnsupportedCanisterCall,variant"` + ConsentMessageUnavailable *Icrc21ErrorInfo `ic:"ConsentMessageUnavailable,variant"` + InsufficientPayment *Icrc21ErrorInfo `ic:"InsufficientPayment,variant"` + GenericError *struct { + ErrorCode idl.Nat `ic:"error_code" json:"error_code"` + Description string `ic:"description" json:"description"` + } `ic:"GenericError,variant"` +} + +type Icrc21ErrorInfo struct { + Description string `ic:"description" json:"description"` +} + type InitArgs struct { MintingAccount Account `ic:"minting_account" json:"minting_account"` FeeCollectorAccount *Account `ic:"fee_collector_account,omitempty" json:"fee_collector_account,omitempty"` diff --git a/ic/sns/swap/agent.go b/ic/sns/swap/agent.go index 1501fad..17708d5 100755 --- a/ic/sns/swap/agent.go +++ b/ic/sns/swap/agent.go @@ -305,21 +305,6 @@ func (a Agent) RefreshBuyerTokens(arg0 RefreshBuyerTokensRequest) (*RefreshBuyer return &r0, nil } -// RestoreDappControllers calls the "restore_dapp_controllers" method on the "swap" canister. -func (a Agent) RestoreDappControllers(arg0 struct { -}) (*SetDappControllersCallResult, error) { - var r0 SetDappControllersCallResult - if err := a.Agent.Call( - a.CanisterId, - "restore_dapp_controllers", - []any{arg0}, - []any{&r0}, - ); err != nil { - return nil, err - } - return &r0, nil -} - type BuyerState struct { Icp *TransferableAmount `ic:"icp,omitempty" json:"icp,omitempty"` HasCreatedNeuronRecipes *bool `ic:"has_created_neuron_recipes,omitempty" json:"has_created_neuron_recipes,omitempty"` diff --git a/ic/sns/testdata/gen.go b/ic/sns/testdata/gen.go index 42230b1..df863a0 100644 --- a/ic/sns/testdata/gen.go +++ b/ic/sns/testdata/gen.go @@ -16,6 +16,9 @@ import ( var ( //go:embed did dids embed.FS + + ICVersion = "release-2024-06-05_23-01-base" + SDKVersion = "0.20.1" ) func checkLatest() error { @@ -25,27 +28,27 @@ func checkLatest() error { }{ { filepath: "ic/sns/testdata/did/sns.did", - remote: "https://raw.githubusercontent.com/dfinity/ic/master/rs/nns/sns-wasm/canister/sns-wasm.did", + remote: fmt.Sprintf("https://raw.githubusercontent.com/dfinity/ic/%s/rs/nns/sns-wasm/canister/sns-wasm.did", ICVersion), }, { filepath: "ic/sns/testdata/did/governance.did", - remote: "https://raw.githubusercontent.com/dfinity/sdk/master/src/distributed/assetstorage.did", + remote: fmt.Sprintf("https://raw.githubusercontent.com/dfinity/sdk/%s/src/distributed/assetstorage.did", SDKVersion), }, { filepath: "ic/sns/testdata/did/root.did", - remote: "https://raw.githubusercontent.com/dfinity/ic/master/rs/sns/root/canister/root.did", + remote: fmt.Sprintf("https://raw.githubusercontent.com/dfinity/ic/%s/rs/sns/root/canister/root.did", ICVersion), }, { filepath: "ic/sns/testdata/did/swap.did", - remote: "https://raw.githubusercontent.com/dfinity/ic/master/rs/sns/swap/canister/swap.did", + remote: fmt.Sprintf("https://raw.githubusercontent.com/dfinity/ic/%s/rs/sns/swap/canister/swap.did", ICVersion), }, { filepath: "ic/sns/testdata/did/ledger.did", - remote: "https://raw.githubusercontent.com/dfinity/ic/master/rs/rosetta-api/icrc1/ledger/ledger.did", + remote: fmt.Sprintf("https://raw.githubusercontent.com/dfinity/ic/%s/rs/rosetta-api/icrc1/ledger/ledger.did", ICVersion), }, { filepath: "ic/sns/testdata/did/index.did", - remote: "https://raw.githubusercontent.com/dfinity/ic/master/rs/rosetta-api/icrc1/index/index.did", + remote: fmt.Sprintf("https://raw.githubusercontent.com/dfinity/ic/%s/rs/rosetta-api/icrc1/index/index.did", ICVersion), }, } { raw, err := http.Get(f.remote) diff --git a/ic/testdata/did/ic.did b/ic/testdata/did/ic.did index 3b634a6..6085b24 100644 --- a/ic/testdata/did/ic.did +++ b/ic/testdata/did/ic.did @@ -1,18 +1,12 @@ type canister_id = principal; type wasm_module = blob; -type log_visibility = variant { - controllers; - public; -}; - type canister_settings = record { controllers : opt vec principal; compute_allocation : opt nat; memory_allocation : opt nat; freezing_threshold : opt nat; reserved_cycles_limit : opt nat; - log_visibility : opt log_visibility; }; type definite_canister_settings = record { @@ -21,7 +15,6 @@ type definite_canister_settings = record { memory_allocation : nat; freezing_threshold : nat; reserved_cycles_limit : nat; - log_visibility : log_visibility; }; type change_origin = variant { @@ -55,9 +48,7 @@ type change = record { details : change_details; }; -type chunk_hash = record { - hash : blob; -}; +type chunk_hash = blob; type http_header = record { name : text; @@ -153,7 +144,7 @@ type millisatoshi_per_byte = nat64; type node_metrics = record { node_id : principal; - num_blocks_proposed_total : nat64; + num_blocks_total : nat64; num_block_failures_total : nat64; }; @@ -185,20 +176,14 @@ type stored_chunks_args = record { canister_id : canister_id; }; -type canister_install_mode = variant { - install; - reinstall; - upgrade : opt record { - skip_pre_upgrade : opt bool; - wasm_memory_persistence : opt variant { - keep; - replace; +type install_code_args = record { + mode : variant { + install; + reinstall; + upgrade : opt record { + skip_pre_upgrade : opt bool; }; }; -}; - -type install_code_args = record { - mode : canister_install_mode; canister_id : canister_id; wasm_module : wasm_module; arg : blob; @@ -206,9 +191,15 @@ type install_code_args = record { }; type install_chunked_code_args = record { - mode : canister_install_mode; + mode : variant { + install; + reinstall; + upgrade : opt record { + skip_pre_upgrade : opt bool; + }; + }; target_canister : canister_id; - store_canister : opt canister_id; + storage_canister : opt canister_id; chunk_hashes_list : vec chunk_hash; wasm_module_hash : blob; arg : blob; @@ -240,12 +231,6 @@ type canister_status_result = record { cycles : nat; reserved_cycles : nat; idle_cycles_burned_per_day : nat; - query_stats: record { - num_calls_total: nat; - num_instructions_total: nat; - request_payload_bytes_total: nat; - response_payload_bytes_total: nat; - }; }; type canister_info_args = record { @@ -339,20 +324,6 @@ type bitcoin_get_balance_query_result = satoshi; type bitcoin_get_current_fee_percentiles_result = vec millisatoshi_per_byte; -type fetch_canister_logs_args = record { - canister_id : canister_id; -}; - -type canister_log_record = record { - idx: nat64; - timestamp_nanos: nat64; - content: blob; -}; - -type fetch_canister_logs_result = record { - canister_log_records: vec canister_log_record; -}; - service ic : { create_canister : (create_canister_args) -> (create_canister_result); update_settings : (update_settings_args) -> (); @@ -389,7 +360,4 @@ service ic : { // provisional interfaces for the pre-ledger world provisional_create_canister_with_cycles : (provisional_create_canister_with_cycles_args) -> (provisional_create_canister_with_cycles_result); provisional_top_up_canister : (provisional_top_up_canister_args) -> (); - - // canister logging - fetch_canister_logs : (fetch_canister_logs_args) -> (fetch_canister_logs_result) query; }; diff --git a/ic/testdata/gen.go b/ic/testdata/gen.go index fa91f3b..19b6aee 100644 --- a/ic/testdata/gen.go +++ b/ic/testdata/gen.go @@ -16,6 +16,10 @@ import ( var ( //go:embed did dids embed.FS + + ICVersion = "release-2024-06-05_23-01-base" + InterfaceSpecVersion = "0.23.0" + SDKVersion = "0.20.1" ) func checkLatest() error { @@ -25,31 +29,31 @@ func checkLatest() error { }{ { filepath: "ic/testdata/did/assetstorage.did", - remote: "https://raw.githubusercontent.com/dfinity/sdk/master/src/distributed/assetstorage.did", + remote: fmt.Sprintf("https://raw.githubusercontent.com/dfinity/sdk/%s/src/distributed/assetstorage.did", SDKVersion), }, { filepath: "ic/testdata/did/cmc.did", - remote: "https://raw.githubusercontent.com/dfinity/ic/master/rs/nns/cmc/cmc.did", + remote: fmt.Sprintf("https://raw.githubusercontent.com/dfinity/ic/%s/rs/nns/cmc/cmc.did", ICVersion), }, { filepath: "ic/testdata/did/ic.did", - remote: "https://raw.githubusercontent.com/dfinity/interface-spec/master/spec/_attachments/ic.did", + remote: fmt.Sprintf("https://raw.githubusercontent.com/dfinity/interface-spec/%s/spec/_attachments/ic.did", InterfaceSpecVersion), }, { filepath: "ic/testdata/did/registry.did", - remote: "https://raw.githubusercontent.com/dfinity/ic/master/rs/registry/canister/canister/registry.did", + remote: fmt.Sprintf("https://raw.githubusercontent.com/dfinity/ic/%s/rs/registry/canister/canister/registry.did", ICVersion), }, { filepath: "ic/testdata/did/governance.did", - remote: "https://raw.githubusercontent.com/dfinity/ic/master/rs/nns/governance/canister/governance.did", + remote: fmt.Sprintf("https://raw.githubusercontent.com/dfinity/ic/%s/rs/nns/governance/canister/governance.did", ICVersion), }, { filepath: "ic/testdata/did/icparchive.did", - remote: "https://raw.githubusercontent.com/dfinity/ic/master/rs/rosetta-api/icp_ledger/ledger_archive.did", + remote: fmt.Sprintf("https://raw.githubusercontent.com/dfinity/ic/%s/rs/rosetta-api/icp_ledger/ledger_archive.did", ICVersion), }, { filepath: "ic/testdata/did/icpledger.did", - remote: "https://raw.githubusercontent.com/dfinity/ic/master/rs/rosetta-api/icp_ledger/ledger.did", + remote: fmt.Sprintf("https://raw.githubusercontent.com/dfinity/ic/%s/rs/rosetta-api/icp_ledger/ledger.did", ICVersion), }, { filepath: "ic/testdata/did/icrc1.did", @@ -57,7 +61,7 @@ func checkLatest() error { }, { filepath: "ic/testdata/did/wallet.did", - remote: "https://raw.githubusercontent.com/dfinity/sdk/master/src/distributed/wallet.did", + remote: fmt.Sprintf("https://raw.githubusercontent.com/dfinity/sdk/%s/src/distributed/wallet.did", SDKVersion), }, } { raw, err := http.Get(f.remote) diff --git a/pocketic/agent_test.go b/pocketic/agent_test.go index bfcb1f1..e517e34 100755 --- a/pocketic/agent_test.go +++ b/pocketic/agent_test.go @@ -41,8 +41,9 @@ func (a Agent) HelloQuery(arg0 string) (*string, error) { } // HelloQueryQuery creates an indirect representation of the "helloQuery" method on the "hello" canister. -func (a Agent) HelloQueryQuery(arg0 string) (*agent.Query, error) { - return a.Agent.CreateQuery( +func (a Agent) HelloQueryQuery(arg0 string) (*agent.CandidAPIRequest, error) { + return a.Agent.CreateCandidAPIRequest( + agent.RequestTypeQuery, a.CanisterId, "helloQuery", arg0, @@ -64,8 +65,9 @@ func (a Agent) HelloUpdate(arg0 string) (*string, error) { } // HelloUpdateCall creates an indirect representation of the "helloUpdate" method on the "hello" canister. -func (a Agent) HelloUpdateCall(arg0 string) (*agent.Call, error) { - return a.Agent.CreateCall( +func (a Agent) HelloUpdateCall(arg0 string) (*agent.CandidAPIRequest, error) { + return a.Agent.CreateCandidAPIRequest( + agent.RequestTypeCall, a.CanisterId, "helloUpdate", arg0, diff --git a/pocketic/endpoints_test.go b/pocketic/endpoints_test.go index 7e748a4..c336301 100644 --- a/pocketic/endpoints_test.go +++ b/pocketic/endpoints_test.go @@ -16,7 +16,7 @@ func TestEndpoints(t *testing.T) { pocketic.WithApplicationSubnet(), ) if err != nil { - t.Skipf("skipping test: %v", err) + t.Skip(err) } t.Run("status", func(t *testing.T) { diff --git a/pocketic/pocketic_test.go b/pocketic/pocketic_test.go index 7758a19..3bba2b2 100644 --- a/pocketic/pocketic_test.go +++ b/pocketic/pocketic_test.go @@ -21,7 +21,7 @@ import ( func TestConcurrentCalls(t *testing.T) { pic, err := pocketic.New(pocketic.WithPollingDelay(10*time.Millisecond, 10*time.Second)) if err != nil { - t.Skipf("skipping test: %v", err) + t.Skip(err) } var wg sync.WaitGroup for i := 0; i < 10; i++ { @@ -47,7 +47,7 @@ func TestConcurrentCalls(t *testing.T) { func TestCreateCanister(t *testing.T) { pic, err := pocketic.New(pocketic.WithLogger(new(testLogger))) if err != nil { - t.Skipf("skipping test: %v", err) + t.Skip(err) } canisterID, err := pic.CreateCanister() @@ -66,7 +66,7 @@ func TestHttpGateway(t *testing.T) { pocketic.WithApplicationSubnet(), ) if err != nil { - t.Skipf("skipping test: %v", err) + t.Skip(err) } endpoint, err := pic.MakeLive(nil) @@ -101,7 +101,7 @@ func TestHttpGateway(t *testing.T) { if err != nil { t.Fatal(err) } - if err := createCall.WithEffectiveCanisterID(ecID).CallAndWait(&result); err != nil { + if err := createCall.WithEffectiveCanisterID(ecID).CallAndWait([]any{&result}); err != nil { t.Fatal(err) } diff --git a/query.go b/query.go index c61c5cf..c0b75dd 100644 --- a/query.go +++ b/query.go @@ -1,113 +1,25 @@ package agent import ( + "context" "crypto/ed25519" "fmt" - "github.com/aviate-labs/agent-go/candid/idl" + "math/big" + "github.com/aviate-labs/agent-go/certification" "github.com/aviate-labs/agent-go/certification/hashtree" "github.com/aviate-labs/agent-go/principal" "github.com/aviate-labs/leb128" "github.com/fxamacker/cbor/v2" "google.golang.org/protobuf/proto" - "math/big" ) -// CreateQuery creates a new Query to the given canister and method. -func (a *Agent) CreateQuery(canisterID principal.Principal, methodName string, args ...any) (*Query, error) { - rawArgs, err := idl.Marshal(args) - if err != nil { - return nil, err - } - if len(args) == 0 { - // Default to the empty Candid argument list. - rawArgs = []byte{'D', 'I', 'D', 'L', 0, 0} - } - nonce, err := newNonce() - if err != nil { - return nil, err - } - requestID, data, err := a.sign(Request{ - Type: RequestTypeQuery, - Sender: a.Sender(), - CanisterID: canisterID, - MethodName: methodName, - Arguments: rawArgs, - IngressExpiry: a.expiryDate(), - Nonce: nonce, - }) - if err != nil { - return nil, err - } - return &Query{ - a: a, - methodName: methodName, - effectiveCanisterID: effectiveCanisterID(canisterID, args), - requestID: *requestID, - data: data, - }, nil -} - // Query calls a method on a canister and unmarshals the result into the given values. -func (a Agent) Query(canisterID principal.Principal, methodName string, args, values []any) error { - query, err := a.CreateQuery(canisterID, methodName, args...) - if err != nil { - return err - } - return query.Query(values...) -} - -// 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) - 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 - } - resp, err := a.client.Query(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) -} - -// Query is an intermediate representation of a Query to a canister. -type Query struct { - a *Agent - methodName string - effectiveCanisterID principal.Principal - requestID RequestID - data []byte -} - -// Query calls a method on a canister and unmarshals the result into the given values. -func (q Query) Query(values ...any) error { +func (q APIRequest[In, Out]) Query(out Out) error { q.a.logger.Printf("[AGENT] QUERY %s %s", q.effectiveCanisterID, q.methodName) - rawResp, err := q.a.client.Query(q.effectiveCanisterID, q.data) + ctx, cancel := context.WithTimeout(q.a.ctx, q.a.ingressExpiry) + defer cancel() + rawResp, err := q.a.client.Query(ctx, q.effectiveCanisterID, q.data) if err != nil { return err } @@ -200,14 +112,65 @@ func (q Query) Query(values ...any) error { } switch resp.Status { case "replied": - var reply map[string][]byte + var reply struct { + Arg []byte `ic:"arg"` + } if err := cbor.Unmarshal(resp.Reply, &reply); err != nil { return err } - return idl.Unmarshal(reply["arg"], values) + return q.unmarshal(reply.Arg, out) case "rejected": return fmt.Errorf("(%d) %s: %s", resp.RejectCode, resp.ErrorCode, resp.RejectMsg) default: panic("unreachable") } } + +// Query calls a method on a canister and unmarshals the result into the given values. +func (a Agent) Query(canisterID principal.Principal, methodName string, in, out []any) error { + query, err := a.CreateCandidAPIRequest(RequestTypeQuery, canisterID, methodName, in...) + if err != nil { + return err + } + return query.Query(out) +} + +// 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) + 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) +} From d1a66e7b2349bbc8e85c8d2a19e94abec7ca90fa Mon Sep 17 00:00:00 2001 From: Quint Daenen Date: Fri, 14 Jun 2024 10:56:55 +0200 Subject: [PATCH 2/4] Fix tests. --- .github/workflows/test-ledger.yml | 13 + .github/workflows/test-registry.yml | 2 +- Makefile | 3 + 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 | 4 +- clients/registry/proto/v1/subnet.pb.go | 4471 +++++++++++----------- query.go | 45 +- 10 files changed, 2429 insertions(+), 2431 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 09976ef..c9e43ac 100644 --- a/Makefile +++ b/Makefile @@ -6,6 +6,9 @@ test: test-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 161fe61..8d15c31 100644 --- a/clients/registry/proto/v1/registry.pb.go +++ b/clients/registry/proto/v1/registry.pb.go @@ -75,7 +75,7 @@ func file_registry_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_registry_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_registry_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*ProtoRegistry); i { case 0: return &v.state @@ -87,7 +87,7 @@ func file_registry_proto_init() { return nil } } - file_registry_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_registry_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*ProtoRegistryRecord); i { case 0: return &v.state diff --git a/clients/registry/proto/v1/subnet.pb.go b/clients/registry/proto/v1/subnet.pb.go index 428ca37..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,427 +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/query.go b/query.go index c0b75dd..1be94b6 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") } @@ -78,7 +78,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))) @@ -103,7 +103,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") @@ -132,45 +132,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) } From 41d3877e9b790459ebd66aa2492dfbfd6d1b302d Mon Sep 17 00:00:00 2001 From: Quint Daenen Date: Fri, 14 Jun 2024 15:07:38 +0200 Subject: [PATCH 3/4] Add ledger client dataprovider. --- Makefile | 1 + clients/ledger/client_test.go | 13 + clients/ledger/dataprovider.go | 139 + clients/ledger/dataprovider_test.go | 47 + clients/ledger/proto.go | 4 + clients/ledger/proto/v1/ledger.pb.go | 4339 +++++++++++++++++++++++++ clients/ledger/testdata/ledger.proto | 333 ++ clients/registry/proto/v1/local.pb.go | 155 +- clients/registry/proto/v1/node.pb.go | 6 +- 9 files changed, 4956 insertions(+), 81 deletions(-) create mode 100644 clients/ledger/client_test.go create mode 100644 clients/ledger/dataprovider.go create mode 100644 clients/ledger/dataprovider_test.go create mode 100644 clients/ledger/proto.go create mode 100644 clients/ledger/proto/v1/ledger.pb.go create mode 100644 clients/ledger/testdata/ledger.proto diff --git a/Makefile b/Makefile index c9e43ac..842ac93 100644 --- a/Makefile +++ b/Makefile @@ -19,6 +19,7 @@ test-cover: gen: cd candid && go generate cd pocketic && go generate + cd clients/ledger && go generate cd clients/registry && go generate gen-ic: diff --git a/clients/ledger/client_test.go b/clients/ledger/client_test.go new file mode 100644 index 0000000..f74d1e5 --- /dev/null +++ b/clients/ledger/client_test.go @@ -0,0 +1,13 @@ +package ledger_test + +import ( + "os" + "testing" +) + +func checkEnabled(t *testing.T) { + // The reason for this is that the tests are very slow. + if os.Getenv("LEDGER_TEST_ENABLE") != "true" { + t.Skip("Skipping registry tests. Set LEDGER_TEST_ENABLE=true to enable.") + } +} diff --git a/clients/ledger/dataprovider.go b/clients/ledger/dataprovider.go new file mode 100644 index 0000000..3a45b6f --- /dev/null +++ b/clients/ledger/dataprovider.go @@ -0,0 +1,139 @@ +package ledger + +import ( + "fmt" + "github.com/aviate-labs/agent-go" + v1 "github.com/aviate-labs/agent-go/clients/ledger/proto/v1" + "github.com/aviate-labs/agent-go/ic" + "github.com/aviate-labs/agent-go/principal" +) + +const MaxBlocksPerRequest = 2000 + +type BlockIndex uint64 + +type DataProvider struct { + a *agent.Agent +} + +func NewDataProvider() (*DataProvider, error) { + a, err := agent.New(agent.DefaultConfig) + if err != nil { + return nil, fmt.Errorf("failed to create agent: %w", err) + } + return &DataProvider{a: a}, nil +} + +func (d DataProvider) GetArchiveIndex() ([]*v1.ArchiveIndexEntry, error) { + var resp v1.ArchiveIndexResponse + if err := d.a.QueryProto( + ic.LEDGER_PRINCIPAL, + "get_archive_index_pb", + nil, + &resp, + ); err != nil { + return nil, fmt.Errorf("failed to get archive index: %w", err) + } + return resp.Entries, nil +} + +func (d DataProvider) GetRawBlock(height BlockIndex) (*v1.EncodedBlock, error) { + var resp v1.BlockResponse + if err := d.a.QueryProto( + ic.LEDGER_PRINCIPAL, + "block_pb", + &v1.BlockRequest{ + BlockHeight: uint64(height), + }, + &resp, + ); err != nil { + return nil, fmt.Errorf("failed to get block: %w", err) + } + switch blockResponse := resp.BlockContent.(type) { + case *v1.BlockResponse_Block: + return blockResponse.Block, nil + case *v1.BlockResponse_CanisterId: + archiveCanisterID := principal.Principal{Raw: blockResponse.CanisterId.SerializedId} + var archiveResp v1.BlockResponse + if err := d.a.QueryProto( + archiveCanisterID, + "get_block_pb", + &v1.BlockRequest{ + BlockHeight: uint64(height), + }, + &archiveResp, + ); err != nil { + return nil, fmt.Errorf("failed to get blocks: %w", err) + } + // Will never return a CanisterId block. + return archiveResp.GetBlock(), nil + default: + return nil, fmt.Errorf("unexpected block content type: %T", blockResponse) + } +} + +func (d DataProvider) GetRawBlocks(start, end BlockIndex) ([]*v1.EncodedBlock, error) { + if end-start < 2000 { + blocks, err := d.GetRawBlocksRange(ic.LEDGER_PRINCIPAL, start, end) + if err == nil { + return blocks, nil + } + } + archives, err := d.GetArchiveIndex() + if err != nil { + return nil, fmt.Errorf("failed to get archive index: %w", err) + } + var blocks []*v1.EncodedBlock + for _, archive := range archives { + if archive.HeightTo < uint64(start) || uint64(end) < archive.HeightFrom { + continue + } + for start < min(BlockIndex(archive.HeightTo), end) { + archiveEnd := min(end, BlockIndex(archive.HeightTo), start+MaxBlocksPerRequest) + archiveBlocks, err := d.GetRawBlocksRange(principal.Principal{Raw: archive.CanisterId.SerializedId}, start, archiveEnd) + if err != nil { + return nil, fmt.Errorf("failed to get archive blocks: %w", err) + } + blocks = append(blocks, archiveBlocks...) + start += BlockIndex(len(archiveBlocks)) + } + } + return blocks, nil +} + +func (d DataProvider) GetRawBlocksRange(canisterID principal.Principal, start, end BlockIndex) ([]*v1.EncodedBlock, error) { + var resp v1.GetBlocksResponse + if err := d.a.QueryProto( + canisterID, + "get_blocks_pb", + &v1.GetBlocksRequest{ + Start: uint64(start), + Length: uint64(end - start), + }, + &resp, + ); err != nil { + return nil, fmt.Errorf("failed to get blocks: %w", err) + } + switch blocksResponse := resp.GetBlocksContent.(type) { + case *v1.GetBlocksResponse_Blocks: + return blocksResponse.Blocks.Blocks, nil + case *v1.GetBlocksResponse_Error: + return nil, fmt.Errorf("failed to get blocks: %s", blocksResponse.Error) + default: + return nil, fmt.Errorf("unexpected get block content type: %T", blocksResponse) + } +} + +func (d DataProvider) GetTipOfChain() (*BlockIndex, error) { + var resp v1.TipOfChainResponse + if err := d.a.QueryProto( + ic.LEDGER_PRINCIPAL, + "tip_of_chain_pb", + &v1.TipOfChainRequest{}, + &resp, + ); err != nil { + return nil, fmt.Errorf("failed to get tip of chain: %w", err) + } + height := BlockIndex(resp.ChainLength.Height) + return &height, nil +} diff --git a/clients/ledger/dataprovider_test.go b/clients/ledger/dataprovider_test.go new file mode 100644 index 0000000..6d16a39 --- /dev/null +++ b/clients/ledger/dataprovider_test.go @@ -0,0 +1,47 @@ +package ledger_test + +import ( + "github.com/aviate-labs/agent-go/clients/ledger" + "testing" +) + +func TestDataProvider_GetRawBlock(t *testing.T) { + checkEnabled(t) + + dp, err := ledger.NewDataProvider() + if err != nil { + t.Fatal(err) + } + if _, err := dp.GetRawBlock(0); err != nil { + t.Error(err) + } +} + +func TestDataProvider_GetRawBlocks(t *testing.T) { + checkEnabled(t) + + dp, err := ledger.NewDataProvider() + if err != nil { + t.Fatal(err) + } + n := 3 * ledger.MaxBlocksPerRequest + blocks, err := dp.GetRawBlocks(0, ledger.BlockIndex(n)) + if err != nil { + t.Error(err) + } + if len(blocks) != n { + t.Errorf("expected %d blocks, got %d", n, len(blocks)) + } +} + +func TestDataProvider_GetTipOfChain(t *testing.T) { + checkEnabled(t) + + dp, err := ledger.NewDataProvider() + if err != nil { + t.Fatal(err) + } + if _, err := dp.GetTipOfChain(); err != nil { + t.Error(err) + } +} diff --git a/clients/ledger/proto.go b/clients/ledger/proto.go new file mode 100644 index 0000000..71ae046 --- /dev/null +++ b/clients/ledger/proto.go @@ -0,0 +1,4 @@ +package ledger + +//go:generate go install google.golang.org/protobuf/cmd/protoc-gen-go@latest +//go:generate protoc -I=testdata --go_out=. testdata/ledger.proto diff --git a/clients/ledger/proto/v1/ledger.pb.go b/clients/ledger/proto/v1/ledger.pb.go new file mode 100644 index 0000000..8cd4a7a --- /dev/null +++ b/clients/ledger/proto/v1/ledger.pb.go @@ -0,0 +1,4339 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v5.27.0 +// source: ledger.proto + +package v1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + descriptorpb "google.golang.org/protobuf/types/descriptorpb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +var ( + file_ledger_proto_rawDescOnce sync.Once + file_ledger_proto_rawDescData = file_ledger_proto_rawDesc +) + +// Extension fields to descriptorpb.FieldOptions. +var ( + // optional bool tui_signed_display_q2_2021 = 20001; + E_TuiSignedDisplayQ2_2021 = &file_ledger_proto_extTypes[1] +) + +// Extension fields to descriptorpb.MessageOptions. +var ( + // optional bool tui_signed_message = 20000; + E_TuiSignedMessage = &file_ledger_proto_extTypes[0] +) + +var File_ledger_proto protoreflect.FileDescriptor + +var file_ledger_proto_depIdxs = []int32{ + 46, // 0: ic_ledger.pb.v1.LedgerInit.minting_account:type_name -> ic_ledger.pb.v1.AccountIdentifier + 39, // 1: ic_ledger.pb.v1.LedgerInit.initial_values:type_name -> ic_ledger.pb.v1.Account + 0, // 2: ic_ledger.pb.v1.LedgerInit.archive_canister:type_name -> ic_ledger.pb.v1.PrincipalId + 48, // 3: ic_ledger.pb.v1.SendRequest.memo:type_name -> ic_ledger.pb.v1.Memo + 35, // 4: ic_ledger.pb.v1.SendRequest.payment:type_name -> ic_ledger.pb.v1.Payment + 34, // 5: ic_ledger.pb.v1.SendRequest.max_fee:type_name -> ic_ledger.pb.v1.Tokens + 47, // 6: ic_ledger.pb.v1.SendRequest.from_subaccount:type_name -> ic_ledger.pb.v1.Subaccount + 46, // 7: ic_ledger.pb.v1.SendRequest.to:type_name -> ic_ledger.pb.v1.AccountIdentifier + 36, // 8: ic_ledger.pb.v1.SendRequest.created_at:type_name -> ic_ledger.pb.v1.BlockIndex + 50, // 9: ic_ledger.pb.v1.SendRequest.created_at_time:type_name -> ic_ledger.pb.v1.TimeStamp + 36, // 10: ic_ledger.pb.v1.SendResponse.resulting_height:type_name -> ic_ledger.pb.v1.BlockIndex + 36, // 11: ic_ledger.pb.v1.NotifyRequest.block_height:type_name -> ic_ledger.pb.v1.BlockIndex + 34, // 12: ic_ledger.pb.v1.NotifyRequest.max_fee:type_name -> ic_ledger.pb.v1.Tokens + 47, // 13: ic_ledger.pb.v1.NotifyRequest.from_subaccount:type_name -> ic_ledger.pb.v1.Subaccount + 0, // 14: ic_ledger.pb.v1.NotifyRequest.to_canister:type_name -> ic_ledger.pb.v1.PrincipalId + 47, // 15: ic_ledger.pb.v1.NotifyRequest.to_subaccount:type_name -> ic_ledger.pb.v1.Subaccount + 0, // 16: ic_ledger.pb.v1.TransactionNotificationRequest.from:type_name -> ic_ledger.pb.v1.PrincipalId + 47, // 17: ic_ledger.pb.v1.TransactionNotificationRequest.from_subaccount:type_name -> ic_ledger.pb.v1.Subaccount + 0, // 18: ic_ledger.pb.v1.TransactionNotificationRequest.to:type_name -> ic_ledger.pb.v1.PrincipalId + 47, // 19: ic_ledger.pb.v1.TransactionNotificationRequest.to_subaccount:type_name -> ic_ledger.pb.v1.Subaccount + 36, // 20: ic_ledger.pb.v1.TransactionNotificationRequest.block_height:type_name -> ic_ledger.pb.v1.BlockIndex + 34, // 21: ic_ledger.pb.v1.TransactionNotificationRequest.amount:type_name -> ic_ledger.pb.v1.Tokens + 48, // 22: ic_ledger.pb.v1.TransactionNotificationRequest.memo:type_name -> ic_ledger.pb.v1.Memo + 0, // 23: ic_ledger.pb.v1.CyclesNotificationResponse.created_canister_id:type_name -> ic_ledger.pb.v1.PrincipalId + 21, // 24: ic_ledger.pb.v1.CyclesNotificationResponse.refund:type_name -> ic_ledger.pb.v1.Refund + 22, // 25: ic_ledger.pb.v1.CyclesNotificationResponse.topped_up:type_name -> ic_ledger.pb.v1.ToppedUp + 46, // 26: ic_ledger.pb.v1.AccountBalanceRequest.account:type_name -> ic_ledger.pb.v1.AccountIdentifier + 34, // 27: ic_ledger.pb.v1.AccountBalanceResponse.balance:type_name -> ic_ledger.pb.v1.Tokens + 51, // 28: ic_ledger.pb.v1.TipOfChainResponse.certification:type_name -> ic_ledger.pb.v1.Certification + 36, // 29: ic_ledger.pb.v1.TipOfChainResponse.chain_length:type_name -> ic_ledger.pb.v1.BlockIndex + 34, // 30: ic_ledger.pb.v1.TotalSupplyResponse.total_supply:type_name -> ic_ledger.pb.v1.Tokens + 50, // 31: ic_ledger.pb.v1.LedgerArchiveRequest.timestamp:type_name -> ic_ledger.pb.v1.TimeStamp + 18, // 32: ic_ledger.pb.v1.BlockResponse.block:type_name -> ic_ledger.pb.v1.EncodedBlock + 0, // 33: ic_ledger.pb.v1.BlockResponse.canister_id:type_name -> ic_ledger.pb.v1.PrincipalId + 36, // 34: ic_ledger.pb.v1.Refund.refund:type_name -> ic_ledger.pb.v1.BlockIndex + 18, // 35: ic_ledger.pb.v1.EncodedBlocks.blocks:type_name -> ic_ledger.pb.v1.EncodedBlock + 23, // 36: ic_ledger.pb.v1.GetBlocksResponse.blocks:type_name -> ic_ledger.pb.v1.EncodedBlocks + 18, // 37: ic_ledger.pb.v1.IterBlocksResponse.blocks:type_name -> ic_ledger.pb.v1.EncodedBlock + 0, // 38: ic_ledger.pb.v1.ArchiveIndexEntry.canister_id:type_name -> ic_ledger.pb.v1.PrincipalId + 27, // 39: ic_ledger.pb.v1.ArchiveIndexResponse.entries:type_name -> ic_ledger.pb.v1.ArchiveIndexEntry + 37, // 40: ic_ledger.pb.v1.ArchiveAddRequest.blocks:type_name -> ic_ledger.pb.v1.Block + 0, // 41: ic_ledger.pb.v1.GetNodesResponse.nodes:type_name -> ic_ledger.pb.v1.PrincipalId + 34, // 42: ic_ledger.pb.v1.Payment.receiver_gets:type_name -> ic_ledger.pb.v1.Tokens + 38, // 43: ic_ledger.pb.v1.Block.parent_hash:type_name -> ic_ledger.pb.v1.Hash + 50, // 44: ic_ledger.pb.v1.Block.timestamp:type_name -> ic_ledger.pb.v1.TimeStamp + 40, // 45: ic_ledger.pb.v1.Block.transaction:type_name -> ic_ledger.pb.v1.Transaction + 46, // 46: ic_ledger.pb.v1.Account.identifier:type_name -> ic_ledger.pb.v1.AccountIdentifier + 34, // 47: ic_ledger.pb.v1.Account.balance:type_name -> ic_ledger.pb.v1.Tokens + 45, // 48: ic_ledger.pb.v1.Transaction.burn:type_name -> ic_ledger.pb.v1.Burn + 44, // 49: ic_ledger.pb.v1.Transaction.mint:type_name -> ic_ledger.pb.v1.Mint + 41, // 50: ic_ledger.pb.v1.Transaction.send:type_name -> ic_ledger.pb.v1.Send + 48, // 51: ic_ledger.pb.v1.Transaction.memo:type_name -> ic_ledger.pb.v1.Memo + 49, // 52: ic_ledger.pb.v1.Transaction.icrc1_memo:type_name -> ic_ledger.pb.v1.Icrc1Memo + 36, // 53: ic_ledger.pb.v1.Transaction.created_at:type_name -> ic_ledger.pb.v1.BlockIndex + 50, // 54: ic_ledger.pb.v1.Transaction.created_at_time:type_name -> ic_ledger.pb.v1.TimeStamp + 46, // 55: ic_ledger.pb.v1.Send.from:type_name -> ic_ledger.pb.v1.AccountIdentifier + 46, // 56: ic_ledger.pb.v1.Send.to:type_name -> ic_ledger.pb.v1.AccountIdentifier + 34, // 57: ic_ledger.pb.v1.Send.amount:type_name -> ic_ledger.pb.v1.Tokens + 34, // 58: ic_ledger.pb.v1.Send.max_fee:type_name -> ic_ledger.pb.v1.Tokens + 43, // 59: ic_ledger.pb.v1.Send.approve:type_name -> ic_ledger.pb.v1.Approve + 42, // 60: ic_ledger.pb.v1.Send.transfer_from:type_name -> ic_ledger.pb.v1.TransferFrom + 46, // 61: ic_ledger.pb.v1.TransferFrom.spender:type_name -> ic_ledger.pb.v1.AccountIdentifier + 34, // 62: ic_ledger.pb.v1.Approve.allowance:type_name -> ic_ledger.pb.v1.Tokens + 50, // 63: ic_ledger.pb.v1.Approve.expires_at:type_name -> ic_ledger.pb.v1.TimeStamp + 34, // 64: ic_ledger.pb.v1.Approve.expected_allowance:type_name -> ic_ledger.pb.v1.Tokens + 46, // 65: ic_ledger.pb.v1.Mint.to:type_name -> ic_ledger.pb.v1.AccountIdentifier + 34, // 66: ic_ledger.pb.v1.Mint.amount:type_name -> ic_ledger.pb.v1.Tokens + 46, // 67: ic_ledger.pb.v1.Burn.from:type_name -> ic_ledger.pb.v1.AccountIdentifier + 34, // 68: ic_ledger.pb.v1.Burn.amount:type_name -> ic_ledger.pb.v1.Tokens + 46, // 69: ic_ledger.pb.v1.Burn.spender:type_name -> ic_ledger.pb.v1.AccountIdentifier + 34, // 70: ic_ledger.pb.v1.TransferFeeResponse.transfer_fee:type_name -> ic_ledger.pb.v1.Tokens + 54, // 71: ic_ledger.pb.v1.tui_signed_message:extendee -> google.protobuf.MessageOptions + 55, // 72: ic_ledger.pb.v1.tui_signed_display_q2_2021:extendee -> google.protobuf.FieldOptions + 73, // [73:73] is the sub-list for method output_type + 73, // [73:73] is the sub-list for method input_type + 73, // [73:73] is the sub-list for extension type_name + 71, // [71:73] is the sub-list for extension extendee + 0, // [0:71] is the sub-list for field type_name +} + +var file_ledger_proto_extTypes = []protoimpl.ExtensionInfo{ + { + ExtendedType: (*descriptorpb.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 20000, + Name: "ic_ledger.pb.v1.tui_signed_message", + Tag: "varint,20000,opt,name=tui_signed_message", + Filename: "ledger.proto", + }, + { + ExtendedType: (*descriptorpb.FieldOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 20001, + Name: "ic_ledger.pb.v1.tui_signed_display_q2_2021", + Tag: "varint,20001,opt,name=tui_signed_display_q2_2021", + Filename: "ledger.proto", + }, +} + +var file_ledger_proto_goTypes = []any{ + (*PrincipalId)(nil), // 0: ic_ledger.pb.v1.PrincipalId + (*LedgerInit)(nil), // 1: ic_ledger.pb.v1.LedgerInit + (*LedgerUpgrade)(nil), // 2: ic_ledger.pb.v1.LedgerUpgrade + (*SendRequest)(nil), // 3: ic_ledger.pb.v1.SendRequest + (*SendResponse)(nil), // 4: ic_ledger.pb.v1.SendResponse + (*NotifyRequest)(nil), // 5: ic_ledger.pb.v1.NotifyRequest + (*NotifyResponse)(nil), // 6: ic_ledger.pb.v1.NotifyResponse + (*TransactionNotificationRequest)(nil), // 7: ic_ledger.pb.v1.TransactionNotificationRequest + (*TransactionNotificationResponse)(nil), // 8: ic_ledger.pb.v1.TransactionNotificationResponse + (*CyclesNotificationResponse)(nil), // 9: ic_ledger.pb.v1.CyclesNotificationResponse + (*AccountBalanceRequest)(nil), // 10: ic_ledger.pb.v1.AccountBalanceRequest + (*AccountBalanceResponse)(nil), // 11: ic_ledger.pb.v1.AccountBalanceResponse + (*TipOfChainRequest)(nil), // 12: ic_ledger.pb.v1.TipOfChainRequest + (*TipOfChainResponse)(nil), // 13: ic_ledger.pb.v1.TipOfChainResponse + (*TotalSupplyRequest)(nil), // 14: ic_ledger.pb.v1.TotalSupplyRequest + (*TotalSupplyResponse)(nil), // 15: ic_ledger.pb.v1.TotalSupplyResponse + (*LedgerArchiveRequest)(nil), // 16: ic_ledger.pb.v1.LedgerArchiveRequest + (*BlockRequest)(nil), // 17: ic_ledger.pb.v1.BlockRequest + (*EncodedBlock)(nil), // 18: ic_ledger.pb.v1.EncodedBlock + (*BlockResponse)(nil), // 19: ic_ledger.pb.v1.BlockResponse + (*GetBlocksRequest)(nil), // 20: ic_ledger.pb.v1.GetBlocksRequest + (*Refund)(nil), // 21: ic_ledger.pb.v1.Refund + (*ToppedUp)(nil), // 22: ic_ledger.pb.v1.ToppedUp + (*EncodedBlocks)(nil), // 23: ic_ledger.pb.v1.EncodedBlocks + (*GetBlocksResponse)(nil), // 24: ic_ledger.pb.v1.GetBlocksResponse + (*IterBlocksRequest)(nil), // 25: ic_ledger.pb.v1.IterBlocksRequest + (*IterBlocksResponse)(nil), // 26: ic_ledger.pb.v1.IterBlocksResponse + (*ArchiveIndexEntry)(nil), // 27: ic_ledger.pb.v1.ArchiveIndexEntry + (*ArchiveIndexResponse)(nil), // 28: ic_ledger.pb.v1.ArchiveIndexResponse + (*ArchiveInit)(nil), // 29: ic_ledger.pb.v1.ArchiveInit + (*ArchiveAddRequest)(nil), // 30: ic_ledger.pb.v1.ArchiveAddRequest + (*ArchiveAddResponse)(nil), // 31: ic_ledger.pb.v1.ArchiveAddResponse + (*GetNodesRequest)(nil), // 32: ic_ledger.pb.v1.GetNodesRequest + (*GetNodesResponse)(nil), // 33: ic_ledger.pb.v1.GetNodesResponse + (*Tokens)(nil), // 34: ic_ledger.pb.v1.Tokens + (*Payment)(nil), // 35: ic_ledger.pb.v1.Payment + (*BlockIndex)(nil), // 36: ic_ledger.pb.v1.BlockIndex + (*Block)(nil), // 37: ic_ledger.pb.v1.Block + (*Hash)(nil), // 38: ic_ledger.pb.v1.Hash + (*Account)(nil), // 39: ic_ledger.pb.v1.Account + (*Transaction)(nil), // 40: ic_ledger.pb.v1.Transaction + (*Send)(nil), // 41: ic_ledger.pb.v1.Send + (*TransferFrom)(nil), // 42: ic_ledger.pb.v1.TransferFrom + (*Approve)(nil), // 43: ic_ledger.pb.v1.Approve + (*Mint)(nil), // 44: ic_ledger.pb.v1.Mint + (*Burn)(nil), // 45: ic_ledger.pb.v1.Burn + (*AccountIdentifier)(nil), // 46: ic_ledger.pb.v1.AccountIdentifier + (*Subaccount)(nil), // 47: ic_ledger.pb.v1.Subaccount + (*Memo)(nil), // 48: ic_ledger.pb.v1.Memo + (*Icrc1Memo)(nil), // 49: ic_ledger.pb.v1.Icrc1Memo + (*TimeStamp)(nil), // 50: ic_ledger.pb.v1.TimeStamp + (*Certification)(nil), // 51: ic_ledger.pb.v1.Certification + (*TransferFeeRequest)(nil), // 52: ic_ledger.pb.v1.TransferFeeRequest + (*TransferFeeResponse)(nil), // 53: ic_ledger.pb.v1.TransferFeeResponse + (*descriptorpb.MessageOptions)(nil), // 54: google.protobuf.MessageOptions + (*descriptorpb.FieldOptions)(nil), // 55: google.protobuf.FieldOptions +} + +var file_ledger_proto_msgTypes = make([]protoimpl.MessageInfo, 54) + +var file_ledger_proto_rawDesc = []byte{ + 0x0a, 0x0c, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, + 0x69, 0x63, 0x5f, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x2e, 0x70, 0x62, 0x2e, 0x76, 0x31, 0x1a, + 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0x3e, 0x0a, 0x0b, 0x50, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x49, 0x64, + 0x12, 0x29, 0x0a, 0x0d, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x5f, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x04, 0x88, 0xe2, 0x09, 0x01, 0x52, 0x0c, 0x73, + 0x65, 0x72, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x49, 0x64, 0x3a, 0x04, 0x80, 0xe2, 0x09, + 0x01, 0x22, 0x98, 0x02, 0x0a, 0x0a, 0x4c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x49, 0x6e, 0x69, 0x74, + 0x12, 0x4b, 0x0a, 0x0f, 0x6d, 0x69, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x61, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x69, 0x63, 0x5f, 0x6c, + 0x65, 0x64, 0x67, 0x65, 0x72, 0x2e, 0x70, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 0x0e, 0x6d, + 0x69, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x3f, 0x0a, + 0x0e, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x69, 0x63, 0x5f, 0x6c, 0x65, 0x64, 0x67, 0x65, + 0x72, 0x2e, 0x70, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, + 0x0d, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x47, + 0x0a, 0x10, 0x61, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x5f, 0x63, 0x61, 0x6e, 0x69, 0x73, 0x74, + 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x69, 0x63, 0x5f, 0x6c, 0x65, + 0x64, 0x67, 0x65, 0x72, 0x2e, 0x70, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x69, 0x6e, 0x63, + 0x69, 0x70, 0x61, 0x6c, 0x49, 0x64, 0x52, 0x0f, 0x61, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x43, + 0x61, 0x6e, 0x69, 0x73, 0x74, 0x65, 0x72, 0x12, 0x33, 0x0a, 0x16, 0x6d, 0x61, 0x78, 0x5f, 0x6d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x62, 0x79, 0x74, 0x65, + 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x13, 0x6d, 0x61, 0x78, 0x4d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x42, 0x79, 0x74, 0x65, 0x73, 0x22, 0x0f, 0x0a, 0x0d, + 0x4c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x22, 0xbc, 0x03, + 0x0a, 0x0b, 0x53, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2f, 0x0a, + 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x69, 0x63, + 0x5f, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x2e, 0x70, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, + 0x6d, 0x6f, 0x42, 0x04, 0x88, 0xe2, 0x09, 0x01, 0x52, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x12, 0x38, + 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x18, 0x2e, 0x69, 0x63, 0x5f, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x2e, 0x70, 0x62, 0x2e, 0x76, + 0x31, 0x2e, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x04, 0x88, 0xe2, 0x09, 0x01, 0x52, + 0x07, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x36, 0x0a, 0x07, 0x6d, 0x61, 0x78, 0x5f, + 0x66, 0x65, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x69, 0x63, 0x5f, 0x6c, + 0x65, 0x64, 0x67, 0x65, 0x72, 0x2e, 0x70, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x6f, 0x6b, 0x65, + 0x6e, 0x73, 0x42, 0x04, 0x88, 0xe2, 0x09, 0x01, 0x52, 0x06, 0x6d, 0x61, 0x78, 0x46, 0x65, 0x65, + 0x12, 0x4a, 0x0a, 0x0f, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x69, 0x63, 0x5f, 0x6c, + 0x65, 0x64, 0x67, 0x65, 0x72, 0x2e, 0x70, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x61, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x04, 0x88, 0xe2, 0x09, 0x01, 0x52, 0x0e, 0x66, 0x72, + 0x6f, 0x6d, 0x53, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x38, 0x0a, 0x02, + 0x74, 0x6f, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x69, 0x63, 0x5f, 0x6c, 0x65, + 0x64, 0x67, 0x65, 0x72, 0x2e, 0x70, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x42, 0x04, 0x88, 0xe2, + 0x09, 0x01, 0x52, 0x02, 0x74, 0x6f, 0x12, 0x3a, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x64, 0x5f, 0x61, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x69, 0x63, 0x5f, + 0x6c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x2e, 0x70, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6c, 0x6f, + 0x63, 0x6b, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, + 0x41, 0x74, 0x12, 0x42, 0x0a, 0x0f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, + 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x69, 0x63, + 0x5f, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x2e, 0x70, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x69, + 0x6d, 0x65, 0x53, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0d, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, + 0x41, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x3a, 0x04, 0x80, 0xe2, 0x09, 0x01, 0x22, 0x56, 0x0a, 0x0c, + 0x53, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x46, 0x0a, 0x10, + 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x69, 0x63, 0x5f, 0x6c, 0x65, 0x64, 0x67, + 0x65, 0x72, 0x2e, 0x70, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x6e, + 0x64, 0x65, 0x78, 0x52, 0x0f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x69, 0x6e, 0x67, 0x48, 0x65, + 0x69, 0x67, 0x68, 0x74, 0x22, 0xec, 0x02, 0x0a, 0x0d, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x44, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, + 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x69, + 0x63, 0x5f, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x2e, 0x70, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x42, + 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x42, 0x04, 0x88, 0xe2, 0x09, 0x01, 0x52, + 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x36, 0x0a, 0x07, + 0x6d, 0x61, 0x78, 0x5f, 0x66, 0x65, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, + 0x69, 0x63, 0x5f, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x2e, 0x70, 0x62, 0x2e, 0x76, 0x31, 0x2e, + 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x42, 0x04, 0x88, 0xe2, 0x09, 0x01, 0x52, 0x06, 0x6d, 0x61, + 0x78, 0x46, 0x65, 0x65, 0x12, 0x4a, 0x0a, 0x0f, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x73, 0x75, 0x62, + 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, + 0x69, 0x63, 0x5f, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x2e, 0x70, 0x62, 0x2e, 0x76, 0x31, 0x2e, + 0x53, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x04, 0x88, 0xe2, 0x09, 0x01, + 0x52, 0x0e, 0x66, 0x72, 0x6f, 0x6d, 0x53, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x12, 0x43, 0x0a, 0x0b, 0x74, 0x6f, 0x5f, 0x63, 0x61, 0x6e, 0x69, 0x73, 0x74, 0x65, 0x72, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x69, 0x63, 0x5f, 0x6c, 0x65, 0x64, 0x67, 0x65, + 0x72, 0x2e, 0x70, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, + 0x6c, 0x49, 0x64, 0x42, 0x04, 0x88, 0xe2, 0x09, 0x01, 0x52, 0x0a, 0x74, 0x6f, 0x43, 0x61, 0x6e, + 0x69, 0x73, 0x74, 0x65, 0x72, 0x12, 0x46, 0x0a, 0x0d, 0x74, 0x6f, 0x5f, 0x73, 0x75, 0x62, 0x61, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x69, + 0x63, 0x5f, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x2e, 0x70, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x53, + 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x04, 0x88, 0xe2, 0x09, 0x01, 0x52, + 0x0c, 0x74, 0x6f, 0x53, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x3a, 0x04, 0x80, + 0xe2, 0x09, 0x01, 0x22, 0x10, 0x0a, 0x0e, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xa4, 0x03, 0x0a, 0x1e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x30, 0x0a, 0x04, 0x66, 0x72, 0x6f, 0x6d, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x69, 0x63, 0x5f, 0x6c, 0x65, 0x64, 0x67, + 0x65, 0x72, 0x2e, 0x70, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, + 0x61, 0x6c, 0x49, 0x64, 0x52, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x12, 0x44, 0x0a, 0x0f, 0x66, 0x72, + 0x6f, 0x6d, 0x5f, 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x69, 0x63, 0x5f, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x2e, + 0x70, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x52, 0x0e, 0x66, 0x72, 0x6f, 0x6d, 0x53, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x12, 0x2c, 0x0a, 0x02, 0x74, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x69, + 0x63, 0x5f, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x2e, 0x70, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x50, + 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x49, 0x64, 0x52, 0x02, 0x74, 0x6f, 0x12, 0x40, + 0x0a, 0x0d, 0x74, 0x6f, 0x5f, 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x69, 0x63, 0x5f, 0x6c, 0x65, 0x64, 0x67, 0x65, + 0x72, 0x2e, 0x70, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x52, 0x0c, 0x74, 0x6f, 0x53, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x12, 0x3e, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x69, 0x63, 0x5f, 0x6c, 0x65, 0x64, 0x67, + 0x65, 0x72, 0x2e, 0x70, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x6e, + 0x64, 0x65, 0x78, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, + 0x12, 0x2f, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x17, 0x2e, 0x69, 0x63, 0x5f, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x2e, 0x70, 0x62, 0x2e, + 0x76, 0x31, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, + 0x74, 0x12, 0x29, 0x0a, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x15, 0x2e, 0x69, 0x63, 0x5f, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x2e, 0x70, 0x62, 0x2e, 0x76, + 0x31, 0x2e, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x22, 0x3d, 0x0a, 0x1f, + 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x69, 0x66, + 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xe5, 0x01, 0x0a, 0x1a, + 0x43, 0x79, 0x63, 0x6c, 0x65, 0x73, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4e, 0x0a, 0x13, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x63, 0x61, 0x6e, 0x69, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x69, 0x63, 0x5f, 0x6c, 0x65, 0x64, + 0x67, 0x65, 0x72, 0x2e, 0x70, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x69, 0x6e, 0x63, 0x69, + 0x70, 0x61, 0x6c, 0x49, 0x64, 0x48, 0x00, 0x52, 0x11, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, + 0x43, 0x61, 0x6e, 0x69, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, 0x31, 0x0a, 0x06, 0x72, 0x65, + 0x66, 0x75, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x69, 0x63, 0x5f, + 0x6c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x2e, 0x70, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x66, + 0x75, 0x6e, 0x64, 0x48, 0x00, 0x52, 0x06, 0x72, 0x65, 0x66, 0x75, 0x6e, 0x64, 0x12, 0x38, 0x0a, + 0x09, 0x74, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x5f, 0x75, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x19, 0x2e, 0x69, 0x63, 0x5f, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x2e, 0x70, 0x62, 0x2e, + 0x76, 0x31, 0x2e, 0x54, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x55, 0x70, 0x48, 0x00, 0x52, 0x08, 0x74, + 0x6f, 0x70, 0x70, 0x65, 0x64, 0x55, 0x70, 0x42, 0x0a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x55, 0x0a, 0x15, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x61, + 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3c, 0x0a, 0x07, + 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, + 0x69, 0x63, 0x5f, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x2e, 0x70, 0x62, 0x2e, 0x76, 0x31, 0x2e, + 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, + 0x72, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x4b, 0x0a, 0x16, 0x41, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x31, 0x0a, 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x69, 0x63, 0x5f, 0x6c, 0x65, 0x64, 0x67, 0x65, + 0x72, 0x2e, 0x70, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x07, + 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x22, 0x13, 0x0a, 0x11, 0x54, 0x69, 0x70, 0x4f, 0x66, + 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x9a, 0x01, 0x0a, + 0x12, 0x54, 0x69, 0x70, 0x4f, 0x66, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x44, 0x0a, 0x0d, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x69, 0x63, 0x5f, + 0x6c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x2e, 0x70, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x65, 0x72, + 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x63, 0x65, 0x72, 0x74, + 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3e, 0x0a, 0x0c, 0x63, 0x68, 0x61, + 0x69, 0x6e, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1b, 0x2e, 0x69, 0x63, 0x5f, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x2e, 0x70, 0x62, 0x2e, 0x76, + 0x31, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x0b, 0x63, 0x68, + 0x61, 0x69, 0x6e, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0x14, 0x0a, 0x12, 0x54, 0x6f, 0x74, + 0x61, 0x6c, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, + 0x51, 0x0a, 0x13, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x79, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x0c, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, + 0x73, 0x75, 0x70, 0x70, 0x6c, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x69, + 0x63, 0x5f, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x2e, 0x70, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x54, + 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x75, 0x70, 0x70, + 0x6c, 0x79, 0x22, 0x50, 0x0a, 0x14, 0x4c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x41, 0x72, 0x63, 0x68, + 0x69, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x69, 0x63, 0x5f, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x2e, 0x70, 0x62, 0x2e, 0x76, 0x31, 0x2e, + 0x54, 0x69, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x22, 0x31, 0x0a, 0x0c, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x65, + 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, + 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x24, 0x0a, 0x0c, 0x45, 0x6e, 0x63, 0x6f, 0x64, + 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x22, 0x98, 0x01, + 0x0a, 0x0d, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x35, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, + 0x2e, 0x69, 0x63, 0x5f, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x2e, 0x70, 0x62, 0x2e, 0x76, 0x31, + 0x2e, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x00, 0x52, + 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x3f, 0x0a, 0x0b, 0x63, 0x61, 0x6e, 0x69, 0x73, 0x74, + 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x69, 0x63, + 0x5f, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x2e, 0x70, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, + 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x49, 0x64, 0x48, 0x00, 0x52, 0x0a, 0x63, 0x61, 0x6e, + 0x69, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x42, 0x0f, 0x0a, 0x0d, 0x62, 0x6c, 0x6f, 0x63, 0x6b, + 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x40, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x42, + 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, + 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x73, 0x74, 0x61, + 0x72, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0x53, 0x0a, 0x06, 0x52, 0x65, + 0x66, 0x75, 0x6e, 0x64, 0x12, 0x33, 0x0a, 0x06, 0x72, 0x65, 0x66, 0x75, 0x6e, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x69, 0x63, 0x5f, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x72, + 0x2e, 0x70, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x6e, 0x64, 0x65, + 0x78, 0x52, 0x06, 0x72, 0x65, 0x66, 0x75, 0x6e, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, + 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, + 0x0a, 0x0a, 0x08, 0x54, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x55, 0x70, 0x22, 0x46, 0x0a, 0x0d, 0x45, + 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x35, 0x0a, 0x06, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x69, + 0x63, 0x5f, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x2e, 0x70, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x45, + 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x06, 0x62, 0x6c, 0x6f, + 0x63, 0x6b, 0x73, 0x22, 0x7b, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x06, 0x62, 0x6c, 0x6f, 0x63, + 0x6b, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x69, 0x63, 0x5f, 0x6c, 0x65, + 0x64, 0x67, 0x65, 0x72, 0x2e, 0x70, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x63, 0x6f, 0x64, + 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x48, 0x00, 0x52, 0x06, 0x62, 0x6c, 0x6f, 0x63, + 0x6b, 0x73, 0x12, 0x16, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x48, 0x00, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x42, 0x14, 0x0a, 0x12, 0x67, 0x65, + 0x74, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, + 0x22, 0x41, 0x0a, 0x11, 0x49, 0x74, 0x65, 0x72, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6c, + 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x6c, 0x65, 0x6e, + 0x67, 0x74, 0x68, 0x22, 0x4b, 0x0a, 0x12, 0x49, 0x74, 0x65, 0x72, 0x42, 0x6c, 0x6f, 0x63, 0x6b, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x06, 0x62, 0x6c, 0x6f, + 0x63, 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x69, 0x63, 0x5f, 0x6c, + 0x65, 0x64, 0x67, 0x65, 0x72, 0x2e, 0x70, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x63, 0x6f, + 0x64, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x06, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, + 0x22, 0x90, 0x01, 0x0a, 0x11, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x49, 0x6e, 0x64, 0x65, + 0x78, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x1f, 0x0a, 0x0b, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, + 0x5f, 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x68, 0x65, 0x69, + 0x67, 0x68, 0x74, 0x46, 0x72, 0x6f, 0x6d, 0x12, 0x1b, 0x0a, 0x09, 0x68, 0x65, 0x69, 0x67, 0x68, + 0x74, 0x5f, 0x74, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x68, 0x65, 0x69, 0x67, + 0x68, 0x74, 0x54, 0x6f, 0x12, 0x3d, 0x0a, 0x0b, 0x63, 0x61, 0x6e, 0x69, 0x73, 0x74, 0x65, 0x72, + 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x69, 0x63, 0x5f, 0x6c, + 0x65, 0x64, 0x67, 0x65, 0x72, 0x2e, 0x70, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x69, 0x6e, + 0x63, 0x69, 0x70, 0x61, 0x6c, 0x49, 0x64, 0x52, 0x0a, 0x63, 0x61, 0x6e, 0x69, 0x73, 0x74, 0x65, + 0x72, 0x49, 0x64, 0x22, 0x54, 0x0a, 0x14, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x49, 0x6e, + 0x64, 0x65, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3c, 0x0a, 0x07, 0x65, + 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x69, + 0x63, 0x5f, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x2e, 0x70, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x41, + 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x52, 0x07, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x22, 0x7e, 0x0a, 0x0b, 0x41, 0x72, 0x63, + 0x68, 0x69, 0x76, 0x65, 0x49, 0x6e, 0x69, 0x74, 0x12, 0x3a, 0x0a, 0x1a, 0x6e, 0x6f, 0x64, 0x65, + 0x5f, 0x6d, 0x61, 0x78, 0x5f, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x5f, 0x73, 0x69, 0x7a, 0x65, + 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x16, 0x6e, 0x6f, + 0x64, 0x65, 0x4d, 0x61, 0x78, 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x53, 0x69, 0x7a, 0x65, 0x42, + 0x79, 0x74, 0x65, 0x73, 0x12, 0x33, 0x0a, 0x16, 0x6d, 0x61, 0x78, 0x5f, 0x6d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0d, 0x52, 0x13, 0x6d, 0x61, 0x78, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x53, 0x69, 0x7a, 0x65, 0x42, 0x79, 0x74, 0x65, 0x73, 0x22, 0x43, 0x0a, 0x11, 0x41, 0x72, 0x63, + 0x68, 0x69, 0x76, 0x65, 0x41, 0x64, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2e, + 0x0a, 0x06, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, + 0x2e, 0x69, 0x63, 0x5f, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x2e, 0x70, 0x62, 0x2e, 0x76, 0x31, + 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x06, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x22, 0x14, + 0x0a, 0x12, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x41, 0x64, 0x64, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x11, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x46, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x4e, 0x6f, + 0x64, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x05, 0x6e, + 0x6f, 0x64, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x69, 0x63, 0x5f, + 0x6c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x2e, 0x70, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x69, + 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x49, 0x64, 0x52, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x22, + 0x26, 0x0a, 0x06, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x12, 0x16, 0x0a, 0x03, 0x65, 0x38, 0x73, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x04, 0x88, 0xe2, 0x09, 0x01, 0x52, 0x03, 0x65, 0x38, + 0x73, 0x3a, 0x04, 0x80, 0xe2, 0x09, 0x01, 0x22, 0x53, 0x0a, 0x07, 0x50, 0x61, 0x79, 0x6d, 0x65, + 0x6e, 0x74, 0x12, 0x42, 0x0a, 0x0d, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x5f, 0x67, + 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x69, 0x63, 0x5f, 0x6c, + 0x65, 0x64, 0x67, 0x65, 0x72, 0x2e, 0x70, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x6f, 0x6b, 0x65, + 0x6e, 0x73, 0x42, 0x04, 0x88, 0xe2, 0x09, 0x01, 0x52, 0x0c, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, + 0x65, 0x72, 0x47, 0x65, 0x74, 0x73, 0x3a, 0x04, 0x80, 0xe2, 0x09, 0x01, 0x22, 0x30, 0x0a, 0x0a, + 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x1c, 0x0a, 0x06, 0x68, 0x65, + 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x04, 0x88, 0xe2, 0x09, 0x01, + 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x3a, 0x04, 0x80, 0xe2, 0x09, 0x01, 0x22, 0xb9, + 0x01, 0x0a, 0x05, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x36, 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x65, + 0x6e, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, + 0x69, 0x63, 0x5f, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x2e, 0x70, 0x62, 0x2e, 0x76, 0x31, 0x2e, + 0x48, 0x61, 0x73, 0x68, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, + 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x69, 0x63, 0x5f, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x2e, + 0x70, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x6d, 0x70, 0x52, + 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x3e, 0x0a, 0x0b, 0x74, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1c, 0x2e, 0x69, 0x63, 0x5f, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x2e, 0x70, 0x62, 0x2e, 0x76, + 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x74, + 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x1a, 0x0a, 0x04, 0x48, 0x61, + 0x73, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x22, 0x80, 0x01, 0x0a, 0x07, 0x41, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x12, 0x42, 0x0a, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x69, 0x63, 0x5f, 0x6c, 0x65, 0x64, 0x67, + 0x65, 0x72, 0x2e, 0x70, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 0x0a, 0x69, 0x64, 0x65, 0x6e, + 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x31, 0x0a, 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x69, 0x63, 0x5f, 0x6c, 0x65, 0x64, + 0x67, 0x65, 0x72, 0x2e, 0x70, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, + 0x52, 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x22, 0x86, 0x03, 0x0a, 0x0b, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2b, 0x0a, 0x04, 0x62, 0x75, 0x72, + 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x69, 0x63, 0x5f, 0x6c, 0x65, 0x64, + 0x67, 0x65, 0x72, 0x2e, 0x70, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x72, 0x6e, 0x48, 0x00, + 0x52, 0x04, 0x62, 0x75, 0x72, 0x6e, 0x12, 0x2b, 0x0a, 0x04, 0x6d, 0x69, 0x6e, 0x74, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x69, 0x63, 0x5f, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x72, + 0x2e, 0x70, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x69, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x04, 0x6d, + 0x69, 0x6e, 0x74, 0x12, 0x2b, 0x0a, 0x04, 0x73, 0x65, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x15, 0x2e, 0x69, 0x63, 0x5f, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x2e, 0x70, 0x62, + 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x48, 0x00, 0x52, 0x04, 0x73, 0x65, 0x6e, 0x64, + 0x12, 0x29, 0x0a, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, + 0x2e, 0x69, 0x63, 0x5f, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x2e, 0x70, 0x62, 0x2e, 0x76, 0x31, + 0x2e, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x12, 0x39, 0x0a, 0x0a, 0x69, + 0x63, 0x72, 0x63, 0x31, 0x5f, 0x6d, 0x65, 0x6d, 0x6f, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x69, 0x63, 0x5f, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x2e, 0x70, 0x62, 0x2e, 0x76, + 0x31, 0x2e, 0x49, 0x63, 0x72, 0x63, 0x31, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x09, 0x69, 0x63, 0x72, + 0x63, 0x31, 0x4d, 0x65, 0x6d, 0x6f, 0x12, 0x3a, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x64, 0x5f, 0x61, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x69, 0x63, 0x5f, + 0x6c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x2e, 0x70, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6c, 0x6f, + 0x63, 0x6b, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, + 0x41, 0x74, 0x12, 0x42, 0x0a, 0x0f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, + 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x69, 0x63, + 0x5f, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x2e, 0x70, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x69, + 0x6d, 0x65, 0x53, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0d, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, + 0x41, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x42, 0x0a, 0x0a, 0x08, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, + 0x65, 0x72, 0x22, 0xde, 0x02, 0x0a, 0x04, 0x53, 0x65, 0x6e, 0x64, 0x12, 0x36, 0x0a, 0x04, 0x66, + 0x72, 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x69, 0x63, 0x5f, 0x6c, + 0x65, 0x64, 0x67, 0x65, 0x72, 0x2e, 0x70, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 0x04, 0x66, + 0x72, 0x6f, 0x6d, 0x12, 0x32, 0x0a, 0x02, 0x74, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x22, 0x2e, 0x69, 0x63, 0x5f, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x2e, 0x70, 0x62, 0x2e, 0x76, + 0x31, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, + 0x69, 0x65, 0x72, 0x52, 0x02, 0x74, 0x6f, 0x12, 0x2f, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, + 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x69, 0x63, 0x5f, 0x6c, 0x65, 0x64, + 0x67, 0x65, 0x72, 0x2e, 0x70, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, + 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x30, 0x0a, 0x07, 0x6d, 0x61, 0x78, 0x5f, + 0x66, 0x65, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x69, 0x63, 0x5f, 0x6c, + 0x65, 0x64, 0x67, 0x65, 0x72, 0x2e, 0x70, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x6f, 0x6b, 0x65, + 0x6e, 0x73, 0x52, 0x06, 0x6d, 0x61, 0x78, 0x46, 0x65, 0x65, 0x12, 0x34, 0x0a, 0x07, 0x61, 0x70, + 0x70, 0x72, 0x6f, 0x76, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x69, 0x63, + 0x5f, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x2e, 0x70, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x70, + 0x70, 0x72, 0x6f, 0x76, 0x65, 0x48, 0x00, 0x52, 0x07, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, + 0x12, 0x44, 0x0a, 0x0d, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x5f, 0x66, 0x72, 0x6f, + 0x6d, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x69, 0x63, 0x5f, 0x6c, 0x65, 0x64, + 0x67, 0x65, 0x72, 0x2e, 0x70, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, + 0x65, 0x72, 0x46, 0x72, 0x6f, 0x6d, 0x48, 0x00, 0x52, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, + 0x65, 0x72, 0x46, 0x72, 0x6f, 0x6d, 0x42, 0x0b, 0x0a, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x22, 0x4c, 0x0a, 0x0c, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x46, + 0x72, 0x6f, 0x6d, 0x12, 0x3c, 0x0a, 0x07, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x69, 0x63, 0x5f, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x72, + 0x2e, 0x70, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, + 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 0x07, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x65, + 0x72, 0x22, 0xc3, 0x01, 0x0a, 0x07, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x12, 0x35, 0x0a, + 0x09, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x17, 0x2e, 0x69, 0x63, 0x5f, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x2e, 0x70, 0x62, 0x2e, + 0x76, 0x31, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x09, 0x61, 0x6c, 0x6c, 0x6f, 0x77, + 0x61, 0x6e, 0x63, 0x65, 0x12, 0x39, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x5f, + 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x69, 0x63, 0x5f, 0x6c, 0x65, + 0x64, 0x67, 0x65, 0x72, 0x2e, 0x70, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x53, + 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x41, 0x74, 0x12, + 0x46, 0x0a, 0x12, 0x65, 0x78, 0x70, 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x6c, 0x6c, 0x6f, + 0x77, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x69, 0x63, + 0x5f, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x2e, 0x70, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x6f, + 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x11, 0x65, 0x78, 0x70, 0x65, 0x63, 0x74, 0x65, 0x64, 0x41, 0x6c, + 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x22, 0x6b, 0x0a, 0x04, 0x4d, 0x69, 0x6e, 0x74, 0x12, + 0x32, 0x0a, 0x02, 0x74, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x69, 0x63, + 0x5f, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x2e, 0x70, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, + 0x02, 0x74, 0x6f, 0x12, 0x2f, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x69, 0x63, 0x5f, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x2e, + 0x70, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x06, 0x61, 0x6d, + 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xad, 0x01, 0x0a, 0x04, 0x42, 0x75, 0x72, 0x6e, 0x12, 0x36, 0x0a, + 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x69, 0x63, + 0x5f, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x2e, 0x70, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, + 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x12, 0x2f, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x69, 0x63, 0x5f, 0x6c, 0x65, 0x64, 0x67, 0x65, + 0x72, 0x2e, 0x70, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x06, + 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x3c, 0x0a, 0x07, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x65, + 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x69, 0x63, 0x5f, 0x6c, 0x65, 0x64, + 0x67, 0x65, 0x72, 0x2e, 0x70, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 0x07, 0x73, 0x70, 0x65, + 0x6e, 0x64, 0x65, 0x72, 0x22, 0x33, 0x0a, 0x11, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, + 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x04, 0x68, 0x61, 0x73, + 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x04, 0x88, 0xe2, 0x09, 0x01, 0x52, 0x04, 0x68, + 0x61, 0x73, 0x68, 0x3a, 0x04, 0x80, 0xe2, 0x09, 0x01, 0x22, 0x39, 0x0a, 0x0a, 0x53, 0x75, 0x62, + 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x25, 0x0a, 0x0b, 0x73, 0x75, 0x62, 0x5f, 0x61, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x04, 0x88, 0xe2, + 0x09, 0x01, 0x52, 0x0a, 0x73, 0x75, 0x62, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x3a, 0x04, + 0x80, 0xe2, 0x09, 0x01, 0x22, 0x26, 0x0a, 0x04, 0x4d, 0x65, 0x6d, 0x6f, 0x12, 0x18, 0x0a, 0x04, + 0x6d, 0x65, 0x6d, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x04, 0x88, 0xe2, 0x09, 0x01, + 0x52, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x3a, 0x04, 0x80, 0xe2, 0x09, 0x01, 0x22, 0x2b, 0x0a, 0x09, + 0x49, 0x63, 0x72, 0x63, 0x31, 0x4d, 0x65, 0x6d, 0x6f, 0x12, 0x18, 0x0a, 0x04, 0x6d, 0x65, 0x6d, + 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x04, 0x88, 0xe2, 0x09, 0x01, 0x52, 0x04, 0x6d, + 0x65, 0x6d, 0x6f, 0x3a, 0x04, 0x80, 0xe2, 0x09, 0x01, 0x22, 0x34, 0x0a, 0x09, 0x54, 0x69, 0x6d, + 0x65, 0x53, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x27, 0x0a, 0x0f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x5f, 0x6e, 0x61, 0x6e, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x0e, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x4e, 0x61, 0x6e, 0x6f, 0x73, 0x22, + 0x35, 0x0a, 0x0d, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x24, 0x0a, 0x0d, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x14, 0x0a, 0x12, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, + 0x65, 0x72, 0x46, 0x65, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x51, 0x0a, 0x13, + 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x46, 0x65, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x5f, + 0x66, 0x65, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x69, 0x63, 0x5f, 0x6c, + 0x65, 0x64, 0x67, 0x65, 0x72, 0x2e, 0x70, 0x62, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x6f, 0x6b, 0x65, + 0x6e, 0x73, 0x52, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x46, 0x65, 0x65, 0x3a, + 0x4f, 0x0a, 0x12, 0x74, 0x75, 0x69, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, 0x6d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xa0, 0x9c, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, + 0x74, 0x75, 0x69, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x3a, 0x5b, 0x0a, 0x1a, 0x74, 0x75, 0x69, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, 0x64, + 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x71, 0x32, 0x5f, 0x32, 0x30, 0x32, 0x31, 0x12, 0x1d, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xa1, 0x9c, + 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x16, 0x74, 0x75, 0x69, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, + 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x51, 0x32, 0x32, 0x30, 0x32, 0x31, 0x42, 0x0a, 0x5a, + 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +func file_ledger_proto_init() { + if File_ledger_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_ledger_proto_msgTypes[0].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_ledger_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*LedgerInit); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ledger_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*LedgerUpgrade); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ledger_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*SendRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ledger_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*SendResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ledger_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*NotifyRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ledger_proto_msgTypes[6].Exporter = func(v any, i int) any { + switch v := v.(*NotifyResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ledger_proto_msgTypes[7].Exporter = func(v any, i int) any { + switch v := v.(*TransactionNotificationRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ledger_proto_msgTypes[8].Exporter = func(v any, i int) any { + switch v := v.(*TransactionNotificationResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ledger_proto_msgTypes[9].Exporter = func(v any, i int) any { + switch v := v.(*CyclesNotificationResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ledger_proto_msgTypes[10].Exporter = func(v any, i int) any { + switch v := v.(*AccountBalanceRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ledger_proto_msgTypes[11].Exporter = func(v any, i int) any { + switch v := v.(*AccountBalanceResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ledger_proto_msgTypes[12].Exporter = func(v any, i int) any { + switch v := v.(*TipOfChainRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ledger_proto_msgTypes[13].Exporter = func(v any, i int) any { + switch v := v.(*TipOfChainResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ledger_proto_msgTypes[14].Exporter = func(v any, i int) any { + switch v := v.(*TotalSupplyRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ledger_proto_msgTypes[15].Exporter = func(v any, i int) any { + switch v := v.(*TotalSupplyResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ledger_proto_msgTypes[16].Exporter = func(v any, i int) any { + switch v := v.(*LedgerArchiveRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ledger_proto_msgTypes[17].Exporter = func(v any, i int) any { + switch v := v.(*BlockRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ledger_proto_msgTypes[18].Exporter = func(v any, i int) any { + switch v := v.(*EncodedBlock); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ledger_proto_msgTypes[19].Exporter = func(v any, i int) any { + switch v := v.(*BlockResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ledger_proto_msgTypes[20].Exporter = func(v any, i int) any { + switch v := v.(*GetBlocksRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ledger_proto_msgTypes[21].Exporter = func(v any, i int) any { + switch v := v.(*Refund); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ledger_proto_msgTypes[22].Exporter = func(v any, i int) any { + switch v := v.(*ToppedUp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ledger_proto_msgTypes[23].Exporter = func(v any, i int) any { + switch v := v.(*EncodedBlocks); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ledger_proto_msgTypes[24].Exporter = func(v any, i int) any { + switch v := v.(*GetBlocksResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ledger_proto_msgTypes[25].Exporter = func(v any, i int) any { + switch v := v.(*IterBlocksRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ledger_proto_msgTypes[26].Exporter = func(v any, i int) any { + switch v := v.(*IterBlocksResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ledger_proto_msgTypes[27].Exporter = func(v any, i int) any { + switch v := v.(*ArchiveIndexEntry); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ledger_proto_msgTypes[28].Exporter = func(v any, i int) any { + switch v := v.(*ArchiveIndexResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ledger_proto_msgTypes[29].Exporter = func(v any, i int) any { + switch v := v.(*ArchiveInit); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ledger_proto_msgTypes[30].Exporter = func(v any, i int) any { + switch v := v.(*ArchiveAddRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ledger_proto_msgTypes[31].Exporter = func(v any, i int) any { + switch v := v.(*ArchiveAddResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ledger_proto_msgTypes[32].Exporter = func(v any, i int) any { + switch v := v.(*GetNodesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ledger_proto_msgTypes[33].Exporter = func(v any, i int) any { + switch v := v.(*GetNodesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ledger_proto_msgTypes[34].Exporter = func(v any, i int) any { + switch v := v.(*Tokens); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ledger_proto_msgTypes[35].Exporter = func(v any, i int) any { + switch v := v.(*Payment); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ledger_proto_msgTypes[36].Exporter = func(v any, i int) any { + switch v := v.(*BlockIndex); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ledger_proto_msgTypes[37].Exporter = func(v any, i int) any { + switch v := v.(*Block); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ledger_proto_msgTypes[38].Exporter = func(v any, i int) any { + switch v := v.(*Hash); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ledger_proto_msgTypes[39].Exporter = func(v any, i int) any { + switch v := v.(*Account); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ledger_proto_msgTypes[40].Exporter = func(v any, i int) any { + switch v := v.(*Transaction); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ledger_proto_msgTypes[41].Exporter = func(v any, i int) any { + switch v := v.(*Send); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ledger_proto_msgTypes[42].Exporter = func(v any, i int) any { + switch v := v.(*TransferFrom); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ledger_proto_msgTypes[43].Exporter = func(v any, i int) any { + switch v := v.(*Approve); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ledger_proto_msgTypes[44].Exporter = func(v any, i int) any { + switch v := v.(*Mint); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ledger_proto_msgTypes[45].Exporter = func(v any, i int) any { + switch v := v.(*Burn); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ledger_proto_msgTypes[46].Exporter = func(v any, i int) any { + switch v := v.(*AccountIdentifier); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ledger_proto_msgTypes[47].Exporter = func(v any, i int) any { + switch v := v.(*Subaccount); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ledger_proto_msgTypes[48].Exporter = func(v any, i int) any { + switch v := v.(*Memo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ledger_proto_msgTypes[49].Exporter = func(v any, i int) any { + switch v := v.(*Icrc1Memo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ledger_proto_msgTypes[50].Exporter = func(v any, i int) any { + switch v := v.(*TimeStamp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ledger_proto_msgTypes[51].Exporter = func(v any, i int) any { + switch v := v.(*Certification); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ledger_proto_msgTypes[52].Exporter = func(v any, i int) any { + switch v := v.(*TransferFeeRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ledger_proto_msgTypes[53].Exporter = func(v any, i int) any { + switch v := v.(*TransferFeeResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_ledger_proto_msgTypes[9].OneofWrappers = []any{ + (*CyclesNotificationResponse_CreatedCanisterId)(nil), + (*CyclesNotificationResponse_Refund)(nil), + (*CyclesNotificationResponse_ToppedUp)(nil), + } + file_ledger_proto_msgTypes[19].OneofWrappers = []any{ + (*BlockResponse_Block)(nil), + (*BlockResponse_CanisterId)(nil), + } + file_ledger_proto_msgTypes[24].OneofWrappers = []any{ + (*GetBlocksResponse_Blocks)(nil), + (*GetBlocksResponse_Error)(nil), + } + file_ledger_proto_msgTypes[40].OneofWrappers = []any{ + (*Transaction_Burn)(nil), + (*Transaction_Mint)(nil), + (*Transaction_Send)(nil), + } + file_ledger_proto_msgTypes[41].OneofWrappers = []any{ + (*Send_Approve)(nil), + (*Send_TransferFrom)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_ledger_proto_rawDesc, + NumEnums: 0, + NumMessages: 54, + NumExtensions: 2, + NumServices: 0, + }, + GoTypes: file_ledger_proto_goTypes, + DependencyIndexes: file_ledger_proto_depIdxs, + MessageInfos: file_ledger_proto_msgTypes, + ExtensionInfos: file_ledger_proto_extTypes, + }.Build() + File_ledger_proto = out.File + file_ledger_proto_rawDesc = nil + file_ledger_proto_goTypes = nil + file_ledger_proto_depIdxs = nil +} + +func file_ledger_proto_rawDescGZIP() []byte { + file_ledger_proto_rawDescOnce.Do(func() { + file_ledger_proto_rawDescData = protoimpl.X.CompressGZIP(file_ledger_proto_rawDescData) + }) + return file_ledger_proto_rawDescData +} + +func init() { file_ledger_proto_init() } + +type Account struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Identifier *AccountIdentifier `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"` + Balance *Tokens `protobuf:"bytes,2,opt,name=balance,proto3" json:"balance,omitempty"` +} + +// Deprecated: Use Account.ProtoReflect.Descriptor instead. +func (*Account) Descriptor() ([]byte, []int) { + return file_ledger_proto_rawDescGZIP(), []int{39} +} + +func (x *Account) GetBalance() *Tokens { + if x != nil { + return x.Balance + } + return nil +} + +func (x *Account) GetIdentifier() *AccountIdentifier { + if x != nil { + return x.Identifier + } + return nil +} + +func (*Account) ProtoMessage() {} + +func (x *Account) ProtoReflect() protoreflect.Message { + mi := &file_ledger_proto_msgTypes[39] + 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 *Account) Reset() { + *x = Account{} + if protoimpl.UnsafeEnabled { + mi := &file_ledger_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Account) String() string { + return protoimpl.X.MessageStringOf(x) +} + +// Get the balance of an account +type AccountBalanceRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Account *AccountIdentifier `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` +} + +// Deprecated: Use AccountBalanceRequest.ProtoReflect.Descriptor instead. +func (*AccountBalanceRequest) Descriptor() ([]byte, []int) { + return file_ledger_proto_rawDescGZIP(), []int{10} +} + +func (x *AccountBalanceRequest) GetAccount() *AccountIdentifier { + if x != nil { + return x.Account + } + return nil +} + +func (*AccountBalanceRequest) ProtoMessage() {} + +func (x *AccountBalanceRequest) ProtoReflect() protoreflect.Message { + mi := &file_ledger_proto_msgTypes[10] + 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 *AccountBalanceRequest) Reset() { + *x = AccountBalanceRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_ledger_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AccountBalanceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +type AccountBalanceResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Balance *Tokens `protobuf:"bytes,1,opt,name=balance,proto3" json:"balance,omitempty"` +} + +// Deprecated: Use AccountBalanceResponse.ProtoReflect.Descriptor instead. +func (*AccountBalanceResponse) Descriptor() ([]byte, []int) { + return file_ledger_proto_rawDescGZIP(), []int{11} +} + +func (x *AccountBalanceResponse) GetBalance() *Tokens { + if x != nil { + return x.Balance + } + return nil +} + +func (*AccountBalanceResponse) ProtoMessage() {} + +func (x *AccountBalanceResponse) ProtoReflect() protoreflect.Message { + mi := &file_ledger_proto_msgTypes[11] + 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 *AccountBalanceResponse) Reset() { + *x = AccountBalanceResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_ledger_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AccountBalanceResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +type AccountIdentifier struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Can contain either: + // - the 32 byte identifier (4 byte checksum + 28 byte hash) + // - the 28 byte hash + Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` +} + +// Deprecated: Use AccountIdentifier.ProtoReflect.Descriptor instead. +func (*AccountIdentifier) Descriptor() ([]byte, []int) { + return file_ledger_proto_rawDescGZIP(), []int{46} +} + +func (x *AccountIdentifier) GetHash() []byte { + if x != nil { + return x.Hash + } + return nil +} + +func (*AccountIdentifier) ProtoMessage() {} + +func (x *AccountIdentifier) ProtoReflect() protoreflect.Message { + mi := &file_ledger_proto_msgTypes[46] + 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 *AccountIdentifier) Reset() { + *x = AccountIdentifier{} + if protoimpl.UnsafeEnabled { + mi := &file_ledger_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AccountIdentifier) String() string { + return protoimpl.X.MessageStringOf(x) +} + +type Approve struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Allowance *Tokens `protobuf:"bytes,1,opt,name=allowance,proto3" json:"allowance,omitempty"` + ExpiresAt *TimeStamp `protobuf:"bytes,2,opt,name=expires_at,json=expiresAt,proto3" json:"expires_at,omitempty"` + ExpectedAllowance *Tokens `protobuf:"bytes,3,opt,name=expected_allowance,json=expectedAllowance,proto3" json:"expected_allowance,omitempty"` +} + +// Deprecated: Use Approve.ProtoReflect.Descriptor instead. +func (*Approve) Descriptor() ([]byte, []int) { + return file_ledger_proto_rawDescGZIP(), []int{43} +} + +func (x *Approve) GetAllowance() *Tokens { + if x != nil { + return x.Allowance + } + return nil +} + +func (x *Approve) GetExpectedAllowance() *Tokens { + if x != nil { + return x.ExpectedAllowance + } + return nil +} + +func (x *Approve) GetExpiresAt() *TimeStamp { + if x != nil { + return x.ExpiresAt + } + return nil +} + +func (*Approve) ProtoMessage() {} + +func (x *Approve) ProtoReflect() protoreflect.Message { + mi := &file_ledger_proto_msgTypes[43] + 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 *Approve) Reset() { + *x = Approve{} + if protoimpl.UnsafeEnabled { + mi := &file_ledger_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Approve) String() string { + return protoimpl.X.MessageStringOf(x) +} + +// Add blocks to the archive canister +type ArchiveAddRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Blocks []*Block `protobuf:"bytes,1,rep,name=blocks,proto3" json:"blocks,omitempty"` +} + +// Deprecated: Use ArchiveAddRequest.ProtoReflect.Descriptor instead. +func (*ArchiveAddRequest) Descriptor() ([]byte, []int) { + return file_ledger_proto_rawDescGZIP(), []int{30} +} + +func (x *ArchiveAddRequest) GetBlocks() []*Block { + if x != nil { + return x.Blocks + } + return nil +} + +func (*ArchiveAddRequest) ProtoMessage() {} + +func (x *ArchiveAddRequest) ProtoReflect() protoreflect.Message { + mi := &file_ledger_proto_msgTypes[30] + 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 *ArchiveAddRequest) Reset() { + *x = ArchiveAddRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_ledger_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ArchiveAddRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +type ArchiveAddResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +// Deprecated: Use ArchiveAddResponse.ProtoReflect.Descriptor instead. +func (*ArchiveAddResponse) Descriptor() ([]byte, []int) { + return file_ledger_proto_rawDescGZIP(), []int{31} +} + +func (*ArchiveAddResponse) ProtoMessage() {} + +func (x *ArchiveAddResponse) ProtoReflect() protoreflect.Message { + mi := &file_ledger_proto_msgTypes[31] + 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 *ArchiveAddResponse) Reset() { + *x = ArchiveAddResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_ledger_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ArchiveAddResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +type ArchiveIndexEntry struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + HeightFrom uint64 `protobuf:"varint,1,opt,name=height_from,json=heightFrom,proto3" json:"height_from,omitempty"` + HeightTo uint64 `protobuf:"varint,2,opt,name=height_to,json=heightTo,proto3" json:"height_to,omitempty"` + CanisterId *PrincipalId `protobuf:"bytes,3,opt,name=canister_id,json=canisterId,proto3" json:"canister_id,omitempty"` +} + +// Deprecated: Use ArchiveIndexEntry.ProtoReflect.Descriptor instead. +func (*ArchiveIndexEntry) Descriptor() ([]byte, []int) { + return file_ledger_proto_rawDescGZIP(), []int{27} +} + +func (x *ArchiveIndexEntry) GetCanisterId() *PrincipalId { + if x != nil { + return x.CanisterId + } + return nil +} + +func (x *ArchiveIndexEntry) GetHeightFrom() uint64 { + if x != nil { + return x.HeightFrom + } + return 0 +} + +func (x *ArchiveIndexEntry) GetHeightTo() uint64 { + if x != nil { + return x.HeightTo + } + return 0 +} + +func (*ArchiveIndexEntry) ProtoMessage() {} + +func (x *ArchiveIndexEntry) ProtoReflect() protoreflect.Message { + mi := &file_ledger_proto_msgTypes[27] + 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 *ArchiveIndexEntry) Reset() { + *x = ArchiveIndexEntry{} + if protoimpl.UnsafeEnabled { + mi := &file_ledger_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ArchiveIndexEntry) String() string { + return protoimpl.X.MessageStringOf(x) +} + +type ArchiveIndexResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Entries []*ArchiveIndexEntry `protobuf:"bytes,1,rep,name=entries,proto3" json:"entries,omitempty"` +} + +// Deprecated: Use ArchiveIndexResponse.ProtoReflect.Descriptor instead. +func (*ArchiveIndexResponse) Descriptor() ([]byte, []int) { + return file_ledger_proto_rawDescGZIP(), []int{28} +} + +func (x *ArchiveIndexResponse) GetEntries() []*ArchiveIndexEntry { + if x != nil { + return x.Entries + } + return nil +} + +func (*ArchiveIndexResponse) ProtoMessage() {} + +func (x *ArchiveIndexResponse) ProtoReflect() protoreflect.Message { + mi := &file_ledger_proto_msgTypes[28] + 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 *ArchiveIndexResponse) Reset() { + *x = ArchiveIndexResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_ledger_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ArchiveIndexResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +// * Archive canister * +// Init the archive canister +type ArchiveInit struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + NodeMaxMemorySizeBytes uint32 `protobuf:"varint,1,opt,name=node_max_memory_size_bytes,json=nodeMaxMemorySizeBytes,proto3" json:"node_max_memory_size_bytes,omitempty"` + MaxMessageSizeBytes uint32 `protobuf:"varint,2,opt,name=max_message_size_bytes,json=maxMessageSizeBytes,proto3" json:"max_message_size_bytes,omitempty"` +} + +// Deprecated: Use ArchiveInit.ProtoReflect.Descriptor instead. +func (*ArchiveInit) Descriptor() ([]byte, []int) { + return file_ledger_proto_rawDescGZIP(), []int{29} +} + +func (x *ArchiveInit) GetMaxMessageSizeBytes() uint32 { + if x != nil { + return x.MaxMessageSizeBytes + } + return 0 +} + +func (x *ArchiveInit) GetNodeMaxMemorySizeBytes() uint32 { + if x != nil { + return x.NodeMaxMemorySizeBytes + } + return 0 +} + +func (*ArchiveInit) ProtoMessage() {} + +func (x *ArchiveInit) ProtoReflect() protoreflect.Message { + mi := &file_ledger_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 (x *ArchiveInit) Reset() { + *x = ArchiveInit{} + if protoimpl.UnsafeEnabled { + mi := &file_ledger_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ArchiveInit) String() string { + return protoimpl.X.MessageStringOf(x) +} + +// This is the +type Block struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ParentHash *Hash `protobuf:"bytes,1,opt,name=parent_hash,json=parentHash,proto3" json:"parent_hash,omitempty"` + Timestamp *TimeStamp `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + Transaction *Transaction `protobuf:"bytes,3,opt,name=transaction,proto3" json:"transaction,omitempty"` +} + +// Deprecated: Use Block.ProtoReflect.Descriptor instead. +func (*Block) Descriptor() ([]byte, []int) { + return file_ledger_proto_rawDescGZIP(), []int{37} +} + +func (x *Block) GetParentHash() *Hash { + if x != nil { + return x.ParentHash + } + return nil +} + +func (x *Block) GetTimestamp() *TimeStamp { + if x != nil { + return x.Timestamp + } + return nil +} + +func (x *Block) GetTransaction() *Transaction { + if x != nil { + return x.Transaction + } + return nil +} + +func (*Block) ProtoMessage() {} + +func (x *Block) ProtoReflect() protoreflect.Message { + mi := &file_ledger_proto_msgTypes[37] + 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 *Block) Reset() { + *x = Block{} + if protoimpl.UnsafeEnabled { + mi := &file_ledger_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Block) String() string { + return protoimpl.X.MessageStringOf(x) +} + +type BlockIndex struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Height uint64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` +} + +// Deprecated: Use BlockIndex.ProtoReflect.Descriptor instead. +func (*BlockIndex) Descriptor() ([]byte, []int) { + return file_ledger_proto_rawDescGZIP(), []int{36} +} + +func (x *BlockIndex) GetHeight() uint64 { + if x != nil { + return x.Height + } + return 0 +} + +func (*BlockIndex) ProtoMessage() {} + +func (x *BlockIndex) ProtoReflect() protoreflect.Message { + mi := &file_ledger_proto_msgTypes[36] + 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 *BlockIndex) Reset() { + *x = BlockIndex{} + if protoimpl.UnsafeEnabled { + mi := &file_ledger_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BlockIndex) String() string { + return protoimpl.X.MessageStringOf(x) +} + +// Get a single block +type BlockRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BlockHeight uint64 `protobuf:"varint,1,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` +} + +// Deprecated: Use BlockRequest.ProtoReflect.Descriptor instead. +func (*BlockRequest) Descriptor() ([]byte, []int) { + return file_ledger_proto_rawDescGZIP(), []int{17} +} + +func (x *BlockRequest) GetBlockHeight() uint64 { + if x != nil { + return x.BlockHeight + } + return 0 +} + +func (*BlockRequest) ProtoMessage() {} + +func (x *BlockRequest) ProtoReflect() protoreflect.Message { + mi := &file_ledger_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 mi.MessageOf(x) +} + +func (x *BlockRequest) Reset() { + *x = BlockRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_ledger_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BlockRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +type BlockResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to BlockContent: + // + // *BlockResponse_Block + // *BlockResponse_CanisterId + BlockContent isBlockResponse_BlockContent `protobuf_oneof:"block_content"` +} + +// Deprecated: Use BlockResponse.ProtoReflect.Descriptor instead. +func (*BlockResponse) Descriptor() ([]byte, []int) { + return file_ledger_proto_rawDescGZIP(), []int{19} +} + +func (x *BlockResponse) GetBlock() *EncodedBlock { + if x, ok := x.GetBlockContent().(*BlockResponse_Block); ok { + return x.Block + } + return nil +} + +func (m *BlockResponse) GetBlockContent() isBlockResponse_BlockContent { + if m != nil { + return m.BlockContent + } + return nil +} + +func (x *BlockResponse) GetCanisterId() *PrincipalId { + if x, ok := x.GetBlockContent().(*BlockResponse_CanisterId); ok { + return x.CanisterId + } + return nil +} + +func (*BlockResponse) ProtoMessage() {} + +func (x *BlockResponse) ProtoReflect() protoreflect.Message { + mi := &file_ledger_proto_msgTypes[19] + 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 *BlockResponse) Reset() { + *x = BlockResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_ledger_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BlockResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +type BlockResponse_Block struct { + Block *EncodedBlock `protobuf:"bytes,1,opt,name=block,proto3,oneof"` +} + +func (*BlockResponse_Block) isBlockResponse_BlockContent() {} + +type BlockResponse_CanisterId struct { + CanisterId *PrincipalId `protobuf:"bytes,2,opt,name=canister_id,json=canisterId,proto3,oneof"` +} + +func (*BlockResponse_CanisterId) isBlockResponse_BlockContent() {} + +type Burn struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + From *AccountIdentifier `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` + Amount *Tokens `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount,omitempty"` + Spender *AccountIdentifier `protobuf:"bytes,4,opt,name=spender,proto3" json:"spender,omitempty"` +} + +// Deprecated: Use Burn.ProtoReflect.Descriptor instead. +func (*Burn) Descriptor() ([]byte, []int) { + return file_ledger_proto_rawDescGZIP(), []int{45} +} + +func (x *Burn) GetAmount() *Tokens { + if x != nil { + return x.Amount + } + return nil +} + +func (x *Burn) GetFrom() *AccountIdentifier { + if x != nil { + return x.From + } + return nil +} + +func (x *Burn) GetSpender() *AccountIdentifier { + if x != nil { + return x.Spender + } + return nil +} + +func (*Burn) ProtoMessage() {} + +func (x *Burn) ProtoReflect() protoreflect.Message { + mi := &file_ledger_proto_msgTypes[45] + 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 *Burn) Reset() { + *x = Burn{} + if protoimpl.UnsafeEnabled { + mi := &file_ledger_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Burn) String() string { + return protoimpl.X.MessageStringOf(x) +} + +type Certification struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Certification []byte `protobuf:"bytes,1,opt,name=certification,proto3" json:"certification,omitempty"` +} + +// Deprecated: Use Certification.ProtoReflect.Descriptor instead. +func (*Certification) Descriptor() ([]byte, []int) { + return file_ledger_proto_rawDescGZIP(), []int{51} +} + +func (x *Certification) GetCertification() []byte { + if x != nil { + return x.Certification + } + return nil +} + +func (*Certification) ProtoMessage() {} + +func (x *Certification) ProtoReflect() protoreflect.Message { + mi := &file_ledger_proto_msgTypes[51] + 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 *Certification) Reset() { + *x = Certification{} + if protoimpl.UnsafeEnabled { + mi := &file_ledger_proto_msgTypes[51] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Certification) String() string { + return protoimpl.X.MessageStringOf(x) +} + +type CyclesNotificationResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Response: + // + // *CyclesNotificationResponse_CreatedCanisterId + // *CyclesNotificationResponse_Refund + // *CyclesNotificationResponse_ToppedUp + Response isCyclesNotificationResponse_Response `protobuf_oneof:"response"` +} + +// Deprecated: Use CyclesNotificationResponse.ProtoReflect.Descriptor instead. +func (*CyclesNotificationResponse) Descriptor() ([]byte, []int) { + return file_ledger_proto_rawDescGZIP(), []int{9} +} + +func (x *CyclesNotificationResponse) GetCreatedCanisterId() *PrincipalId { + if x, ok := x.GetResponse().(*CyclesNotificationResponse_CreatedCanisterId); ok { + return x.CreatedCanisterId + } + return nil +} + +func (x *CyclesNotificationResponse) GetRefund() *Refund { + if x, ok := x.GetResponse().(*CyclesNotificationResponse_Refund); ok { + return x.Refund + } + return nil +} + +func (m *CyclesNotificationResponse) GetResponse() isCyclesNotificationResponse_Response { + if m != nil { + return m.Response + } + return nil +} + +func (x *CyclesNotificationResponse) GetToppedUp() *ToppedUp { + if x, ok := x.GetResponse().(*CyclesNotificationResponse_ToppedUp); ok { + return x.ToppedUp + } + return nil +} + +func (*CyclesNotificationResponse) ProtoMessage() {} + +func (x *CyclesNotificationResponse) ProtoReflect() protoreflect.Message { + mi := &file_ledger_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +func (x *CyclesNotificationResponse) Reset() { + *x = CyclesNotificationResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_ledger_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CyclesNotificationResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +type CyclesNotificationResponse_CreatedCanisterId struct { + CreatedCanisterId *PrincipalId `protobuf:"bytes,1,opt,name=created_canister_id,json=createdCanisterId,proto3,oneof"` +} + +func (*CyclesNotificationResponse_CreatedCanisterId) isCyclesNotificationResponse_Response() {} + +type CyclesNotificationResponse_Refund struct { + Refund *Refund `protobuf:"bytes,2,opt,name=refund,proto3,oneof"` +} + +func (*CyclesNotificationResponse_Refund) isCyclesNotificationResponse_Response() {} + +type CyclesNotificationResponse_ToppedUp struct { + ToppedUp *ToppedUp `protobuf:"bytes,3,opt,name=topped_up,json=toppedUp,proto3,oneof"` +} + +func (*CyclesNotificationResponse_ToppedUp) isCyclesNotificationResponse_Response() {} + +type EncodedBlock struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Block []byte `protobuf:"bytes,1,opt,name=block,proto3" json:"block,omitempty"` +} + +// Deprecated: Use EncodedBlock.ProtoReflect.Descriptor instead. +func (*EncodedBlock) Descriptor() ([]byte, []int) { + return file_ledger_proto_rawDescGZIP(), []int{18} +} + +func (x *EncodedBlock) GetBlock() []byte { + if x != nil { + return x.Block + } + return nil +} + +func (*EncodedBlock) ProtoMessage() {} + +func (x *EncodedBlock) ProtoReflect() protoreflect.Message { + mi := &file_ledger_proto_msgTypes[18] + 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 *EncodedBlock) Reset() { + *x = EncodedBlock{} + if protoimpl.UnsafeEnabled { + mi := &file_ledger_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EncodedBlock) String() string { + return protoimpl.X.MessageStringOf(x) +} + +type EncodedBlocks struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Blocks []*EncodedBlock `protobuf:"bytes,1,rep,name=blocks,proto3" json:"blocks,omitempty"` +} + +// Deprecated: Use EncodedBlocks.ProtoReflect.Descriptor instead. +func (*EncodedBlocks) Descriptor() ([]byte, []int) { + return file_ledger_proto_rawDescGZIP(), []int{23} +} + +func (x *EncodedBlocks) GetBlocks() []*EncodedBlock { + if x != nil { + return x.Blocks + } + return nil +} + +func (*EncodedBlocks) ProtoMessage() {} + +func (x *EncodedBlocks) ProtoReflect() protoreflect.Message { + mi := &file_ledger_proto_msgTypes[23] + 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 *EncodedBlocks) Reset() { + *x = EncodedBlocks{} + if protoimpl.UnsafeEnabled { + mi := &file_ledger_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EncodedBlocks) String() string { + return protoimpl.X.MessageStringOf(x) +} + +// Get a set of blocks +type GetBlocksRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Start uint64 `protobuf:"varint,1,opt,name=start,proto3" json:"start,omitempty"` + Length uint64 `protobuf:"varint,2,opt,name=length,proto3" json:"length,omitempty"` +} + +// Deprecated: Use GetBlocksRequest.ProtoReflect.Descriptor instead. +func (*GetBlocksRequest) Descriptor() ([]byte, []int) { + return file_ledger_proto_rawDescGZIP(), []int{20} +} + +func (x *GetBlocksRequest) GetLength() uint64 { + if x != nil { + return x.Length + } + return 0 +} + +func (x *GetBlocksRequest) GetStart() uint64 { + if x != nil { + return x.Start + } + return 0 +} + +func (*GetBlocksRequest) ProtoMessage() {} + +func (x *GetBlocksRequest) ProtoReflect() protoreflect.Message { + mi := &file_ledger_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 *GetBlocksRequest) Reset() { + *x = GetBlocksRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_ledger_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetBlocksRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +type GetBlocksResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to GetBlocksContent: + // + // *GetBlocksResponse_Blocks + // *GetBlocksResponse_Error + GetBlocksContent isGetBlocksResponse_GetBlocksContent `protobuf_oneof:"get_blocks_content"` +} + +// Deprecated: Use GetBlocksResponse.ProtoReflect.Descriptor instead. +func (*GetBlocksResponse) Descriptor() ([]byte, []int) { + return file_ledger_proto_rawDescGZIP(), []int{24} +} + +func (x *GetBlocksResponse) GetBlocks() *EncodedBlocks { + if x, ok := x.GetGetBlocksContent().(*GetBlocksResponse_Blocks); ok { + return x.Blocks + } + return nil +} + +func (x *GetBlocksResponse) GetError() string { + if x, ok := x.GetGetBlocksContent().(*GetBlocksResponse_Error); ok { + return x.Error + } + return "" +} + +func (m *GetBlocksResponse) GetGetBlocksContent() isGetBlocksResponse_GetBlocksContent { + if m != nil { + return m.GetBlocksContent + } + return nil +} + +func (*GetBlocksResponse) ProtoMessage() {} + +func (x *GetBlocksResponse) ProtoReflect() protoreflect.Message { + mi := &file_ledger_proto_msgTypes[24] + 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 *GetBlocksResponse) Reset() { + *x = GetBlocksResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_ledger_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetBlocksResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +type GetBlocksResponse_Blocks struct { + Blocks *EncodedBlocks `protobuf:"bytes,1,opt,name=blocks,proto3,oneof"` +} + +func (*GetBlocksResponse_Blocks) isGetBlocksResponse_GetBlocksContent() {} + +type GetBlocksResponse_Error struct { + Error string `protobuf:"bytes,2,opt,name=error,proto3,oneof"` +} + +func (*GetBlocksResponse_Error) isGetBlocksResponse_GetBlocksContent() {} + +// Fetch a list of all of the archive nodes +type GetNodesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +// Deprecated: Use GetNodesRequest.ProtoReflect.Descriptor instead. +func (*GetNodesRequest) Descriptor() ([]byte, []int) { + return file_ledger_proto_rawDescGZIP(), []int{32} +} + +func (*GetNodesRequest) ProtoMessage() {} + +func (x *GetNodesRequest) ProtoReflect() protoreflect.Message { + mi := &file_ledger_proto_msgTypes[32] + 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 *GetNodesRequest) Reset() { + *x = GetNodesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_ledger_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetNodesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +type GetNodesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Nodes []*PrincipalId `protobuf:"bytes,1,rep,name=nodes,proto3" json:"nodes,omitempty"` +} + +// Deprecated: Use GetNodesResponse.ProtoReflect.Descriptor instead. +func (*GetNodesResponse) Descriptor() ([]byte, []int) { + return file_ledger_proto_rawDescGZIP(), []int{33} +} + +func (x *GetNodesResponse) GetNodes() []*PrincipalId { + if x != nil { + return x.Nodes + } + return nil +} + +func (*GetNodesResponse) ProtoMessage() {} + +func (x *GetNodesResponse) ProtoReflect() protoreflect.Message { + mi := &file_ledger_proto_msgTypes[33] + 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 *GetNodesResponse) Reset() { + *x = GetNodesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_ledger_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetNodesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +type Hash struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` +} + +// Deprecated: Use Hash.ProtoReflect.Descriptor instead. +func (*Hash) Descriptor() ([]byte, []int) { + return file_ledger_proto_rawDescGZIP(), []int{38} +} + +func (x *Hash) GetHash() []byte { + if x != nil { + return x.Hash + } + return nil +} + +func (*Hash) ProtoMessage() {} + +func (x *Hash) ProtoReflect() protoreflect.Message { + mi := &file_ledger_proto_msgTypes[38] + 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 *Hash) Reset() { + *x = Hash{} + if protoimpl.UnsafeEnabled { + mi := &file_ledger_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Hash) String() string { + return protoimpl.X.MessageStringOf(x) +} + +type Icrc1Memo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Memo []byte `protobuf:"bytes,1,opt,name=memo,proto3" json:"memo,omitempty"` +} + +// Deprecated: Use Icrc1Memo.ProtoReflect.Descriptor instead. +func (*Icrc1Memo) Descriptor() ([]byte, []int) { + return file_ledger_proto_rawDescGZIP(), []int{49} +} + +func (x *Icrc1Memo) GetMemo() []byte { + if x != nil { + return x.Memo + } + return nil +} + +func (*Icrc1Memo) ProtoMessage() {} + +func (x *Icrc1Memo) ProtoReflect() protoreflect.Message { + mi := &file_ledger_proto_msgTypes[49] + 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 *Icrc1Memo) Reset() { + *x = Icrc1Memo{} + if protoimpl.UnsafeEnabled { + mi := &file_ledger_proto_msgTypes[49] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Icrc1Memo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +// Iterate through blocks +type IterBlocksRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Start uint64 `protobuf:"varint,1,opt,name=start,proto3" json:"start,omitempty"` + Length uint64 `protobuf:"varint,2,opt,name=length,proto3" json:"length,omitempty"` +} + +// Deprecated: Use IterBlocksRequest.ProtoReflect.Descriptor instead. +func (*IterBlocksRequest) Descriptor() ([]byte, []int) { + return file_ledger_proto_rawDescGZIP(), []int{25} +} + +func (x *IterBlocksRequest) GetLength() uint64 { + if x != nil { + return x.Length + } + return 0 +} + +func (x *IterBlocksRequest) GetStart() uint64 { + if x != nil { + return x.Start + } + return 0 +} + +func (*IterBlocksRequest) ProtoMessage() {} + +func (x *IterBlocksRequest) ProtoReflect() protoreflect.Message { + mi := &file_ledger_proto_msgTypes[25] + 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 *IterBlocksRequest) Reset() { + *x = IterBlocksRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_ledger_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *IterBlocksRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +type IterBlocksResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Blocks []*EncodedBlock `protobuf:"bytes,1,rep,name=blocks,proto3" json:"blocks,omitempty"` +} + +// Deprecated: Use IterBlocksResponse.ProtoReflect.Descriptor instead. +func (*IterBlocksResponse) Descriptor() ([]byte, []int) { + return file_ledger_proto_rawDescGZIP(), []int{26} +} + +func (x *IterBlocksResponse) GetBlocks() []*EncodedBlock { + if x != nil { + return x.Blocks + } + return nil +} + +func (*IterBlocksResponse) ProtoMessage() {} + +func (x *IterBlocksResponse) ProtoReflect() protoreflect.Message { + mi := &file_ledger_proto_msgTypes[26] + 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 *IterBlocksResponse) Reset() { + *x = IterBlocksResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_ledger_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *IterBlocksResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +// Archive any blocks older than this +type LedgerArchiveRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Timestamp *TimeStamp `protobuf:"bytes,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` +} + +// Deprecated: Use LedgerArchiveRequest.ProtoReflect.Descriptor instead. +func (*LedgerArchiveRequest) Descriptor() ([]byte, []int) { + return file_ledger_proto_rawDescGZIP(), []int{16} +} + +func (x *LedgerArchiveRequest) GetTimestamp() *TimeStamp { + if x != nil { + return x.Timestamp + } + return nil +} + +func (*LedgerArchiveRequest) ProtoMessage() {} + +func (x *LedgerArchiveRequest) ProtoReflect() protoreflect.Message { + mi := &file_ledger_proto_msgTypes[16] + 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 *LedgerArchiveRequest) Reset() { + *x = LedgerArchiveRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_ledger_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LedgerArchiveRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +// Initialise the ledger canister +type LedgerInit struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + MintingAccount *AccountIdentifier `protobuf:"bytes,1,opt,name=minting_account,json=mintingAccount,proto3" json:"minting_account,omitempty"` + InitialValues []*Account `protobuf:"bytes,2,rep,name=initial_values,json=initialValues,proto3" json:"initial_values,omitempty"` + ArchiveCanister *PrincipalId `protobuf:"bytes,3,opt,name=archive_canister,json=archiveCanister,proto3" json:"archive_canister,omitempty"` + MaxMessageSizeBytes uint32 `protobuf:"varint,4,opt,name=max_message_size_bytes,json=maxMessageSizeBytes,proto3" json:"max_message_size_bytes,omitempty"` +} + +// Deprecated: Use LedgerInit.ProtoReflect.Descriptor instead. +func (*LedgerInit) Descriptor() ([]byte, []int) { + return file_ledger_proto_rawDescGZIP(), []int{1} +} + +func (x *LedgerInit) GetArchiveCanister() *PrincipalId { + if x != nil { + return x.ArchiveCanister + } + return nil +} + +func (x *LedgerInit) GetInitialValues() []*Account { + if x != nil { + return x.InitialValues + } + return nil +} + +func (x *LedgerInit) GetMaxMessageSizeBytes() uint32 { + if x != nil { + return x.MaxMessageSizeBytes + } + return 0 +} + +func (x *LedgerInit) GetMintingAccount() *AccountIdentifier { + if x != nil { + return x.MintingAccount + } + return nil +} + +func (*LedgerInit) ProtoMessage() {} + +func (x *LedgerInit) ProtoReflect() protoreflect.Message { + mi := &file_ledger_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +func (x *LedgerInit) Reset() { + *x = LedgerInit{} + if protoimpl.UnsafeEnabled { + mi := &file_ledger_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LedgerInit) String() string { + return protoimpl.X.MessageStringOf(x) +} + +// The format of values serialized to/from the stable memory during and upgrade +type LedgerUpgrade struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +// Deprecated: Use LedgerUpgrade.ProtoReflect.Descriptor instead. +func (*LedgerUpgrade) Descriptor() ([]byte, []int) { + return file_ledger_proto_rawDescGZIP(), []int{2} +} + +func (*LedgerUpgrade) ProtoMessage() {} + +func (x *LedgerUpgrade) ProtoReflect() protoreflect.Message { + mi := &file_ledger_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +func (x *LedgerUpgrade) Reset() { + *x = LedgerUpgrade{} + if protoimpl.UnsafeEnabled { + mi := &file_ledger_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LedgerUpgrade) String() string { + return protoimpl.X.MessageStringOf(x) +} + +type Memo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Memo uint64 `protobuf:"varint,1,opt,name=memo,proto3" json:"memo,omitempty"` +} + +// Deprecated: Use Memo.ProtoReflect.Descriptor instead. +func (*Memo) Descriptor() ([]byte, []int) { + return file_ledger_proto_rawDescGZIP(), []int{48} +} + +func (x *Memo) GetMemo() uint64 { + if x != nil { + return x.Memo + } + return 0 +} + +func (*Memo) ProtoMessage() {} + +func (x *Memo) ProtoReflect() protoreflect.Message { + mi := &file_ledger_proto_msgTypes[48] + 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 *Memo) Reset() { + *x = Memo{} + if protoimpl.UnsafeEnabled { + mi := &file_ledger_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Memo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +type Mint struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + To *AccountIdentifier `protobuf:"bytes,2,opt,name=to,proto3" json:"to,omitempty"` + Amount *Tokens `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount,omitempty"` +} + +// Deprecated: Use Mint.ProtoReflect.Descriptor instead. +func (*Mint) Descriptor() ([]byte, []int) { + return file_ledger_proto_rawDescGZIP(), []int{44} +} + +func (x *Mint) GetAmount() *Tokens { + if x != nil { + return x.Amount + } + return nil +} + +func (x *Mint) GetTo() *AccountIdentifier { + if x != nil { + return x.To + } + return nil +} + +func (*Mint) ProtoMessage() {} + +func (x *Mint) ProtoReflect() protoreflect.Message { + mi := &file_ledger_proto_msgTypes[44] + 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 *Mint) Reset() { + *x = Mint{} + if protoimpl.UnsafeEnabled { + mi := &file_ledger_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Mint) String() string { + return protoimpl.X.MessageStringOf(x) +} + +// Notify a canister that it has received a payment +type NotifyRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BlockHeight *BlockIndex `protobuf:"bytes,1,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` + MaxFee *Tokens `protobuf:"bytes,2,opt,name=max_fee,json=maxFee,proto3" json:"max_fee,omitempty"` + FromSubaccount *Subaccount `protobuf:"bytes,3,opt,name=from_subaccount,json=fromSubaccount,proto3" json:"from_subaccount,omitempty"` + ToCanister *PrincipalId `protobuf:"bytes,4,opt,name=to_canister,json=toCanister,proto3" json:"to_canister,omitempty"` + ToSubaccount *Subaccount `protobuf:"bytes,5,opt,name=to_subaccount,json=toSubaccount,proto3" json:"to_subaccount,omitempty"` +} + +// Deprecated: Use NotifyRequest.ProtoReflect.Descriptor instead. +func (*NotifyRequest) Descriptor() ([]byte, []int) { + return file_ledger_proto_rawDescGZIP(), []int{5} +} + +func (x *NotifyRequest) GetBlockHeight() *BlockIndex { + if x != nil { + return x.BlockHeight + } + return nil +} + +func (x *NotifyRequest) GetFromSubaccount() *Subaccount { + if x != nil { + return x.FromSubaccount + } + return nil +} + +func (x *NotifyRequest) GetMaxFee() *Tokens { + if x != nil { + return x.MaxFee + } + return nil +} + +func (x *NotifyRequest) GetToCanister() *PrincipalId { + if x != nil { + return x.ToCanister + } + return nil +} + +func (x *NotifyRequest) GetToSubaccount() *Subaccount { + if x != nil { + return x.ToSubaccount + } + return nil +} + +func (*NotifyRequest) ProtoMessage() {} + +func (x *NotifyRequest) ProtoReflect() protoreflect.Message { + mi := &file_ledger_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +func (x *NotifyRequest) Reset() { + *x = NotifyRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_ledger_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NotifyRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +type NotifyResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +// Deprecated: Use NotifyResponse.ProtoReflect.Descriptor instead. +func (*NotifyResponse) Descriptor() ([]byte, []int) { + return file_ledger_proto_rawDescGZIP(), []int{6} +} + +func (*NotifyResponse) ProtoMessage() {} + +func (x *NotifyResponse) ProtoReflect() protoreflect.Message { + mi := &file_ledger_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +func (x *NotifyResponse) Reset() { + *x = NotifyResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_ledger_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NotifyResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +type Payment struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ReceiverGets *Tokens `protobuf:"bytes,1,opt,name=receiver_gets,json=receiverGets,proto3" json:"receiver_gets,omitempty"` +} + +// Deprecated: Use Payment.ProtoReflect.Descriptor instead. +func (*Payment) Descriptor() ([]byte, []int) { + return file_ledger_proto_rawDescGZIP(), []int{35} +} + +func (x *Payment) GetReceiverGets() *Tokens { + if x != nil { + return x.ReceiverGets + } + return nil +} + +func (*Payment) ProtoMessage() {} + +func (x *Payment) ProtoReflect() protoreflect.Message { + mi := &file_ledger_proto_msgTypes[35] + 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 *Payment) Reset() { + *x = Payment{} + if protoimpl.UnsafeEnabled { + mi := &file_ledger_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Payment) String() string { + return protoimpl.X.MessageStringOf(x) +} + +// A PB container for a PrincipalId, which uniquely identifies +// a principal. +type PrincipalId struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SerializedId []byte `protobuf:"bytes,1,opt,name=serialized_id,json=serializedId,proto3" json:"serialized_id,omitempty"` +} + +// Deprecated: Use PrincipalId.ProtoReflect.Descriptor instead. +func (*PrincipalId) Descriptor() ([]byte, []int) { + return file_ledger_proto_rawDescGZIP(), []int{0} +} + +func (x *PrincipalId) GetSerializedId() []byte { + if x != nil { + return x.SerializedId + } + return nil +} + +func (*PrincipalId) ProtoMessage() {} + +func (x *PrincipalId) ProtoReflect() protoreflect.Message { + mi := &file_ledger_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +func (x *PrincipalId) Reset() { + *x = PrincipalId{} + if protoimpl.UnsafeEnabled { + mi := &file_ledger_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PrincipalId) String() string { + return protoimpl.X.MessageStringOf(x) +} + +type Refund struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Refund *BlockIndex `protobuf:"bytes,2,opt,name=refund,proto3" json:"refund,omitempty"` + Error string `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"` +} + +// Deprecated: Use Refund.ProtoReflect.Descriptor instead. +func (*Refund) Descriptor() ([]byte, []int) { + return file_ledger_proto_rawDescGZIP(), []int{21} +} + +func (x *Refund) GetError() string { + if x != nil { + return x.Error + } + return "" +} + +func (x *Refund) GetRefund() *BlockIndex { + if x != nil { + return x.Refund + } + return nil +} + +func (*Refund) ProtoMessage() {} + +func (x *Refund) ProtoReflect() protoreflect.Message { + mi := &file_ledger_proto_msgTypes[21] + 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 *Refund) Reset() { + *x = Refund{} + if protoimpl.UnsafeEnabled { + mi := &file_ledger_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Refund) String() string { + return protoimpl.X.MessageStringOf(x) +} + +type Send struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The meaning of the [from] field depends on the transaction type: + // - Transfer: [from] is the source account. + // - TransferFrom: [from] is the approver. + // - Approve: [from] is the approver. + From *AccountIdentifier `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` + // The meaning of the [to] field depends on the transaction type: + // - Transfer: [to] is the destination account. + // - TransferFrom: [to] is the destination account. + // - Approve: [to] is the default account id of the approved principal. + To *AccountIdentifier `protobuf:"bytes,2,opt,name=to,proto3" json:"to,omitempty"` + // If the transaction type is Approve, the amount must be zero. + Amount *Tokens `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount,omitempty"` + MaxFee *Tokens `protobuf:"bytes,4,opt,name=max_fee,json=maxFee,proto3" json:"max_fee,omitempty"` + // We represent metadata of new operation types as submessages for + // backward compatibility with old clients. + // + // Types that are assignable to Extension: + // + // *Send_Approve + // *Send_TransferFrom + Extension isSend_Extension `protobuf_oneof:"extension"` +} + +// Deprecated: Use Send.ProtoReflect.Descriptor instead. +func (*Send) Descriptor() ([]byte, []int) { + return file_ledger_proto_rawDescGZIP(), []int{41} +} + +func (x *Send) GetAmount() *Tokens { + if x != nil { + return x.Amount + } + return nil +} + +func (x *Send) GetApprove() *Approve { + if x, ok := x.GetExtension().(*Send_Approve); ok { + return x.Approve + } + return nil +} + +func (m *Send) GetExtension() isSend_Extension { + if m != nil { + return m.Extension + } + return nil +} + +func (x *Send) GetFrom() *AccountIdentifier { + if x != nil { + return x.From + } + return nil +} + +func (x *Send) GetMaxFee() *Tokens { + if x != nil { + return x.MaxFee + } + return nil +} + +func (x *Send) GetTo() *AccountIdentifier { + if x != nil { + return x.To + } + return nil +} + +func (x *Send) GetTransferFrom() *TransferFrom { + if x, ok := x.GetExtension().(*Send_TransferFrom); ok { + return x.TransferFrom + } + return nil +} + +func (*Send) ProtoMessage() {} + +func (x *Send) ProtoReflect() protoreflect.Message { + mi := &file_ledger_proto_msgTypes[41] + 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 *Send) Reset() { + *x = Send{} + if protoimpl.UnsafeEnabled { + mi := &file_ledger_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Send) String() string { + return protoimpl.X.MessageStringOf(x) +} + +// Make a payment +type SendRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Memo *Memo `protobuf:"bytes,1,opt,name=memo,proto3" json:"memo,omitempty"` + Payment *Payment `protobuf:"bytes,2,opt,name=payment,proto3" json:"payment,omitempty"` + MaxFee *Tokens `protobuf:"bytes,3,opt,name=max_fee,json=maxFee,proto3" json:"max_fee,omitempty"` + FromSubaccount *Subaccount `protobuf:"bytes,4,opt,name=from_subaccount,json=fromSubaccount,proto3" json:"from_subaccount,omitempty"` + To *AccountIdentifier `protobuf:"bytes,5,opt,name=to,proto3" json:"to,omitempty"` + CreatedAt *BlockIndex `protobuf:"bytes,6,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + CreatedAtTime *TimeStamp `protobuf:"bytes,7,opt,name=created_at_time,json=createdAtTime,proto3" json:"created_at_time,omitempty"` +} + +// Deprecated: Use SendRequest.ProtoReflect.Descriptor instead. +func (*SendRequest) Descriptor() ([]byte, []int) { + return file_ledger_proto_rawDescGZIP(), []int{3} +} + +func (x *SendRequest) GetCreatedAt() *BlockIndex { + if x != nil { + return x.CreatedAt + } + return nil +} + +func (x *SendRequest) GetCreatedAtTime() *TimeStamp { + if x != nil { + return x.CreatedAtTime + } + return nil +} + +func (x *SendRequest) GetFromSubaccount() *Subaccount { + if x != nil { + return x.FromSubaccount + } + return nil +} + +func (x *SendRequest) GetMaxFee() *Tokens { + if x != nil { + return x.MaxFee + } + return nil +} + +func (x *SendRequest) GetMemo() *Memo { + if x != nil { + return x.Memo + } + return nil +} + +func (x *SendRequest) GetPayment() *Payment { + if x != nil { + return x.Payment + } + return nil +} + +func (x *SendRequest) GetTo() *AccountIdentifier { + if x != nil { + return x.To + } + return nil +} + +func (*SendRequest) ProtoMessage() {} + +func (x *SendRequest) ProtoReflect() protoreflect.Message { + mi := &file_ledger_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +func (x *SendRequest) Reset() { + *x = SendRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_ledger_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SendRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +type SendResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ResultingHeight *BlockIndex `protobuf:"bytes,1,opt,name=resulting_height,json=resultingHeight,proto3" json:"resulting_height,omitempty"` +} + +// Deprecated: Use SendResponse.ProtoReflect.Descriptor instead. +func (*SendResponse) Descriptor() ([]byte, []int) { + return file_ledger_proto_rawDescGZIP(), []int{4} +} + +func (x *SendResponse) GetResultingHeight() *BlockIndex { + if x != nil { + return x.ResultingHeight + } + return nil +} + +func (*SendResponse) ProtoMessage() {} + +func (x *SendResponse) ProtoReflect() protoreflect.Message { + mi := &file_ledger_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +func (x *SendResponse) Reset() { + *x = SendResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_ledger_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SendResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +type Send_Approve struct { + Approve *Approve `protobuf:"bytes,5,opt,name=approve,proto3,oneof"` +} + +func (*Send_Approve) isSend_Extension() {} + +type Send_TransferFrom struct { + TransferFrom *TransferFrom `protobuf:"bytes,6,opt,name=transfer_from,json=transferFrom,proto3,oneof"` +} + +func (*Send_TransferFrom) isSend_Extension() {} + +type Subaccount struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SubAccount []byte `protobuf:"bytes,1,opt,name=sub_account,json=subAccount,proto3" json:"sub_account,omitempty"` +} + +// Deprecated: Use Subaccount.ProtoReflect.Descriptor instead. +func (*Subaccount) Descriptor() ([]byte, []int) { + return file_ledger_proto_rawDescGZIP(), []int{47} +} + +func (x *Subaccount) GetSubAccount() []byte { + if x != nil { + return x.SubAccount + } + return nil +} + +func (*Subaccount) ProtoMessage() {} + +func (x *Subaccount) ProtoReflect() protoreflect.Message { + mi := &file_ledger_proto_msgTypes[47] + 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 *Subaccount) Reset() { + *x = Subaccount{} + if protoimpl.UnsafeEnabled { + mi := &file_ledger_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Subaccount) String() string { + return protoimpl.X.MessageStringOf(x) +} + +type TimeStamp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TimestampNanos uint64 `protobuf:"varint,1,opt,name=timestamp_nanos,json=timestampNanos,proto3" json:"timestamp_nanos,omitempty"` +} + +// Deprecated: Use TimeStamp.ProtoReflect.Descriptor instead. +func (*TimeStamp) Descriptor() ([]byte, []int) { + return file_ledger_proto_rawDescGZIP(), []int{50} +} + +func (x *TimeStamp) GetTimestampNanos() uint64 { + if x != nil { + return x.TimestampNanos + } + return 0 +} + +func (*TimeStamp) ProtoMessage() {} + +func (x *TimeStamp) ProtoReflect() protoreflect.Message { + mi := &file_ledger_proto_msgTypes[50] + 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 *TimeStamp) Reset() { + *x = TimeStamp{} + if protoimpl.UnsafeEnabled { + mi := &file_ledger_proto_msgTypes[50] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TimeStamp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +// Get the length of the chain with a certification +type TipOfChainRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +// Deprecated: Use TipOfChainRequest.ProtoReflect.Descriptor instead. +func (*TipOfChainRequest) Descriptor() ([]byte, []int) { + return file_ledger_proto_rawDescGZIP(), []int{12} +} + +func (*TipOfChainRequest) ProtoMessage() {} + +func (x *TipOfChainRequest) ProtoReflect() protoreflect.Message { + mi := &file_ledger_proto_msgTypes[12] + 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 *TipOfChainRequest) Reset() { + *x = TipOfChainRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_ledger_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TipOfChainRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +type TipOfChainResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Certification *Certification `protobuf:"bytes,1,opt,name=certification,proto3" json:"certification,omitempty"` + ChainLength *BlockIndex `protobuf:"bytes,2,opt,name=chain_length,json=chainLength,proto3" json:"chain_length,omitempty"` +} + +// Deprecated: Use TipOfChainResponse.ProtoReflect.Descriptor instead. +func (*TipOfChainResponse) Descriptor() ([]byte, []int) { + return file_ledger_proto_rawDescGZIP(), []int{13} +} + +func (x *TipOfChainResponse) GetCertification() *Certification { + if x != nil { + return x.Certification + } + return nil +} + +func (x *TipOfChainResponse) GetChainLength() *BlockIndex { + if x != nil { + return x.ChainLength + } + return nil +} + +func (*TipOfChainResponse) ProtoMessage() {} + +func (x *TipOfChainResponse) ProtoReflect() protoreflect.Message { + mi := &file_ledger_proto_msgTypes[13] + 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 *TipOfChainResponse) Reset() { + *x = TipOfChainResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_ledger_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TipOfChainResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +// ** BASIC TYPES ** +type Tokens struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + E8S uint64 `protobuf:"varint,1,opt,name=e8s,proto3" json:"e8s,omitempty"` +} + +// Deprecated: Use Tokens.ProtoReflect.Descriptor instead. +func (*Tokens) Descriptor() ([]byte, []int) { + return file_ledger_proto_rawDescGZIP(), []int{34} +} + +func (x *Tokens) GetE8S() uint64 { + if x != nil { + return x.E8S + } + return 0 +} + +func (*Tokens) ProtoMessage() {} + +func (x *Tokens) ProtoReflect() protoreflect.Message { + mi := &file_ledger_proto_msgTypes[34] + 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 *Tokens) Reset() { + *x = Tokens{} + if protoimpl.UnsafeEnabled { + mi := &file_ledger_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Tokens) String() string { + return protoimpl.X.MessageStringOf(x) +} + +type ToppedUp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +// Deprecated: Use ToppedUp.ProtoReflect.Descriptor instead. +func (*ToppedUp) Descriptor() ([]byte, []int) { + return file_ledger_proto_rawDescGZIP(), []int{22} +} + +func (*ToppedUp) ProtoMessage() {} + +func (x *ToppedUp) ProtoReflect() protoreflect.Message { + mi := &file_ledger_proto_msgTypes[22] + 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 *ToppedUp) Reset() { + *x = ToppedUp{} + if protoimpl.UnsafeEnabled { + mi := &file_ledger_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ToppedUp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +// How many Tokens are there not in the minting account +type TotalSupplyRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +// Deprecated: Use TotalSupplyRequest.ProtoReflect.Descriptor instead. +func (*TotalSupplyRequest) Descriptor() ([]byte, []int) { + return file_ledger_proto_rawDescGZIP(), []int{14} +} + +func (*TotalSupplyRequest) ProtoMessage() {} + +func (x *TotalSupplyRequest) ProtoReflect() protoreflect.Message { + mi := &file_ledger_proto_msgTypes[14] + 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 *TotalSupplyRequest) Reset() { + *x = TotalSupplyRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_ledger_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TotalSupplyRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +type TotalSupplyResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TotalSupply *Tokens `protobuf:"bytes,1,opt,name=total_supply,json=totalSupply,proto3" json:"total_supply,omitempty"` +} + +// Deprecated: Use TotalSupplyResponse.ProtoReflect.Descriptor instead. +func (*TotalSupplyResponse) Descriptor() ([]byte, []int) { + return file_ledger_proto_rawDescGZIP(), []int{15} +} + +func (x *TotalSupplyResponse) GetTotalSupply() *Tokens { + if x != nil { + return x.TotalSupply + } + return nil +} + +func (*TotalSupplyResponse) ProtoMessage() {} + +func (x *TotalSupplyResponse) ProtoReflect() protoreflect.Message { + mi := &file_ledger_proto_msgTypes[15] + 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 *TotalSupplyResponse) Reset() { + *x = TotalSupplyResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_ledger_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TotalSupplyResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +type Transaction struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Transfer: + // + // *Transaction_Burn + // *Transaction_Mint + // *Transaction_Send + Transfer isTransaction_Transfer `protobuf_oneof:"transfer"` + Memo *Memo `protobuf:"bytes,4,opt,name=memo,proto3" json:"memo,omitempty"` + Icrc1Memo *Icrc1Memo `protobuf:"bytes,7,opt,name=icrc1_memo,json=icrc1Memo,proto3" json:"icrc1_memo,omitempty"` + CreatedAt *BlockIndex `protobuf:"bytes,5,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` // obsolete + CreatedAtTime *TimeStamp `protobuf:"bytes,6,opt,name=created_at_time,json=createdAtTime,proto3" json:"created_at_time,omitempty"` +} + +// Deprecated: Use Transaction.ProtoReflect.Descriptor instead. +func (*Transaction) Descriptor() ([]byte, []int) { + return file_ledger_proto_rawDescGZIP(), []int{40} +} + +func (x *Transaction) GetBurn() *Burn { + if x, ok := x.GetTransfer().(*Transaction_Burn); ok { + return x.Burn + } + return nil +} + +func (x *Transaction) GetCreatedAt() *BlockIndex { + if x != nil { + return x.CreatedAt + } + return nil +} + +func (x *Transaction) GetCreatedAtTime() *TimeStamp { + if x != nil { + return x.CreatedAtTime + } + return nil +} + +func (x *Transaction) GetIcrc1Memo() *Icrc1Memo { + if x != nil { + return x.Icrc1Memo + } + return nil +} + +func (x *Transaction) GetMemo() *Memo { + if x != nil { + return x.Memo + } + return nil +} + +func (x *Transaction) GetMint() *Mint { + if x, ok := x.GetTransfer().(*Transaction_Mint); ok { + return x.Mint + } + return nil +} + +func (x *Transaction) GetSend() *Send { + if x, ok := x.GetTransfer().(*Transaction_Send); ok { + return x.Send + } + return nil +} + +func (m *Transaction) GetTransfer() isTransaction_Transfer { + if m != nil { + return m.Transfer + } + return nil +} + +func (*Transaction) ProtoMessage() {} + +func (x *Transaction) ProtoReflect() protoreflect.Message { + mi := &file_ledger_proto_msgTypes[40] + 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 *Transaction) Reset() { + *x = Transaction{} + if protoimpl.UnsafeEnabled { + mi := &file_ledger_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Transaction) String() string { + return protoimpl.X.MessageStringOf(x) +} + +type TransactionNotificationRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + From *PrincipalId `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` + FromSubaccount *Subaccount `protobuf:"bytes,2,opt,name=from_subaccount,json=fromSubaccount,proto3" json:"from_subaccount,omitempty"` + To *PrincipalId `protobuf:"bytes,3,opt,name=to,proto3" json:"to,omitempty"` + ToSubaccount *Subaccount `protobuf:"bytes,4,opt,name=to_subaccount,json=toSubaccount,proto3" json:"to_subaccount,omitempty"` + BlockHeight *BlockIndex `protobuf:"bytes,5,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` + Amount *Tokens `protobuf:"bytes,6,opt,name=amount,proto3" json:"amount,omitempty"` + Memo *Memo `protobuf:"bytes,7,opt,name=memo,proto3" json:"memo,omitempty"` +} + +// Deprecated: Use TransactionNotificationRequest.ProtoReflect.Descriptor instead. +func (*TransactionNotificationRequest) Descriptor() ([]byte, []int) { + return file_ledger_proto_rawDescGZIP(), []int{7} +} + +func (x *TransactionNotificationRequest) GetAmount() *Tokens { + if x != nil { + return x.Amount + } + return nil +} + +func (x *TransactionNotificationRequest) GetBlockHeight() *BlockIndex { + if x != nil { + return x.BlockHeight + } + return nil +} + +func (x *TransactionNotificationRequest) GetFrom() *PrincipalId { + if x != nil { + return x.From + } + return nil +} + +func (x *TransactionNotificationRequest) GetFromSubaccount() *Subaccount { + if x != nil { + return x.FromSubaccount + } + return nil +} + +func (x *TransactionNotificationRequest) GetMemo() *Memo { + if x != nil { + return x.Memo + } + return nil +} + +func (x *TransactionNotificationRequest) GetTo() *PrincipalId { + if x != nil { + return x.To + } + return nil +} + +func (x *TransactionNotificationRequest) GetToSubaccount() *Subaccount { + if x != nil { + return x.ToSubaccount + } + return nil +} + +func (*TransactionNotificationRequest) ProtoMessage() {} + +func (x *TransactionNotificationRequest) ProtoReflect() protoreflect.Message { + mi := &file_ledger_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +func (x *TransactionNotificationRequest) Reset() { + *x = TransactionNotificationRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_ledger_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TransactionNotificationRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +type TransactionNotificationResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Response []byte `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` +} + +// Deprecated: Use TransactionNotificationResponse.ProtoReflect.Descriptor instead. +func (*TransactionNotificationResponse) Descriptor() ([]byte, []int) { + return file_ledger_proto_rawDescGZIP(), []int{8} +} + +func (x *TransactionNotificationResponse) GetResponse() []byte { + if x != nil { + return x.Response + } + return nil +} + +func (*TransactionNotificationResponse) ProtoMessage() {} + +func (x *TransactionNotificationResponse) ProtoReflect() protoreflect.Message { + mi := &file_ledger_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +func (x *TransactionNotificationResponse) Reset() { + *x = TransactionNotificationResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_ledger_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TransactionNotificationResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +type Transaction_Burn struct { + Burn *Burn `protobuf:"bytes,1,opt,name=burn,proto3,oneof"` +} + +func (*Transaction_Burn) isTransaction_Transfer() {} + +type Transaction_Mint struct { + Mint *Mint `protobuf:"bytes,2,opt,name=mint,proto3,oneof"` +} + +func (*Transaction_Mint) isTransaction_Transfer() {} + +type Transaction_Send struct { + Send *Send `protobuf:"bytes,3,opt,name=send,proto3,oneof"` +} + +func (*Transaction_Send) isTransaction_Transfer() {} + +type TransferFeeRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +// Deprecated: Use TransferFeeRequest.ProtoReflect.Descriptor instead. +func (*TransferFeeRequest) Descriptor() ([]byte, []int) { + return file_ledger_proto_rawDescGZIP(), []int{52} +} + +func (*TransferFeeRequest) ProtoMessage() {} + +func (x *TransferFeeRequest) ProtoReflect() protoreflect.Message { + mi := &file_ledger_proto_msgTypes[52] + 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 *TransferFeeRequest) Reset() { + *x = TransferFeeRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_ledger_proto_msgTypes[52] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TransferFeeRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +type TransferFeeResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TransferFee *Tokens `protobuf:"bytes,1,opt,name=transfer_fee,json=transferFee,proto3" json:"transfer_fee,omitempty"` +} + +// Deprecated: Use TransferFeeResponse.ProtoReflect.Descriptor instead. +func (*TransferFeeResponse) Descriptor() ([]byte, []int) { + return file_ledger_proto_rawDescGZIP(), []int{53} +} + +func (x *TransferFeeResponse) GetTransferFee() *Tokens { + if x != nil { + return x.TransferFee + } + return nil +} + +func (*TransferFeeResponse) ProtoMessage() {} + +func (x *TransferFeeResponse) ProtoReflect() protoreflect.Message { + mi := &file_ledger_proto_msgTypes[53] + 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 *TransferFeeResponse) Reset() { + *x = TransferFeeResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_ledger_proto_msgTypes[53] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TransferFeeResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +type TransferFrom struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The default account id of the principal who sent the transaction. + Spender *AccountIdentifier `protobuf:"bytes,1,opt,name=spender,proto3" json:"spender,omitempty"` +} + +// Deprecated: Use TransferFrom.ProtoReflect.Descriptor instead. +func (*TransferFrom) Descriptor() ([]byte, []int) { + return file_ledger_proto_rawDescGZIP(), []int{42} +} + +func (x *TransferFrom) GetSpender() *AccountIdentifier { + if x != nil { + return x.Spender + } + return nil +} + +func (*TransferFrom) ProtoMessage() {} + +func (x *TransferFrom) ProtoReflect() protoreflect.Message { + mi := &file_ledger_proto_msgTypes[42] + 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 *TransferFrom) Reset() { + *x = TransferFrom{} + if protoimpl.UnsafeEnabled { + mi := &file_ledger_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TransferFrom) String() string { + return protoimpl.X.MessageStringOf(x) +} + +type isBlockResponse_BlockContent interface { + isBlockResponse_BlockContent() +} +type isCyclesNotificationResponse_Response interface { + isCyclesNotificationResponse_Response() +} +type isGetBlocksResponse_GetBlocksContent interface { + isGetBlocksResponse_GetBlocksContent() +} + +type isSend_Extension interface { + isSend_Extension() +} +type isTransaction_Transfer interface { + isTransaction_Transfer() +} diff --git a/clients/ledger/testdata/ledger.proto b/clients/ledger/testdata/ledger.proto new file mode 100644 index 0000000..737d760 --- /dev/null +++ b/clients/ledger/testdata/ledger.proto @@ -0,0 +1,333 @@ +syntax = "proto3"; + +package ic_ledger.pb.v1; +option go_package = "proto/v1"; + +import "google/protobuf/descriptor.proto"; + +// The annotated message is supported by hardware wallet signing. +// The numbering was chosen as the range 19000-19999 is anyway reserved in protobuf. +extend google.protobuf.MessageOptions { + bool tui_signed_message = 20000; +} + +// The annotated field is displayed on the hardware wallet in the specification +// used by launch of the Internet Computer. +extend google.protobuf.FieldOptions { + bool tui_signed_display_q2_2021 = 20001; +} + +// A PB container for a PrincipalId, which uniquely identifies +// a principal. +message PrincipalId { + option (tui_signed_message) = true; + bytes serialized_id = 1 [(tui_signed_display_q2_2021) = true]; +} +// Annotations related to the use of hardware wallets. The annotated messages are +// parsed on hardware wallets and marked fields are displayed in a trusted user +// interface (TUI). We must not, for instance, add fields that would change the +// semantics of the message such that old hardware wallets would not display +// appropriate information to users. + +// ** LEDGER CANISTER ENDPOINTS + +// Initialise the ledger canister +message LedgerInit { + AccountIdentifier minting_account = 1; + repeated Account initial_values = 2; + PrincipalId archive_canister = 3; + uint32 max_message_size_bytes = 4; +} + +// The format of values serialized to/from the stable memory during and upgrade +message LedgerUpgrade {} + +// Make a payment +message SendRequest { + option (tui_signed_message) = true; + Memo memo = 1 [(tui_signed_display_q2_2021) = true]; + Payment payment = 2 [(tui_signed_display_q2_2021) = true]; + Tokens max_fee = 3 [(tui_signed_display_q2_2021) = true]; + Subaccount from_subaccount = 4 [(tui_signed_display_q2_2021) = true]; + AccountIdentifier to = 5 [(tui_signed_display_q2_2021) = true]; + BlockIndex created_at = 6; + TimeStamp created_at_time = 7; +} + +message SendResponse { + BlockIndex resulting_height = 1; +} + +// Notify a canister that it has received a payment +message NotifyRequest { + option (tui_signed_message) = true; + BlockIndex block_height = 1 [(tui_signed_display_q2_2021) = true]; + Tokens max_fee = 2 [(tui_signed_display_q2_2021) = true]; + Subaccount from_subaccount = 3 [(tui_signed_display_q2_2021) = true]; + PrincipalId to_canister = 4 [(tui_signed_display_q2_2021) = true]; + Subaccount to_subaccount = 5 [(tui_signed_display_q2_2021) = true]; +} + +message NotifyResponse {} + +message TransactionNotificationRequest { + PrincipalId from = 1; + Subaccount from_subaccount = 2; + PrincipalId to = 3; + Subaccount to_subaccount = 4; + BlockIndex block_height = 5; + Tokens amount = 6; + Memo memo = 7; +} + +message TransactionNotificationResponse { + bytes response = 1; +} + +message CyclesNotificationResponse { + oneof response { + PrincipalId created_canister_id = 1; + Refund refund = 2; + ToppedUp topped_up = 3; + } +} + +// Get the balance of an account +message AccountBalanceRequest { + AccountIdentifier account = 1; +} + +message AccountBalanceResponse { + Tokens balance = 1; +} + +// Get the length of the chain with a certification +message TipOfChainRequest {} + +message TipOfChainResponse { + Certification certification = 1; + BlockIndex chain_length = 2; +} + +// How many Tokens are there not in the minting account +message TotalSupplyRequest {} + +message TotalSupplyResponse { + Tokens total_supply = 1; +} + +// Archive any blocks older than this +message LedgerArchiveRequest { + TimeStamp timestamp = 1; +} + +// * Shared Endpoints * + +// Get a single block +message BlockRequest { + uint64 block_height = 1; +} + +message EncodedBlock { + bytes block = 1; +} + +message BlockResponse { + oneof block_content { + EncodedBlock block = 1; + PrincipalId canister_id = 2; + } +} + +// Get a set of blocks +message GetBlocksRequest { + uint64 start = 1; + uint64 length = 2; +} + +message Refund { + BlockIndex refund = 2; + string error = 3; +} + +message ToppedUp {} + +message EncodedBlocks { + repeated EncodedBlock blocks = 1; +} + +message GetBlocksResponse { + oneof get_blocks_content { + EncodedBlocks blocks = 1; + string error = 2; + } +} + +// Iterate through blocks +message IterBlocksRequest { + uint64 start = 1; + uint64 length = 2; +} + +message IterBlocksResponse { + repeated EncodedBlock blocks = 1; +} + +message ArchiveIndexEntry { + uint64 height_from = 1; + uint64 height_to = 2; + PrincipalId canister_id = 3; +} + +message ArchiveIndexResponse { + repeated ArchiveIndexEntry entries = 1; +} + +// ** ARCHIVE CANISTER ENDPOINTS ** + +// * Archive canister * +// Init the archive canister +message ArchiveInit { + uint32 node_max_memory_size_bytes = 1; + uint32 max_message_size_bytes = 2; +} + +// Add blocks to the archive canister +message ArchiveAddRequest { + repeated Block blocks = 1; +} + +message ArchiveAddResponse {} + +// Fetch a list of all of the archive nodes +message GetNodesRequest {} + +message GetNodesResponse { + repeated PrincipalId nodes = 1; +} + +// ** BASIC TYPES ** +message Tokens { + option (tui_signed_message) = true; + uint64 e8s = 1 [(tui_signed_display_q2_2021) = true]; +} + +message Payment { + option (tui_signed_message) = true; + Tokens receiver_gets = 1 [(tui_signed_display_q2_2021) = true]; +} + +message BlockIndex { + option (tui_signed_message) = true; + uint64 height = 1 [(tui_signed_display_q2_2021) = true]; +} + +// This is the +message Block { + Hash parent_hash = 1; + TimeStamp timestamp = 2; + Transaction transaction = 3; +} + +message Hash { + bytes hash = 1; +} + +message Account { + AccountIdentifier identifier = 1; + Tokens balance = 2; +} + +message Transaction { + oneof transfer { + Burn burn = 1; + Mint mint = 2; + Send send = 3; + } + Memo memo = 4; + Icrc1Memo icrc1_memo = 7; + BlockIndex created_at = 5; // obsolete + TimeStamp created_at_time = 6; +} + +message Send { + // The meaning of the [from] field depends on the transaction type: + // - Transfer: [from] is the source account. + // - TransferFrom: [from] is the approver. + // - Approve: [from] is the approver. + AccountIdentifier from = 1; + // The meaning of the [to] field depends on the transaction type: + // - Transfer: [to] is the destination account. + // - TransferFrom: [to] is the destination account. + // - Approve: [to] is the default account id of the approved principal. + AccountIdentifier to = 2; + // If the transaction type is Approve, the amount must be zero. + Tokens amount = 3; + Tokens max_fee = 4; + + // We represent metadata of new operation types as submessages for + // backward compatibility with old clients. + oneof extension { + Approve approve = 5; + TransferFrom transfer_from = 6; + } +} + +message TransferFrom { + // The default account id of the principal who sent the transaction. + AccountIdentifier spender = 1; +} + +message Approve { + Tokens allowance = 1; + TimeStamp expires_at = 2; + Tokens expected_allowance = 3; +} + +message Mint { + AccountIdentifier to = 2; + Tokens amount = 3; +} + +message Burn { + AccountIdentifier from = 1; + Tokens amount = 3; + AccountIdentifier spender = 4; +} + +message AccountIdentifier { + option (tui_signed_message) = true; + // Can contain either: + // * the 32 byte identifier (4 byte checksum + 28 byte hash) + // * the 28 byte hash + bytes hash = 1 [(tui_signed_display_q2_2021) = true]; +} + +message Subaccount { + option (tui_signed_message) = true; + bytes sub_account = 1 [(tui_signed_display_q2_2021) = true]; +} + +message Memo { + option (tui_signed_message) = true; + uint64 memo = 1 [(tui_signed_display_q2_2021) = true]; +} + +message Icrc1Memo { + option (tui_signed_message) = true; + bytes memo = 1 [(tui_signed_display_q2_2021) = true]; +} + +message TimeStamp { + uint64 timestamp_nanos = 1; +} + +message Certification { + bytes certification = 1; +} + +message TransferFeeRequest {} + +message TransferFeeResponse { + Tokens transfer_fee = 1; +} diff --git a/clients/registry/proto/v1/local.pb.go b/clients/registry/proto/v1/local.pb.go index b5b26f7..db16176 100644 --- a/clients/registry/proto/v1/local.pb.go +++ b/clients/registry/proto/v1/local.pb.go @@ -105,81 +105,6 @@ 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) @@ -187,8 +112,6 @@ 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 @@ -425,6 +348,7 @@ const ( func (MutationType) Descriptor() protoreflect.EnumDescriptor { return file_local_proto_enumTypes[0].Descriptor() } + func (x MutationType) Enum() *MutationType { p := new(MutationType) *p = x @@ -438,10 +362,85 @@ 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/node.pb.go b/clients/registry/proto/v1/node.pb.go index c7bbc1f..a4fd0c6 100644 --- a/clients/registry/proto/v1/node.pb.go +++ b/clients/registry/proto/v1/node.pb.go @@ -180,6 +180,8 @@ func file_node_proto_rawDescGZIP() []byte { return file_node_proto_rawDescData } +func init() { file_node_proto_init() } + // A connection endpoint. type ConnectionEndpoint struct { state protoimpl.MessageState @@ -382,7 +384,6 @@ func (x *NodeRecord) GetXnet() *ConnectionEndpoint { } return nil } - func (*NodeRecord) ProtoMessage() {} func (x *NodeRecord) ProtoReflect() protoreflect.Message { mi := &file_node_proto_msgTypes[2] @@ -395,6 +396,7 @@ func (x *NodeRecord) ProtoReflect() protoreflect.Message { } return mi.MessageOf(x) } + func (x *NodeRecord) Reset() { *x = NodeRecord{} if protoimpl.UnsafeEnabled { @@ -403,8 +405,6 @@ func (x *NodeRecord) Reset() { ms.StoreMessageInfo(mi) } } - func (x *NodeRecord) String() string { return protoimpl.X.MessageStringOf(x) } -func init() { file_node_proto_init() } From b217415ca2de6a128aac87dc4d318c3371901fa6 Mon Sep 17 00:00:00 2001 From: Quint Daenen Date: Tue, 2 Jul 2024 20:59:45 +0200 Subject: [PATCH 4/4] Use protoc v5.27. --- clients/ledger/proto/v1/ledger.pb.go | 2 +- clients/registry/proto/v1/local.pb.go | 2 +- clients/registry/proto/v1/node.pb.go | 2 +- clients/registry/proto/v1/operator.pb.go | 110 +- clients/registry/proto/v1/registry.pb.go | 108 +- clients/registry/proto/v1/subnet.pb.go | 2425 ++++++++++----------- clients/registry/proto/v1/transport.pb.go | 2 +- 7 files changed, 1325 insertions(+), 1326 deletions(-) diff --git a/clients/ledger/proto/v1/ledger.pb.go b/clients/ledger/proto/v1/ledger.pb.go index 8cd4a7a..6e0b8a2 100644 --- a/clients/ledger/proto/v1/ledger.pb.go +++ b/clients/ledger/proto/v1/ledger.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.34.2 -// protoc v5.27.0 +// protoc v5.26.1 // source: ledger.proto package v1 diff --git a/clients/registry/proto/v1/local.pb.go b/clients/registry/proto/v1/local.pb.go index db16176..0c95201 100644 --- a/clients/registry/proto/v1/local.pb.go +++ b/clients/registry/proto/v1/local.pb.go @@ -3,7 +3,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.34.2 -// protoc v5.27.0 +// protoc v5.26.1 // source: local.proto package v1 diff --git a/clients/registry/proto/v1/node.pb.go b/clients/registry/proto/v1/node.pb.go index a4fd0c6..f8e70a8 100644 --- a/clients/registry/proto/v1/node.pb.go +++ b/clients/registry/proto/v1/node.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.34.2 -// protoc v5.27.0 +// protoc v5.26.1 // source: node.proto package v1 diff --git a/clients/registry/proto/v1/operator.pb.go b/clients/registry/proto/v1/operator.pb.go index d3ee07f..430bc94 100644 --- a/clients/registry/proto/v1/operator.pb.go +++ b/clients/registry/proto/v1/operator.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.34.2 -// protoc v5.27.0 +// protoc v5.26.1 // source: operator.proto package v1 @@ -83,57 +83,6 @@ 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) @@ -141,8 +90,6 @@ 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. // @@ -265,7 +212,9 @@ 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 { @@ -277,7 +226,6 @@ func (x *RemoveNodeOperatorsPayload) ProtoReflect() protoreflect.Message { } return mi.MessageOf(x) } - func (x *RemoveNodeOperatorsPayload) Reset() { *x = RemoveNodeOperatorsPayload{} if protoimpl.UnsafeEnabled { @@ -289,3 +237,55 @@ 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 8d15c31..a401912 100644 --- a/clients/registry/proto/v1/registry.pb.go +++ b/clients/registry/proto/v1/registry.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.34.2 -// protoc v5.27.0 +// protoc v5.26.1 // source: registry.proto package v1 @@ -70,56 +70,6 @@ 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) @@ -127,8 +77,6 @@ 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 @@ -211,7 +159,9 @@ 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 { @@ -223,7 +173,6 @@ func (x *ProtoRegistryRecord) ProtoReflect() protoreflect.Message { } return mi.MessageOf(x) } - func (x *ProtoRegistryRecord) Reset() { *x = ProtoRegistryRecord{} if protoimpl.UnsafeEnabled { @@ -235,3 +184,54 @@ 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 2d449b4..c345e10 100644 --- a/clients/registry/proto/v1/subnet.pb.go +++ b/clients/registry/proto/v1/subnet.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.34.2 -// protoc v5.27.0 +// protoc v5.26.1 // source: subnet.proto package v1 @@ -852,558 +852,449 @@ 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_init() { - if File_subnet_proto != nil { - return +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 } - 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 - } + 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 + } + 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) } - 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 *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[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 - } - } - 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 - } - } - 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 - } - } - 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 - } + 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[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 *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[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 - } - } - 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), + return ms } - 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 + return mi.MessageOf(x) } -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 *EcdsaConfig) Reset() { + *x = EcdsaConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_subnet_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func init() { file_subnet_proto_init() } +func (x *EcdsaConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} -// An algorithm ID. This is used to specify the signature algorithm associated with a public key. -type AlgorithmId int32 +// Types of curves that can be used for ECDSA signatures. +type EcdsaCurve 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 + EcdsaCurve_ECDSA_CURVE_UNSPECIFIED EcdsaCurve = 0 + EcdsaCurve_ECDSA_CURVE_SECP256K1 EcdsaCurve = 1 ) -func (AlgorithmId) Descriptor() protoreflect.EnumDescriptor { - return file_subnet_proto_enumTypes[2].Descriptor() +func (EcdsaCurve) Descriptor() protoreflect.EnumDescriptor { + return file_subnet_proto_enumTypes[0].Descriptor() } -func (x AlgorithmId) Enum() *AlgorithmId { - p := new(AlgorithmId) +func (x EcdsaCurve) Enum() *EcdsaCurve { + p := new(EcdsaCurve) *p = x return p } -// Deprecated: Use AlgorithmId.Descriptor instead. -func (AlgorithmId) EnumDescriptor() ([]byte, []int) { - return file_subnet_proto_rawDescGZIP(), []int{2} +// Deprecated: Use EcdsaCurve.Descriptor instead. +func (EcdsaCurve) EnumDescriptor() ([]byte, []int) { + return file_subnet_proto_rawDescGZIP(), []int{0} } -func (x AlgorithmId) Number() protoreflect.EnumNumber { +func (x EcdsaCurve) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } -func (x AlgorithmId) String() string { +func (x EcdsaCurve) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } -func (AlgorithmId) Type() protoreflect.EnumType { - return &file_subnet_proto_enumTypes[2] +func (EcdsaCurve) Type() protoreflect.EnumType { + return &file_subnet_proto_enumTypes[0] } -// 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 { +type EcdsaInitialization 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 + 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 *CatchUpPackageContents) GetInitialNiDkgTranscriptLowThreshold() *InitialNiDkgTranscriptRecord { - if x != nil { - return x.InitialNiDkgTranscriptLowThreshold - } - return nil +// Deprecated: Use EcdsaInitialization.ProtoReflect.Descriptor instead. +func (*EcdsaInitialization) Descriptor() ([]byte, []int) { + return file_subnet_proto_rawDescGZIP(), []int{2} } -func (x *CatchUpPackageContents) GetRegistryStoreUri() *RegistryStoreUri { +func (x *EcdsaInitialization) GetDealings() *InitialIDkgDealings { if x != nil { - return x.RegistryStoreUri + return x.Dealings } return nil } -func (x *CatchUpPackageContents) GetStateHash() []byte { +func (x *EcdsaInitialization) GetKeyId() *EcdsaKeyId { if x != nil { - return x.StateHash + return x.KeyId } return nil } -func (x *CatchUpPackageContents) GetTime() uint64 { - if x != nil { - return x.Time - } - return 0 -} - -func (*CatchUpPackageContents) ProtoMessage() {} +func (*EcdsaInitialization) ProtoMessage() {} -func (x *CatchUpPackageContents) ProtoReflect() protoreflect.Message { - mi := &file_subnet_proto_msgTypes[3] +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 { @@ -1414,64 +1305,51 @@ func (x *CatchUpPackageContents) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -func (x *CatchUpPackageContents) Reset() { - *x = CatchUpPackageContents{} +func (x *EcdsaInitialization) Reset() { + *x = EcdsaInitialization{} if protoimpl.UnsafeEnabled { - mi := &file_subnet_proto_msgTypes[3] + mi := &file_subnet_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *CatchUpPackageContents) String() string { +func (x *EcdsaInitialization) String() string { return protoimpl.X.MessageStringOf(x) } -// Per-subnet chain key configuration -type ChainKeyConfig struct { +type EcdsaKeyId 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} + 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 *ChainKeyConfig) GetIdkgKeyRotationPeriodMs() uint64 { - if x != nil && x.IdkgKeyRotationPeriodMs != nil { - return *x.IdkgKeyRotationPeriodMs - } - return 0 +// Deprecated: Use EcdsaKeyId.ProtoReflect.Descriptor instead. +func (*EcdsaKeyId) Descriptor() ([]byte, []int) { + return file_subnet_proto_rawDescGZIP(), []int{1} } -func (x *ChainKeyConfig) GetKeyConfigs() []*KeyConfig { +func (x *EcdsaKeyId) GetCurve() EcdsaCurve { if x != nil { - return x.KeyConfigs + return x.Curve } - return nil + return EcdsaCurve_ECDSA_CURVE_UNSPECIFIED } -func (x *ChainKeyConfig) GetSignatureRequestTimeoutNs() uint64 { - if x != nil && x.SignatureRequestTimeoutNs != nil { - return *x.SignatureRequestTimeoutNs +func (x *EcdsaKeyId) GetName() string { + if x != nil { + return x.Name } - return 0 + return "" } -func (*ChainKeyConfig) ProtoMessage() {} +func (*EcdsaKeyId) ProtoMessage() {} -func (x *ChainKeyConfig) ProtoReflect() protoreflect.Message { - mi := &file_subnet_proto_msgTypes[30] +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 { @@ -1482,51 +1360,51 @@ func (x *ChainKeyConfig) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -func (x *ChainKeyConfig) Reset() { - *x = ChainKeyConfig{} +func (x *EcdsaKeyId) Reset() { + *x = EcdsaKeyId{} if protoimpl.UnsafeEnabled { - mi := &file_subnet_proto_msgTypes[30] + mi := &file_subnet_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *ChainKeyConfig) String() string { +func (x *EcdsaKeyId) String() string { return protoimpl.X.MessageStringOf(x) } -type DealerTuple struct { +type ExtendedDerivationPath 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"` + 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 DealerTuple.ProtoReflect.Descriptor instead. -func (*DealerTuple) Descriptor() ([]byte, []int) { - return file_subnet_proto_rawDescGZIP(), []int{15} +// Deprecated: Use ExtendedDerivationPath.ProtoReflect.Descriptor instead. +func (*ExtendedDerivationPath) Descriptor() ([]byte, []int) { + return file_subnet_proto_rawDescGZIP(), []int{23} } -func (x *DealerTuple) GetDealerId() *NodeId { +func (x *ExtendedDerivationPath) GetCaller() *PrincipalId { if x != nil { - return x.DealerId + return x.Caller } return nil } -func (x *DealerTuple) GetDealerIndex() uint32 { +func (x *ExtendedDerivationPath) GetDerivationPath() [][]byte { if x != nil { - return x.DealerIndex + return x.DerivationPath } - return 0 + return nil } -func (*DealerTuple) ProtoMessage() {} +func (*ExtendedDerivationPath) ProtoMessage() {} -func (x *DealerTuple) ProtoReflect() protoreflect.Message { - mi := &file_subnet_proto_msgTypes[15] +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 { @@ -1537,84 +1415,109 @@ func (x *DealerTuple) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -func (x *DealerTuple) Reset() { - *x = DealerTuple{} +func (x *ExtendedDerivationPath) Reset() { + *x = ExtendedDerivationPath{} if protoimpl.UnsafeEnabled { - mi := &file_subnet_proto_msgTypes[15] + mi := &file_subnet_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *DealerTuple) String() string { +func (x *ExtendedDerivationPath) String() string { return protoimpl.X.MessageStringOf(x) } -// Per subnet ECDSA configuration -// -// Deprecated; please use ChainKeyConfig instead. -type EcdsaConfig 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 - // 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 { + // 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.KeyIds + return x.MaxArtifactStreamsPerPeer } - return nil + return 0 } -func (x *EcdsaConfig) GetMaxQueueSize() uint32 { +func (x *GossipConfig) GetMaxChunkSize() uint32 { if x != nil { - return x.MaxQueueSize + return x.MaxChunkSize } return 0 } -func (x *EcdsaConfig) GetQuadruplesToCreateInAdvance() uint32 { +func (x *GossipConfig) GetMaxChunkWaitMs() uint32 { if x != nil { - return x.QuadruplesToCreateInAdvance + return x.MaxChunkWaitMs } return 0 } -func (x *EcdsaConfig) GetSignatureRequestTimeoutNs() uint64 { - if x != nil && x.SignatureRequestTimeoutNs != nil { - return *x.SignatureRequestTimeoutNs +func (x *GossipConfig) GetMaxDuplicity() uint32 { + if x != nil { + return x.MaxDuplicity } return 0 } -func (*EcdsaConfig) ProtoMessage() {} +func (x *GossipConfig) GetPfnEvaluationPeriodMs() uint32 { + if x != nil { + return x.PfnEvaluationPeriodMs + } + return 0 +} -func (x *EcdsaConfig) ProtoReflect() protoreflect.Message { - mi := &file_subnet_proto_msgTypes[26] +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 { @@ -1625,86 +1528,59 @@ func (x *EcdsaConfig) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -func (x *EcdsaConfig) Reset() { - *x = EcdsaConfig{} +func (x *GossipConfig) Reset() { + *x = GossipConfig{} if protoimpl.UnsafeEnabled { - mi := &file_subnet_proto_msgTypes[26] + mi := &file_subnet_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *EcdsaConfig) String() string { +func (x *GossipConfig) 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 { +type IDkgComplaint 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"` + 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 EcdsaInitialization.ProtoReflect.Descriptor instead. -func (*EcdsaInitialization) Descriptor() ([]byte, []int) { - return file_subnet_proto_rawDescGZIP(), []int{2} +// Deprecated: Use IDkgComplaint.ProtoReflect.Descriptor instead. +func (*IDkgComplaint) Descriptor() ([]byte, []int) { + return file_subnet_proto_rawDescGZIP(), []int{21} } -func (x *EcdsaInitialization) GetDealings() *InitialIDkgDealings { +func (x *IDkgComplaint) GetDealer() *NodeId { if x != nil { - return x.Dealings + return x.Dealer } return nil } -func (x *EcdsaInitialization) GetKeyId() *EcdsaKeyId { +func (x *IDkgComplaint) GetRawComplaint() []byte { if x != nil { - return x.KeyId + return x.RawComplaint } return nil } -func (*EcdsaInitialization) ProtoMessage() {} +func (x *IDkgComplaint) GetTranscriptId() *IDkgTranscriptId { + if x != nil { + return x.TranscriptId + } + return nil +} -func (x *EcdsaInitialization) ProtoReflect() protoreflect.Message { - mi := &file_subnet_proto_msgTypes[2] +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 { @@ -1715,51 +1591,51 @@ func (x *EcdsaInitialization) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -func (x *EcdsaInitialization) Reset() { - *x = EcdsaInitialization{} +func (x *IDkgComplaint) Reset() { + *x = IDkgComplaint{} if protoimpl.UnsafeEnabled { - mi := &file_subnet_proto_msgTypes[2] + mi := &file_subnet_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *EcdsaInitialization) String() string { +func (x *IDkgComplaint) String() string { return protoimpl.X.MessageStringOf(x) } -type EcdsaKeyId struct { +type IDkgDealing 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"` + 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 EcdsaKeyId.ProtoReflect.Descriptor instead. -func (*EcdsaKeyId) Descriptor() ([]byte, []int) { - return file_subnet_proto_rawDescGZIP(), []int{1} +// Deprecated: Use IDkgDealing.ProtoReflect.Descriptor instead. +func (*IDkgDealing) Descriptor() ([]byte, []int) { + return file_subnet_proto_rawDescGZIP(), []int{18} } -func (x *EcdsaKeyId) GetCurve() EcdsaCurve { +func (x *IDkgDealing) GetRawDealing() []byte { if x != nil { - return x.Curve + return x.RawDealing } - return EcdsaCurve_ECDSA_CURVE_UNSPECIFIED + return nil } -func (x *EcdsaKeyId) GetName() string { +func (x *IDkgDealing) GetTranscriptId() *IDkgTranscriptId { if x != nil { - return x.Name + return x.TranscriptId } - return "" + return nil } -func (*EcdsaKeyId) ProtoMessage() {} +func (*IDkgDealing) ProtoMessage() {} -func (x *EcdsaKeyId) ProtoReflect() protoreflect.Message { - mi := &file_subnet_proto_msgTypes[1] +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 { @@ -1770,51 +1646,59 @@ func (x *EcdsaKeyId) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -func (x *EcdsaKeyId) Reset() { - *x = EcdsaKeyId{} +func (x *IDkgDealing) Reset() { + *x = IDkgDealing{} if protoimpl.UnsafeEnabled { - mi := &file_subnet_proto_msgTypes[1] + mi := &file_subnet_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *EcdsaKeyId) String() string { +func (x *IDkgDealing) String() string { return protoimpl.X.MessageStringOf(x) } -type ExtendedDerivationPath struct { +type IDkgOpening 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"` + 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 ExtendedDerivationPath.ProtoReflect.Descriptor instead. -func (*ExtendedDerivationPath) Descriptor() ([]byte, []int) { - return file_subnet_proto_rawDescGZIP(), []int{23} +// Deprecated: Use IDkgOpening.ProtoReflect.Descriptor instead. +func (*IDkgOpening) Descriptor() ([]byte, []int) { + return file_subnet_proto_rawDescGZIP(), []int{22} } -func (x *ExtendedDerivationPath) GetCaller() *PrincipalId { +func (x *IDkgOpening) GetDealer() *NodeId { if x != nil { - return x.Caller + return x.Dealer } return nil } -func (x *ExtendedDerivationPath) GetDerivationPath() [][]byte { +func (x *IDkgOpening) GetRawOpening() []byte { if x != nil { - return x.DerivationPath + return x.RawOpening } return nil } -func (*ExtendedDerivationPath) ProtoMessage() {} +func (x *IDkgOpening) GetTranscriptId() *IDkgTranscriptId { + if x != nil { + return x.TranscriptId + } + return nil +} -func (x *ExtendedDerivationPath) ProtoReflect() protoreflect.Message { - mi := &file_subnet_proto_msgTypes[23] +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 { @@ -1825,109 +1709,59 @@ func (x *ExtendedDerivationPath) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -func (x *ExtendedDerivationPath) Reset() { - *x = ExtendedDerivationPath{} +func (x *IDkgOpening) Reset() { + *x = IDkgOpening{} if protoimpl.UnsafeEnabled { - mi := &file_subnet_proto_msgTypes[23] + mi := &file_subnet_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *ExtendedDerivationPath) String() string { +func (x *IDkgOpening) String() string { return protoimpl.X.MessageStringOf(x) } -// Per subnet P2P configuration -// Note: protoc is mangling the name P2PConfig to P2pConfig -type GossipConfig struct { +type IDkgSignedDealingTuple 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 + 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"` } -func (x *GossipConfig) GetPfnEvaluationPeriodMs() uint32 { - if x != nil { - return x.PfnEvaluationPeriodMs - } - return 0 +// Deprecated: Use IDkgSignedDealingTuple.ProtoReflect.Descriptor instead. +func (*IDkgSignedDealingTuple) Descriptor() ([]byte, []int) { + return file_subnet_proto_rawDescGZIP(), []int{19} } -func (x *GossipConfig) GetReceiveCheckCacheSize() uint32 { +func (x *IDkgSignedDealingTuple) GetDealer() *NodeId { if x != nil { - return x.ReceiveCheckCacheSize + return x.Dealer } - return 0 + return nil } -func (x *GossipConfig) GetRegistryPollPeriodMs() uint32 { +func (x *IDkgSignedDealingTuple) GetDealing() *IDkgDealing { if x != nil { - return x.RegistryPollPeriodMs + return x.Dealing } - return 0 + return nil } -func (x *GossipConfig) GetRetransmissionRequestMs() uint32 { +func (x *IDkgSignedDealingTuple) GetSignature() []byte { if x != nil { - return x.RetransmissionRequestMs + return x.Signature } - return 0 + return nil } -func (*GossipConfig) ProtoMessage() {} +func (*IDkgSignedDealingTuple) ProtoMessage() {} -func (x *GossipConfig) ProtoReflect() protoreflect.Message { - mi := &file_subnet_proto_msgTypes[24] +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 { @@ -1938,114 +1772,99 @@ func (x *GossipConfig) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -func (x *GossipConfig) Reset() { - *x = GossipConfig{} +func (x *IDkgSignedDealingTuple) Reset() { + *x = IDkgSignedDealingTuple{} if protoimpl.UnsafeEnabled { - mi := &file_subnet_proto_msgTypes[24] + mi := &file_subnet_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *GossipConfig) String() string { +func (x *IDkgSignedDealingTuple) String() string { return protoimpl.X.MessageStringOf(x) } -type IDkgComplaint struct { +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"` - 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"` + 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 IDkgComplaint.ProtoReflect.Descriptor instead. -func (*IDkgComplaint) Descriptor() ([]byte, []int) { - return file_subnet_proto_rawDescGZIP(), []int{21} +// Deprecated: Use IDkgTranscript.ProtoReflect.Descriptor instead. +func (*IDkgTranscript) Descriptor() ([]byte, []int) { + return file_subnet_proto_rawDescGZIP(), []int{14} } -func (x *IDkgComplaint) GetDealer() *NodeId { +func (x *IDkgTranscript) GetAlgorithmId() AlgorithmId { if x != nil { - return x.Dealer + return x.AlgorithmId } - return nil + return AlgorithmId_ALGORITHM_ID_UNSPECIFIED } -func (x *IDkgComplaint) GetRawComplaint() []byte { +func (x *IDkgTranscript) GetDealers() []*NodeId { if x != nil { - return x.RawComplaint + return x.Dealers } return nil } -func (x *IDkgComplaint) GetTranscriptId() *IDkgTranscriptId { +func (x *IDkgTranscript) GetRawTranscript() []byte { if x != nil { - return x.TranscriptId + return x.RawTranscript } 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) - } - return ms +func (x *IDkgTranscript) GetReceivers() []*NodeId { + if x != nil { + return x.Receivers } - return mi.MessageOf(x) + return nil } -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 *IDkgTranscript) GetRegistryVersion() uint64 { + if x != nil { + return x.RegistryVersion } + return 0 } -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 *IDkgTranscript) GetTranscriptId() *IDkgTranscriptId { + if x != nil { + return x.TranscriptId + } + return nil } -func (x *IDkgDealing) GetRawDealing() []byte { +func (x *IDkgTranscript) GetTranscriptType() []byte { if x != nil { - return x.RawDealing + return x.TranscriptType } return nil } -func (x *IDkgDealing) GetTranscriptId() *IDkgTranscriptId { +func (x *IDkgTranscript) GetVerifiedDealings() []*VerifiedIDkgDealing { if x != nil { - return x.TranscriptId + return x.VerifiedDealings } return nil } -func (*IDkgDealing) ProtoMessage() {} +func (*IDkgTranscript) ProtoMessage() {} -func (x *IDkgDealing) ProtoReflect() protoreflect.Message { - mi := &file_subnet_proto_msgTypes[18] +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 { @@ -2056,59 +1875,59 @@ func (x *IDkgDealing) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -func (x *IDkgDealing) Reset() { - *x = IDkgDealing{} +func (x *IDkgTranscript) Reset() { + *x = IDkgTranscript{} if protoimpl.UnsafeEnabled { - mi := &file_subnet_proto_msgTypes[18] + mi := &file_subnet_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *IDkgDealing) String() string { +func (x *IDkgTranscript) String() string { return protoimpl.X.MessageStringOf(x) } -type IDkgOpening struct { +type IDkgTranscriptId 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"` + 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 IDkgOpening.ProtoReflect.Descriptor instead. -func (*IDkgOpening) Descriptor() ([]byte, []int) { - return file_subnet_proto_rawDescGZIP(), []int{22} +// Deprecated: Use IDkgTranscriptId.ProtoReflect.Descriptor instead. +func (*IDkgTranscriptId) Descriptor() ([]byte, []int) { + return file_subnet_proto_rawDescGZIP(), []int{10} } -func (x *IDkgOpening) GetDealer() *NodeId { +func (x *IDkgTranscriptId) GetId() uint64 { if x != nil { - return x.Dealer + return x.Id } - return nil + return 0 } -func (x *IDkgOpening) GetRawOpening() []byte { +func (x *IDkgTranscriptId) GetSourceHeight() uint64 { if x != nil { - return x.RawOpening + return x.SourceHeight } - return nil + return 0 } -func (x *IDkgOpening) GetTranscriptId() *IDkgTranscriptId { +func (x *IDkgTranscriptId) GetSubnetId() *SubnetId { if x != nil { - return x.TranscriptId + return x.SubnetId } return nil } -func (*IDkgOpening) ProtoMessage() {} +func (*IDkgTranscriptId) ProtoMessage() {} -func (x *IDkgOpening) ProtoReflect() protoreflect.Message { - mi := &file_subnet_proto_msgTypes[22] +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 { @@ -2119,267 +1938,38 @@ func (x *IDkgOpening) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -func (x *IDkgOpening) Reset() { - *x = IDkgOpening{} +func (x *IDkgTranscriptId) Reset() { + *x = IDkgTranscriptId{} if protoimpl.UnsafeEnabled { - mi := &file_subnet_proto_msgTypes[22] + mi := &file_subnet_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *IDkgOpening) String() string { +func (x *IDkgTranscriptId) String() string { return protoimpl.X.MessageStringOf(x) } -type IDkgSignedDealingTuple struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +type IDkgTranscriptOperation int32 - 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"` +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 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) - } - 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) - } - 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) - } - 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 +func (x IDkgTranscriptOperation) Enum() *IDkgTranscriptOperation { + p := new(IDkgTranscriptOperation) + *p = x + return p } // Deprecated: Use IDkgTranscriptOperation.Descriptor instead. @@ -3690,130 +3280,539 @@ func (x *SubnetRecord) ProtoReflect() protoreflect.Message { if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } - 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 + } + 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 + } + 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) + } +} +func (x *VerifiedIDkgDealing) String() string { + return protoimpl.X.MessageStringOf(x) +} + +type isMasterPublicKeyId_KeyId interface { + isMasterPublicKeyId_KeyId() +} + +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 + } + } + 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 + } + } + 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 + } + } + 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 + } + } + 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 + } } - return ms } - 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[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), } -} - -func (x *VerifiedIDkgDealing) String() string { - return protoimpl.X.MessageStringOf(x) -} - -type isMasterPublicKeyId_KeyId interface { - isMasterPublicKeyId_KeyId() + 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 } diff --git a/clients/registry/proto/v1/transport.pb.go b/clients/registry/proto/v1/transport.pb.go index 19f902a..899fb15 100644 --- a/clients/registry/proto/v1/transport.pb.go +++ b/clients/registry/proto/v1/transport.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.34.2 -// protoc v5.27.0 +// protoc v5.26.1 // source: transport.proto // Set of messages used to interact with the registry canister.