From 1d5db836df01df88dd42f2267300f92841e36fb6 Mon Sep 17 00:00:00 2001 From: Bruno Gomes Date: Thu, 19 Dec 2024 16:28:21 -0300 Subject: [PATCH] metdata refactor wip --- example/access_ticket/main.go | 2 +- proto/sourcehub/acp/policy_cmd.proto | 9 +- proto/sourcehub/acp/query.proto | 14 +- proto/sourcehub/acp/record.proto | 36 + proto/sourcehub/acp/tx.proto | 3 +- tests/integration/acp/actions.go | 2 +- .../acp/suite/object/register_test.go | 12 +- .../suite/object/reveal_registration_test.go | 4 +- tests/integration/acp/suite/policy/tx_test.go | 7 +- .../acp/suite/relationship/set_test.go | 19 +- x/acp/client/cli/policy_cmd.go | 11 +- x/acp/keeper/acp_core.go | 23 + x/acp/keeper/keeper.go | 29 +- x/acp/keeper/msg_server_check_access.go | 2 +- x/acp/keeper/msg_server_create_policy.go | 12 +- x/acp/keeper/policy_cmd.go | 32 +- x/acp/keeper/query_policy.go | 6 +- x/acp/keeper/query_policy_ids.go | 2 +- x/acp/policy_cmd/doc.go | 2 + x/acp/policy_cmd/handler.go | 206 ++++ x/acp/policy_cmd/mapper.go | 10 + x/acp/policy_cmd/types.go | 19 + x/acp/registration/service.go | 4 +- x/acp/stores/adapter.go | 175 +++ x/acp/types/keys.go | 2 +- x/acp/types/policy_cmd.pb.go | 190 +-- x/acp/types/query.pb.go | 309 ++--- x/acp/types/record.pb.go | 1068 +++++++++++++++++ x/acp/types/tx.pb.go | 139 +-- 29 files changed, 1895 insertions(+), 454 deletions(-) create mode 100644 proto/sourcehub/acp/record.proto create mode 100644 x/acp/keeper/acp_core.go create mode 100644 x/acp/policy_cmd/doc.go create mode 100644 x/acp/policy_cmd/handler.go create mode 100644 x/acp/policy_cmd/mapper.go create mode 100644 x/acp/policy_cmd/types.go create mode 100644 x/acp/stores/adapter.go create mode 100644 x/acp/types/record.pb.go diff --git a/example/access_ticket/main.go b/example/access_ticket/main.go index c5a95f6f..9a6a2c30 100644 --- a/example/access_ticket/main.go +++ b/example/access_ticket/main.go @@ -81,7 +81,7 @@ func runDemo(chainId string, nodeAddr string, validatorKeyName string) { record := registerObject(ctx, client, &txBuilder, txSigner, policy.Id) log.Printf("Evaluating Access Request to read file:readme") - decision := checkAccess(ctx, client, &txBuilder, txSigner, policy.Id, record.OwnerDid, []*acptypes.Operation{ + decision := checkAccess(ctx, client, &txBuilder, txSigner, policy.Id, record.Metadata.Creator.Identifier, []*acptypes.Operation{ { Object: coretypes.NewObject("file", "readme"), Permission: "read", diff --git a/proto/sourcehub/acp/policy_cmd.proto b/proto/sourcehub/acp/policy_cmd.proto index 88228f8c..7cb46032 100644 --- a/proto/sourcehub/acp/policy_cmd.proto +++ b/proto/sourcehub/acp/policy_cmd.proto @@ -6,6 +6,7 @@ import "google/protobuf/timestamp.proto"; import "sourcenetwork/acp_core/relationship.proto"; import "sourcehub/acp/commitment.proto"; import "sourcehub/acp/registration.proto"; +import "sourcehub/acp/record.proto"; option go_package = "github.com/sourcenetwork/sourcehub/x/acp/types"; @@ -104,7 +105,7 @@ enum RegistrationResultStatus { message RevealRegistrationCmdResult { RegistrationResultStatus result = 1; - sourcenetwork.acp_core.RelationshipRecord record = 2; + RelationshipRecord record = 2; ObjectRegistrationEvent event = 3; } @@ -121,7 +122,7 @@ message UnarchiveObjectCmd{ } message UnarchiveObjectCmdResult{ - sourcenetwork.acp_core.RelationshipRecord record = 1; + RelationshipRecord record = 1; bool relationship_modified = 2; } @@ -145,7 +146,7 @@ message ArchiveObjectCmd { message SetRelationshipCmdResult { // Indicates whether the given Relationship previously existed, ie the Tx was a no op bool record_existed = 1; - sourcenetwork.acp_core.RelationshipRecord record = 2; + RelationshipRecord record = 2; } // DeleteRelationshipCmdResult removes a Relationship in a Policy @@ -155,7 +156,7 @@ message DeleteRelationshipCmdResult { // RegisterObjectCmdResult registers an Object in a Policy message RegisterObjectCmdResult { - sourcenetwork.acp_core.RelationshipRecord record = 1; + RelationshipRecord record = 1; } // ArchiveObjectCmdResult unregisters an Object in a Policy diff --git a/proto/sourcehub/acp/query.proto b/proto/sourcehub/acp/query.proto index 01465b12..ed47dd9b 100644 --- a/proto/sourcehub/acp/query.proto +++ b/proto/sourcehub/acp/query.proto @@ -9,6 +9,7 @@ import "google/api/annotations.proto"; import "sourcehub/acp/params.proto"; import "sourcehub/acp/access_decision.proto"; import "sourcehub/acp/registration.proto"; +import "sourcehub/acp/record.proto"; import "sourcehub/acp/commitment.proto"; import "sourcenetwork/acp_core/policy.proto"; import "sourcenetwork/acp_core/policy_short.proto"; @@ -114,23 +115,14 @@ message QueryPolicyRequest { } message QueryPolicyResponse { - sourcenetwork.acp_core.Policy policy = 1; - - // policy_raw contains the raw policy document the user submitted to create - // the policy - string policy_raw = 2; - - // marshal_type flags the format of policy_raw - sourcenetwork.acp_core.PolicyMarshalingType marshal_type = 3; + PolicyRecord record = 1; } message QueryPolicyIdsRequest { - //cosmos.base.query.v1beta1.PageRequest pagination = 1; } message QueryPolicyIdsResponse { - //cosmos.base.query.v1beta1.PageResponse pagination = 1; repeated string ids = 1; } @@ -141,7 +133,7 @@ message QueryFilterRelationshipsRequest { } message QueryFilterRelationshipsResponse { - repeated sourcenetwork.acp_core.RelationshipRecord records = 1; + repeated RelationshipRecord records = 1; } message QueryVerifyAccessRequestRequest { diff --git a/proto/sourcehub/acp/record.proto b/proto/sourcehub/acp/record.proto new file mode 100644 index 00000000..f21d9268 --- /dev/null +++ b/proto/sourcehub/acp/record.proto @@ -0,0 +1,36 @@ +syntax = "proto3"; + +package sourcehub.acp; + +import "amino/amino.proto"; +import "cosmos/msg/v1/msg.proto"; +import "cosmos_proto/cosmos.proto"; +import "gogoproto/gogo.proto"; +import "google/protobuf/timestamp.proto"; +import "sourcehub/acp/access_decision.proto"; +import "sourcehub/acp/time.proto"; +import "sourcenetwork/acp_core/policy_short.proto"; +import "sourcenetwork/acp_core/policy.proto"; +import "sourcenetwork/acp_core/relationship.proto"; + +option go_package = "github.com/sourcenetwork/sourcehub/x/acp/types"; + +message RecordMetadata { + Timestamp creation_ts = 1; + bytes tx_hash = 2; + string tx_signer = 3; + string owner = 4; +} + +message PolicyRecord { + sourcenetwork.acp_core.Policy policy = 1; + RecordMetadata metadata = 2; + string raw_policy = 3; + // marshal_type flags the format of policy_raw + sourcenetwork.acp_core.PolicyMarshalingType marshal_type = 4; +} + +message RelationshipRecord { + sourcenetwork.acp_core.Relationship relationship = 1; + RecordMetadata metadata = 2; +} \ No newline at end of file diff --git a/proto/sourcehub/acp/tx.proto b/proto/sourcehub/acp/tx.proto index 6b337f65..c0c85dda 100644 --- a/proto/sourcehub/acp/tx.proto +++ b/proto/sourcehub/acp/tx.proto @@ -10,6 +10,7 @@ import "google/protobuf/timestamp.proto"; import "sourcehub/acp/access_decision.proto"; import "sourcehub/acp/params.proto"; import "sourcehub/acp/policy_cmd.proto"; +import "sourcehub/acp/record.proto"; import "sourcenetwork/acp_core/policy_short.proto"; import "sourcenetwork/acp_core/policy.proto"; @@ -79,7 +80,7 @@ message MsgCreatePolicy { } message MsgCreatePolicyResponse { - sourcenetwork.acp_core.Policy policy = 1; + PolicyRecord record = 1; } message MsgCheckAccess { diff --git a/tests/integration/acp/actions.go b/tests/integration/acp/actions.go index 934c666c..a18bd027 100644 --- a/tests/integration/acp/actions.go +++ b/tests/integration/acp/actions.go @@ -250,7 +250,7 @@ func (a *CommitRegistrationsAction) Run(ctx *TestCtx) *types.RegistrationsCommit type RevealRegistrationAction struct { PolicyId string - CommitmentId string + CommitmentId uint64 Objects []*coretypes.Object Index int Actor *TestActor diff --git a/tests/integration/acp/suite/object/register_test.go b/tests/integration/acp/suite/object/register_test.go index 4a73b779..0c14b36e 100644 --- a/tests/integration/acp/suite/object/register_test.go +++ b/tests/integration/acp/suite/object/register_test.go @@ -7,8 +7,6 @@ import ( "github.com/sourcenetwork/acp_core/pkg/errors" coretypes "github.com/sourcenetwork/acp_core/pkg/types" - prototypes "github.com/cosmos/gogoproto/types" - test "github.com/sourcenetwork/sourcehub/tests/integration/acp" "github.com/sourcenetwork/sourcehub/x/acp/types" ) @@ -41,12 +39,14 @@ func TestRegisterObject_RegisteringNewObjectIsSucessful(t *testing.T) { Expected: &types.RegisterObjectCmdResult{ Record: &coretypes.RelationshipRecord{ PolicyId: ctx.State.PolicyId, - OwnerDid: bob.DID, Relationship: coretypes.NewActorRelationship("resource", "foo", "owner", bob.DID), Archived: false, - CreationTime: &prototypes.Timestamp{ - Seconds: -62135596800, - Nanos: 0, + Metadata: &coretypes.RecordMetadata{ + Creator: &coretypes.Principal{ + Kind: coretypes.PrincipalKind_DID, + Identifier: bob.DID, + }, + CreationTs: test.TimeToProto(ctx.Timestamp), }, }, }, diff --git a/tests/integration/acp/suite/object/reveal_registration_test.go b/tests/integration/acp/suite/object/reveal_registration_test.go index 52efe5f6..3db725be 100644 --- a/tests/integration/acp/suite/object/reveal_registration_test.go +++ b/tests/integration/acp/suite/object/reveal_registration_test.go @@ -132,7 +132,7 @@ func TestRevealRegistration_ObjectRegisteredAfterCommitment_RegistrationAmended( result := a.Run(ctx) require.Equal(ctx.T, result.Event.Type, types.ObjectRegistrationEventType_AMENDMENT) - require.Equal(ctx.T, result.Record.OwnerDid, ctx.GetActor("bob").DID) + require.Equal(ctx.T, result.Record.Metadata.Creator, ctx.GetActor("bob").DID) require.Equal(ctx.T, result.Record.Relationship, coretypes.NewActorRelationship("file", "foo.txt", "owner", ctx.GetActor("bob").DID)) } @@ -192,7 +192,7 @@ func TestRevealRegistration_ObjectRegisteredThroughNewerCommitment_RegistrationI // Then Bob is the owner of foo.txt require.Equal(ctx.T, result.Event.Type, types.ObjectRegistrationEventType_AMENDMENT) - require.Equal(ctx.T, result.Record.OwnerDid, ctx.GetActor("bob").DID) + require.Equal(ctx.T, result.Record.Metadata.Creator, ctx.GetActor("bob").DID) require.Equal(ctx.T, result.Record.Relationship, coretypes.NewActorRelationship("file", "foo.txt", "owner", ctx.GetActor("bob").DID)) } diff --git a/tests/integration/acp/suite/policy/tx_test.go b/tests/integration/acp/suite/policy/tx_test.go index c551a5c7..e2eba6c3 100644 --- a/tests/integration/acp/suite/policy/tx_test.go +++ b/tests/integration/acp/suite/policy/tx_test.go @@ -38,10 +38,9 @@ actor: doc: my actor ` want := &coretypes.Policy{ - Id: "d011372c7e2cd34fd63777c513bb5eb16713834b855f424158474b77c1800410", - Name: "policy", - Description: "ok", - CreationTime: test.TimeToProto(ctx.Timestamp), + Id: "d011372c7e2cd34fd63777c513bb5eb16713834b855f424158474b77c1800410", + Name: "policy", + Description: "ok", Resources: []*coretypes.Resource{ &coretypes.Resource{ Name: "file", diff --git a/tests/integration/acp/suite/relationship/set_test.go b/tests/integration/acp/suite/relationship/set_test.go index 96c66609..165f29b3 100644 --- a/tests/integration/acp/suite/relationship/set_test.go +++ b/tests/integration/acp/suite/relationship/set_test.go @@ -41,7 +41,6 @@ func setupSetRel(t *testing.T) *test.TestCtx { }, } action.Run(ctx) - return ctx } @@ -57,8 +56,13 @@ func TestSetRelationship_OwnerCanShareObjectTheyOwn(t *testing.T) { Expected: &types.SetRelationshipCmdResult{ RecordExisted: false, Record: &coretypes.RelationshipRecord{ - OwnerDid: ctx.GetActor("alice").DID, - CreationTime: test.TimeToProto(ctx.Timestamp), + Metadata: &coretypes.RecordMetadata{ + Creator: &coretypes.Principal{ + Kind: coretypes.PrincipalKind_DID, + Identifier: ctx.GetActor("alice").DID, + }, + CreationTs: test.TimeToProto(ctx.Timestamp), + }, PolicyId: ctx.State.PolicyId, Relationship: coretypes.NewActorRelationship("file", "foo", "reader", bob), Archived: false, @@ -118,8 +122,13 @@ func TestSetRelationship_ManagerActorCanDelegateAccessToAnotherActor(t *testing. Expected: &types.SetRelationshipCmdResult{ RecordExisted: false, Record: &coretypes.RelationshipRecord{ - OwnerDid: bob, - CreationTime: test.TimeToProto(ctx.Timestamp), + Metadata: &coretypes.RecordMetadata{ + Creator: &coretypes.Principal{ + Kind: coretypes.PrincipalKind_DID, + Identifier: bob, + }, + CreationTs: test.TimeToProto(ctx.Timestamp), + }, PolicyId: ctx.State.PolicyId, Relationship: coretypes.NewActorRelationship("file", "foo", "reader", charlie), Archived: false, diff --git a/x/acp/client/cli/policy_cmd.go b/x/acp/client/cli/policy_cmd.go index 14dca57c..3e6eea6d 100644 --- a/x/acp/client/cli/policy_cmd.go +++ b/x/acp/client/cli/policy_cmd.go @@ -3,6 +3,7 @@ package cli import ( "encoding/hex" "fmt" + "strconv" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/gogoproto/jsonpb" @@ -112,7 +113,10 @@ func CmdRevealRegistration(dispatcher dispatcher) *cobra.Command { Args: cobra.ExactArgs(3), RunE: func(cmd *cobra.Command, args []string) (err error) { policyId := args[0] - commitId := args[1] + commitId, err := strconv.ParseUint(args[1], 10, 64) + if err != nil { + return fmt.Errorf("invalid commitId: %w", err) + } proofJson := args[2] proof := &types.RegistrationProof{} @@ -167,7 +171,10 @@ func CmdFlagHijack(dispatcher dispatcher) *cobra.Command { Args: cobra.ExactArgs(3), RunE: func(cmd *cobra.Command, args []string) (err error) { polId := args[0] - eventId := args[1] + eventId, err := strconv.ParseUint(args[1], 10, 64) + if err != nil { + return fmt.Errorf("invalid event id: %w", err) + } polCmd := types.NewFlagHijackAttemptCmd(eventId) diff --git a/x/acp/keeper/acp_core.go b/x/acp/keeper/acp_core.go new file mode 100644 index 00000000..4b32124e --- /dev/null +++ b/x/acp/keeper/acp_core.go @@ -0,0 +1,23 @@ +package keeper + +import ( + "context" + + sdk "github.com/cosmos/cosmos-sdk/types" + prototypes "github.com/cosmos/gogoproto/types" + "github.com/sourcenetwork/acp_core/pkg/runtime" +) + +var _ runtime.TimeService = (*SourcehubTimeProvider)(nil) + +type SourcehubTimeProvider struct{} + +func (p *SourcehubTimeProvider) GetNow(goCtx context.Context) (*prototypes.Timestamp, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + time := ctx.BlockTime() + ts, err := prototypes.TimestampProto(time) + if err != nil { + return nil, err + } + return ts, nil +} diff --git a/x/acp/keeper/keeper.go b/x/acp/keeper/keeper.go index d64ef9b8..91e0c773 100644 --- a/x/acp/keeper/keeper.go +++ b/x/acp/keeper/keeper.go @@ -13,6 +13,7 @@ import ( acpruntime "github.com/sourcenetwork/acp_core/pkg/runtime" "github.com/sourcenetwork/acp_core/pkg/services" coretypes "github.com/sourcenetwork/acp_core/pkg/types" + "github.com/sourcenetwork/raccoondb/v2/primitives" "github.com/sourcenetwork/sourcehub/x/acp/access_decision" "github.com/sourcenetwork/sourcehub/x/acp/registration" @@ -79,6 +80,7 @@ func (k *Keeper) GetACPEngine(ctx sdk.Context) (coretypes.ACPEngineServer, error raccoonAdapted := stores.RaccoonKVFromCosmos(adapted) runtime, err := acpruntime.NewRuntimeManager( acpruntime.WithKVStore(raccoonAdapted), + acpruntime.WithTimeService(&SourcehubTimeProvider{}), ) if err != nil { return nil, err @@ -88,17 +90,24 @@ func (k *Keeper) GetACPEngine(ctx sdk.Context) (coretypes.ACPEngineServer, error } func (k *Keeper) GetRegistrationsCommitmentRepository(ctx sdk.Context) registration.CommitmentRepository { - kv := k.storeService.OpenKVStore(ctx) - prefixKey := []byte(types.RegistrationsCommitmentPrefix) - adapted := runtime.KVStoreAdapter(kv) - adapted = prefix.NewStore(adapted, prefixKey) - return registration.NewKVRegistrationRepository(adapted) + cmtkv := k.storeService.OpenKVStore(ctx) + kv := stores.NewRaccoonKV(cmtkv) + kv = primitives.NewPrefixedKV(kv, []byte(types.RegistrationsCommitmentPrefix)) + repo, err := registration.NewKVRegistrationRepository(kv) + if err != nil { + panic(err) + } + return repo } func (k *Keeper) GetObjectEventRepository(ctx sdk.Context) registration.RegistrationEventRepository { - kv := k.storeService.OpenKVStore(ctx) - prefixKey := []byte(types.ObjectEventsPreix) - adapted := runtime.KVStoreAdapter(kv) - adapted = prefix.NewStore(adapted, prefixKey) - return registration.NewObjectEventRepository(adapted) + cmtkv := k.storeService.OpenKVStore(ctx) + kv := stores.NewRaccoonKV(cmtkv) + kv = primitives.NewPrefixedKV(kv, []byte(types.ObjectEventsPrefix)) + repo, err := registration.NewObjectEventRepository(kv) + if err != nil { + panic(err) + // TODO not sure how to best handle this, don't think the chain should continue + } + return repo } diff --git a/x/acp/keeper/msg_server_check_access.go b/x/acp/keeper/msg_server_check_access.go index 0f22b399..36d52c12 100644 --- a/x/acp/keeper/msg_server_check_access.go +++ b/x/acp/keeper/msg_server_check_access.go @@ -40,7 +40,7 @@ func (k msgServer) CheckAccess(goCtx context.Context, msg *types.MsgCheckAccess) } cmd := access_decision.EvaluateAccessRequestsCommand{ - Policy: record.Policy, + Policy: record.Record.Policy, Operations: msg.AccessRequest.Operations, Actor: msg.AccessRequest.Actor.Id, CreationTime: msg.CreationTime, diff --git a/x/acp/keeper/msg_server_create_policy.go b/x/acp/keeper/msg_server_create_policy.go index 6d62c60f..34b29b6f 100644 --- a/x/acp/keeper/msg_server_create_policy.go +++ b/x/acp/keeper/msg_server_create_policy.go @@ -26,7 +26,7 @@ func (k msgServer) CreatePolicy(goCtx context.Context, msg *types.MsgCreatePolic return nil, err } - principal := auth.RootPrincipal() + principal := coretypes.RootPrincipal() goCtx = auth.InjectPrincipal(goCtx, principal) tx := comettypes.Tx(ctx.TxBytes()) @@ -35,9 +35,11 @@ func (k msgServer) CreatePolicy(goCtx context.Context, msg *types.MsgCreatePolic coreResult, err := engine.CreatePolicy(goCtx, &coretypes.CreatePolicyRequest{ Policy: msg.Policy, MarshalType: msg.MarshalType, - Attributes: map[string]string{ - txHashMapKey: txHash, - creatorMapKey: msg.Creator, + Metadata: &coretypes.SuppliedMetadata{ + Attributes: map[string]string{ + txHashMapKey: txHash, + creatorMapKey: msg.Creator, + }, }, }) if err != nil { @@ -47,6 +49,6 @@ func (k msgServer) CreatePolicy(goCtx context.Context, msg *types.MsgCreatePolic // TODO event return &types.MsgCreatePolicyResponse{ - Policy: coreResult.Policy, + Policy: coreResult.Record.Policy, }, nil } diff --git a/x/acp/keeper/policy_cmd.go b/x/acp/keeper/policy_cmd.go index ccf1fb9b..2e8ff005 100644 --- a/x/acp/keeper/policy_cmd.go +++ b/x/acp/keeper/policy_cmd.go @@ -24,7 +24,7 @@ func dispatchPolicyCmd(ctx sdk.Context, k *Keeper, policyId string, authenticate result := &types.PolicyCmdResult{} actor := coretypes.NewActor(authenticatedActor) - principal, err := auth.NewDIDPrincipal(authenticatedActor) + principal, err := coretypes.NewDIDPrincipal(authenticatedActor) if err != nil { return nil, err } @@ -88,36 +88,6 @@ func dispatchPolicyCmd(ctx sdk.Context, k *Keeper, policyId string, authenticate }, } case *types.PolicyCmd_CommitRegistrationsCmd: - /* - result.Result = &types.PolicyCmdResult_CommitRegistrationsResult{ - CommitRegistrationsResult: &types.CommitRegistrationsCmdResult{ - RegistrationsCommitment: &types.RegistrationsCommitment{ - Id: "1", - PolicyId: "abc", - Actor: coretypes.NewActor("abc"), - Commitment: []byte("wtf man"), - Expired: true, - TxHash: []byte("again, wtf man"), - Validity: &types.Duration{ - Duration: &types.Duration_ProtoDuration{ - ProtoDuration: &prototypes.Duration{ - Seconds: 100, - }, - }, - }, - CreationTs: &types.Timestamp{ - ProtoTs: &prototypes.Timestamp{ - Seconds: 6969, - Nanos: 6969, - }, - BlockHeight: 144, - }, - }, - }, - } - break - */ - regCmd := c.CommitRegistrationsCmd params := k.GetParams(ctx) commitment, respErr := registrationService.CommitRegistration(ctx, policyId, regCmd.Commitment, actor, ¶ms) diff --git a/x/acp/keeper/query_policy.go b/x/acp/keeper/query_policy.go index ae6e57be..8d15575d 100644 --- a/x/acp/keeper/query_policy.go +++ b/x/acp/keeper/query_policy.go @@ -34,8 +34,8 @@ func (k Keeper) Policy(goCtx context.Context, req *types.QueryPolicyRequest) (*t } return &types.QueryPolicyResponse{ - Policy: rec.Policy, - PolicyRaw: rec.PolicyRaw, - MarshalType: rec.MarshalType, + Policy: rec.Record.Policy, + PolicyRaw: rec.Record.PolicyDefinition, + MarshalType: rec.Record.MarshalType, }, nil } diff --git a/x/acp/keeper/query_policy_ids.go b/x/acp/keeper/query_policy_ids.go index 3b93661c..137be624 100644 --- a/x/acp/keeper/query_policy_ids.go +++ b/x/acp/keeper/query_policy_ids.go @@ -23,6 +23,6 @@ func (k Keeper) PolicyIds(goCtx context.Context, req *types.QueryPolicyIdsReques } return &types.QueryPolicyIdsResponse{ - Ids: utils.MapSlice(resp.Policies, func(p *coretypes.Policy) string { return p.Id }), + Ids: utils.MapSlice(resp.Records, func(r *coretypes.PolicyRecord) string { return r.Policy.Id }), }, nil } diff --git a/x/acp/policy_cmd/doc.go b/x/acp/policy_cmd/doc.go new file mode 100644 index 00000000..b27fa396 --- /dev/null +++ b/x/acp/policy_cmd/doc.go @@ -0,0 +1,2 @@ +// package policy_cmd provides handlers for PolicyCmd messages +package policy_cmd diff --git a/x/acp/policy_cmd/handler.go b/x/acp/policy_cmd/handler.go new file mode 100644 index 00000000..161d1e38 --- /dev/null +++ b/x/acp/policy_cmd/handler.go @@ -0,0 +1,206 @@ +package policy_cmd + +import ( + "fmt" + + "github.com/sourcenetwork/sourcehub/x/acp/registration" + "github.com/sourcenetwork/sourcehub/x/acp/types" + "github.com/sourcenetwork/sourcehub/x/acp/utils" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/sourcenetwork/acp_core/pkg/errors" + coretypes "github.com/sourcenetwork/acp_core/pkg/types" +) + +func NewRecordMetadata(ctx sdk.Context, txSigner string, actor string) (*types.RecordMetadata, error) { + ts, err := types.TimestampFromCtx(ctx) + if err != nil { + return nil, err + } + return &types.RecordMetadata{ + CreationTs: ts, + TxHash: utils.HashTx(ctx.TxBytes()), + TxSigner: txSigner, + Owner: actor, + }, nil +} + +type Handler struct { + engine coretypes.ACPEngineServer + eventService registration.EventService + registrationService registration.RegistrationService +} + +func (h *Handler) Dispatch(ctx *PolicyCmdCtx, cmd *types.PolicyCmd) (*types.PolicyCmdResult, error) { + switch c := cmd.Cmd.(type) { + case *types.PolicyCmd_SetRelationshipCmd: + return h.SetRelationship(ctx, c.SetRelationshipCmd) + case *types.PolicyCmd_DeleteRelationshipCmd: + return h.DeleteRelationship(ctx, c.DeleteRelationshipCmd) + case *types.PolicyCmd_RegisterObjectCmd: + return h.RegisterObject(ctx, c.RegisterObjectCmd) + case *types.PolicyCmd_ArchiveObjectCmd: + return h.ArchiveObject(ctx, c.ArchiveObjectCmd) + case *types.PolicyCmd_CommitRegistrationsCmd: + return h.CommitRegistrations(ctx, c.CommitRegistrationsCmd) + case *types.PolicyCmd_FlagHijackAttemptCmd: + return h.FlagHijackAttempt(ctx, c.FlagHijackAttemptCmd) + case *types.PolicyCmd_RevealRegistrationCmd: + return h.RevealRegistration(ctx, c.RevealRegistrationCmd) + case *types.PolicyCmd_UnarchiveObjectCmd: + return h.UnarchiveObject(ctx, c.UnarchiveObjectCmd) + default: + return nil, errors.Wrap("unsuported command", errors.ErrUnknownVariant, errors.Pair("command", c)) + } +} + +func (h *Handler) SetRelationship(ctx *PolicyCmdCtx, cmd *types.SetRelationshipCmd) (*types.PolicyCmdResult, error) { + metadata, err := NewRecordMetadata(ctx.SDKCtx, ctx.Signer, ctx.PrincipalDID) + if err != nil { + return nil, err + } + bytes, err := metadata.Marshal() + if err != nil { + return nil, fmt.Errorf("marshaling metadata: %w", err) + } + + resp, err := h.engine.SetRelationship(ctx.EngineContext, &coretypes.SetRelationshipRequest{ + PolicyId: ctx.PolicyId, + Relationship: cmd.Relationship, + Metadata: &coretypes.SuppliedMetadata{ + Misc: bytes, + }, + }) + if err != nil { + return nil, err + } + + rec, err := MapRelationshipRecord(resp.Record) + if err != nil { + return nil, fmt.Errorf("mapping relationship record: %w", err) + + } + + return &types.PolicyCmdResult{ + Result: &types.PolicyCmdResult_SetRelationshipResult{ + SetRelationshipResult: &types.SetRelationshipCmdResult{ + RecordExisted: resp.RecordExisted, + Record: rec, + }, + }, + }, nil +} + +func (h *Handler) DeleteRelationship(ctx *PolicyCmdCtx, cmd *types.DeleteRelationshipCmd) (*types.PolicyCmdResult, error) { + resp, err := h.engine.DeleteRelationship(ctx.EngineContext, &coretypes.DeleteRelationshipRequest{ + PolicyId: ctx.PolicyId, + Relationship: cmd.Relationship, + }) + if err != nil { + return nil, err + } + return &types.PolicyCmdResult{ + Result: &types.PolicyCmdResult_DeleteRelationshipResult{ + DeleteRelationshipResult: &types.DeleteRelationshipCmdResult{ + RecordFound: resp.RecordFound, + }, + }, + }, nil +} + +func (h *Handler) RegisterObject(ctx *PolicyCmdCtx, cmd *types.RegisterObjectCmd) (*types.PolicyCmdResult, error) { + actor := coretypes.NewActor(ctx.PrincipalDID) + rec, _, err := h.registrationService.RegisterObject(ctx.SDKCtx, ctx.PolicyId, cmd.Object, actor) + if err != nil { + return nil, err + } + return &types.PolicyCmdResult{ + Result: &types.PolicyCmdResult_RegisterObjectResult{ + RegisterObjectResult: &types.RegisterObjectCmdResult{ + Record: rec, + }, + }, + }, nil +} + +func (h *Handler) ArchiveObject(ctx *PolicyCmdCtx, cmd *types.ArchiveObjectCmd) (*types.PolicyCmdResult, error) { + resp, err := h.engine.ArchiveObject(ctx.EngineContext, &coretypes.ArchiveObjectRequest{ + PolicyId: ctx.PolicyId, + Object: cmd.Object, + }) + if err != nil { + return nil, err + } + return &types.PolicyCmdResult{ + + Result: &types.PolicyCmdResult_ArchiveObjectResult{ + ArchiveObjectResult: &types.ArchiveObjectCmdResult{ + Found: true, + RelationshipsRemoved: resp.RelationshipsRemoved, + }, + }, + }, nil +} + +func (h *Handler) CommitRegistrations(ctx *PolicyCmdCtx, cmd *types.CommitRegistrationsCmd) (*types.PolicyCmdResult, error) { + actor := coretypes.NewActor(ctx.PrincipalDID) + commitment, err := h.registrationService.CommitRegistration(ctx.SDKCtx, ctx.PolicyId, cmd.Commitment, actor, &ctx.Params) + if err != nil { + return nil, err + } + return &types.PolicyCmdResult{ + Result: &types.PolicyCmdResult_CommitRegistrationsResult{ + CommitRegistrationsResult: &types.CommitRegistrationsCmdResult{ + RegistrationsCommitment: commitment, + }, + }, + }, nil +} + +func (h *Handler) RevealRegistration(ctx *PolicyCmdCtx, cmd *types.RevealRegistrationCmd) (*types.PolicyCmdResult, error) { + actor := coretypes.NewActor(ctx.PrincipalDID) + rec, ev, err := h.registrationService.RevealRegistration(ctx.SDKCtx, cmd.RegistrationsCommitmentId, cmd.Proof, actor) + if err != nil { + return nil, err + } + return &types.PolicyCmdResult{ + Result: &types.PolicyCmdResult_RevealRegistrationResult{ + RevealRegistrationResult: &types.RevealRegistrationCmdResult{ + Record: rec, + Event: ev, + Result: types.RegistrationResultStatus_UNARCHIVED, // TODO + }, + }, + }, nil +} + +func (h *Handler) FlagHijackAttempt(ctx *PolicyCmdCtx, cmd *types.FlagHijackAttemptCmd) (*types.PolicyCmdResult, error) { + actor := coretypes.NewActor(ctx.PrincipalDID) + event, err := h.eventService.FlagHijackEvent(ctx.SDKCtx, cmd.EventId, actor) + if err != nil { + return nil, err + } + return &types.PolicyCmdResult{ + Result: &types.PolicyCmdResult_FlagHijackAttemptResult{ + FlagHijackAttemptResult: &types.FlagHijackAttemptCmdResult{ + Event: event, + }, + }, + }, nil +} + +func (h *Handler) UnarchiveObject(ctx *PolicyCmdCtx, cmd *types.UnarchiveObjectCmd) (*types.PolicyCmdResult, error) { + actor := coretypes.NewActor(ctx.PrincipalDID) + rec, _, err := h.registrationService.UnarchiveObject(ctx.SDKCtx, ctx.PolicyId, cmd.Object, actor) + if err != nil { + return nil, err + } + return &types.PolicyCmdResult{ + Result: &types.PolicyCmdResult_UnarchiveObjectResult{ + UnarchiveObjectResult: &types.UnarchiveObjectCmdResult{ + Record: rec, + RelationshipModified: true, // TODO + }, + }, + }, nil +} diff --git a/x/acp/policy_cmd/mapper.go b/x/acp/policy_cmd/mapper.go new file mode 100644 index 00000000..49ce86fb --- /dev/null +++ b/x/acp/policy_cmd/mapper.go @@ -0,0 +1,10 @@ +package policy_cmd + +import ( + coretypes "github.com/sourcenetwork/acp_core/pkg/types" + "github.com/sourcenetwork/sourcehub/x/acp/types" +) + +func MapRelationshipRecord(record *coretypes.RelationshipRecord) (*types.RelationshipRecord, error) { + panic("todo") +} diff --git a/x/acp/policy_cmd/types.go b/x/acp/policy_cmd/types.go new file mode 100644 index 00000000..041dd8d3 --- /dev/null +++ b/x/acp/policy_cmd/types.go @@ -0,0 +1,19 @@ +package policy_cmd + +import ( + "context" + + sdk "github.com/cosmos/cosmos-sdk/types" + prototypes "github.com/cosmos/gogoproto/types" + "github.com/sourcenetwork/sourcehub/x/acp/types" +) + +type PolicyCmdCtx struct { + PolicyId string + PrincipalDID string + Now *prototypes.Timestamp + SDKCtx sdk.Context + EngineContext context.Context + Params types.Params + Signer string +} diff --git a/x/acp/registration/service.go b/x/acp/registration/service.go index f1bebb91..c378bdb5 100644 --- a/x/acp/registration/service.go +++ b/x/acp/registration/service.go @@ -266,7 +266,7 @@ func (s *RegistrationService) amendRegistration(ctx sdk.Context, commitment *typ return nil, nil, err } - goCtx := auth.InjectPrincipal(ctx, auth.RootPrincipal()) + goCtx := auth.InjectPrincipal(ctx, coretypes.RootPrincipal()) ctx = ctx.WithContext(goCtx) result, err := s.engine.AmendRegistration(ctx, &coretypes.AmendRegistrationRequest{ PolicyId: commitment.PolicyId, @@ -415,7 +415,7 @@ func (s *RegistrationService) GenerateCommitment(ctx sdk.Context, policyId strin } for _, obj := range objects { - resource := rec.Policy.GetResourceByName(obj.Resource) + resource := rec.Record.Policy.GetResourceByName(obj.Resource) if resource == nil { return nil, errors.Wrap("resource not found", errors.ErrorType_BAD_INPUT, errors.Pair("policy", policyId), diff --git a/x/acp/stores/adapter.go b/x/acp/stores/adapter.go new file mode 100644 index 00000000..2906f306 --- /dev/null +++ b/x/acp/stores/adapter.go @@ -0,0 +1,175 @@ +package stores + +import ( + "context" + "fmt" + + cosmosstore "cosmossdk.io/core/store" + "github.com/sourcenetwork/raccoondb/v2/errors" + "github.com/sourcenetwork/raccoondb/v2/store" + "github.com/sourcenetwork/raccoondb/v2/types" +) + +var _ store.KVStore = (*kvAdapter)(nil) + +var ErrCosmosKV = errors.New("cosmossdk store") + +func NewRaccoonKV(cosmosKV cosmosstore.KVStore) store.KVStore { + return &kvAdapter{ + db: cosmosKV, + } +} + +// wrapErr wraps an error with ErrCosmosKV +func wrapErr(err error) error { + return fmt.Errorf("%w: %w", ErrCosmosKV, err) +} + +type kvAdapter struct { + db cosmosstore.KVStore +} + +func (k *kvAdapter) Iterate(ctx context.Context, opt store.IterationParam) (store.StoreIterator[[]byte], error) { + var iter cosmosstore.Iterator + var err error + if opt.IsReverse() { + iter, err = k.db.ReverseIterator(opt.GetLeftBound(), opt.GetRightBound()) + } else { + iter, err = k.db.Iterator(opt.GetLeftBound(), opt.GetRightBound()) + } + + if err != nil { + return nil, wrapErr(err) + } + wrapped := &iterAdapter{ + iter: iter, + initialized: false, + finished: false, + params: opt, + } + + return wrapped, nil +} + +func (k *kvAdapter) Get(ctx context.Context, key []byte) (types.Option[[]byte], error) { + if key == nil { + return types.None[[]byte](), wrapErr(store.ErrKeyNil) + } + + bytes, err := k.db.Get(key) + if err != nil { + return types.None[[]byte](), wrapErr(err) + } + if bytes == nil { + return types.None[[]byte](), nil + } + return types.Some(bytes), nil + +} + +func (k *kvAdapter) Has(ctx context.Context, key []byte) (bool, error) { + if key == nil { + return false, wrapErr(store.ErrKeyNil) + } + + has, err := k.db.Has(key) + if err != nil { + return false, wrapErr(err) + } + return has, nil +} + +func (k *kvAdapter) Set(ctx context.Context, key, value []byte) (store.KeyCreated, error) { + if key == nil { + return false, wrapErr(store.ErrKeyNil) + } + + has, err := k.db.Has(key) + if err != nil { + return false, wrapErr(err) + } + + err = k.db.Set(key, value) + if err != nil { + return false, wrapErr(err) + } + return store.KeyCreated(!has), nil +} + +func (k *kvAdapter) Delete(ctx context.Context, key []byte) (store.KeyRemoved, error) { + if key == nil { + return false, wrapErr(store.ErrKeyNil) + } + + has, err := k.db.Has(key) + if err != nil { + return false, wrapErr(err) + } + + err = k.db.Delete(key) + if err != nil { + return false, wrapErr(err) + } + return store.KeyRemoved(has), nil +} + +type iterAdapter struct { + iter cosmosstore.Iterator + params store.IterationParam + initialized bool + finished bool +} + +func (i *iterAdapter) Next(ctx context.Context) error { + if !i.initialized { + i.initialized = true + // cometbft-db's iterator is created ready to use (yields first value right away) + // as such it may have an error set during creation + // if it fails to yield the first value, therefore we check for it + if i.iter.Error() != nil { + return wrapErr(i.iter.Error()) + } + return nil + } + + i.iter.Next() + err := i.iter.Error() + if !i.iter.Valid() { + i.finished = true + } + + if err != nil { + return wrapErr(err) + } + return nil +} + +func (i *iterAdapter) Value() types.Option[[]byte] { + if i.finished || !i.initialized { + return types.None[[]byte]() + } + return types.Some(i.iter.Value()) +} + +func (i *iterAdapter) Finished() bool { + return i.finished +} + +func (i *iterAdapter) Close() error { + err := i.iter.Close() + if err != nil { + return wrapErr(err) + } + return nil +} + +func (i *iterAdapter) GetParams() store.IterationParam { + return i.params +} + +func (i *iterAdapter) CurrentKey() []byte { + if i.finished || !i.initialized { + return nil + } + return i.iter.Key() +} diff --git a/x/acp/types/keys.go b/x/acp/types/keys.go index 96f92266..9f1a998e 100644 --- a/x/acp/types/keys.go +++ b/x/acp/types/keys.go @@ -17,7 +17,7 @@ const ( RegistrationsCommitmentPrefix = "commitments" // ObjectEventsPrefix defines a key prefix for ObjectEvents - ObjectEventsPreix = "object_events" + ObjectEventsPrefix = "object_events" ) var ( diff --git a/x/acp/types/policy_cmd.pb.go b/x/acp/types/policy_cmd.pb.go index 9da9349d..904320ad 100644 --- a/x/acp/types/policy_cmd.pb.go +++ b/x/acp/types/policy_cmd.pb.go @@ -655,9 +655,9 @@ func (m *RevealRegistrationCmd) GetProof() *RegistrationProof { } type RevealRegistrationCmdResult struct { - Result RegistrationResultStatus `protobuf:"varint,1,opt,name=result,proto3,enum=sourcehub.acp.RegistrationResultStatus" json:"result,omitempty"` - Record *types1.RelationshipRecord `protobuf:"bytes,2,opt,name=record,proto3" json:"record,omitempty"` - Event *ObjectRegistrationEvent `protobuf:"bytes,3,opt,name=event,proto3" json:"event,omitempty"` + Result RegistrationResultStatus `protobuf:"varint,1,opt,name=result,proto3,enum=sourcehub.acp.RegistrationResultStatus" json:"result,omitempty"` + Record *RelationshipRecord `protobuf:"bytes,2,opt,name=record,proto3" json:"record,omitempty"` + Event *ObjectRegistrationEvent `protobuf:"bytes,3,opt,name=event,proto3" json:"event,omitempty"` } func (m *RevealRegistrationCmdResult) Reset() { *m = RevealRegistrationCmdResult{} } @@ -700,7 +700,7 @@ func (m *RevealRegistrationCmdResult) GetResult() RegistrationResultStatus { return RegistrationResultStatus_NO_OP } -func (m *RevealRegistrationCmdResult) GetRecord() *types1.RelationshipRecord { +func (m *RevealRegistrationCmdResult) GetRecord() *RelationshipRecord { if m != nil { return m.Record } @@ -847,8 +847,8 @@ func (m *UnarchiveObjectCmd) GetObject() *types1.Object { } type UnarchiveObjectCmdResult struct { - Record *types1.RelationshipRecord `protobuf:"bytes,1,opt,name=record,proto3" json:"record,omitempty"` - RelationshipModified bool `protobuf:"varint,2,opt,name=relationship_modified,json=relationshipModified,proto3" json:"relationship_modified,omitempty"` + Record *RelationshipRecord `protobuf:"bytes,1,opt,name=record,proto3" json:"record,omitempty"` + RelationshipModified bool `protobuf:"varint,2,opt,name=relationship_modified,json=relationshipModified,proto3" json:"relationship_modified,omitempty"` } func (m *UnarchiveObjectCmdResult) Reset() { *m = UnarchiveObjectCmdResult{} } @@ -884,7 +884,7 @@ func (m *UnarchiveObjectCmdResult) XXX_DiscardUnknown() { var xxx_messageInfo_UnarchiveObjectCmdResult proto.InternalMessageInfo -func (m *UnarchiveObjectCmdResult) GetRecord() *types1.RelationshipRecord { +func (m *UnarchiveObjectCmdResult) GetRecord() *RelationshipRecord { if m != nil { return m.Record } @@ -957,8 +957,8 @@ func (m *ArchiveObjectCmd) GetObject() *types1.Object { // SetRelationshipCmd sets a Relationship in a Policy type SetRelationshipCmdResult struct { // Indicates whether the given Relationship previously existed, ie the Tx was a no op - RecordExisted bool `protobuf:"varint,1,opt,name=record_existed,json=recordExisted,proto3" json:"record_existed,omitempty"` - Record *types1.RelationshipRecord `protobuf:"bytes,2,opt,name=record,proto3" json:"record,omitempty"` + RecordExisted bool `protobuf:"varint,1,opt,name=record_existed,json=recordExisted,proto3" json:"record_existed,omitempty"` + Record *RelationshipRecord `protobuf:"bytes,2,opt,name=record,proto3" json:"record,omitempty"` } func (m *SetRelationshipCmdResult) Reset() { *m = SetRelationshipCmdResult{} } @@ -1001,7 +1001,7 @@ func (m *SetRelationshipCmdResult) GetRecordExisted() bool { return false } -func (m *SetRelationshipCmdResult) GetRecord() *types1.RelationshipRecord { +func (m *SetRelationshipCmdResult) GetRecord() *RelationshipRecord { if m != nil { return m.Record } @@ -1055,7 +1055,7 @@ func (m *DeleteRelationshipCmdResult) GetRecordFound() bool { // RegisterObjectCmdResult registers an Object in a Policy type RegisterObjectCmdResult struct { - Record *types1.RelationshipRecord `protobuf:"bytes,1,opt,name=record,proto3" json:"record,omitempty"` + Record *RelationshipRecord `protobuf:"bytes,1,opt,name=record,proto3" json:"record,omitempty"` } func (m *RegisterObjectCmdResult) Reset() { *m = RegisterObjectCmdResult{} } @@ -1091,7 +1091,7 @@ func (m *RegisterObjectCmdResult) XXX_DiscardUnknown() { var xxx_messageInfo_RegisterObjectCmdResult proto.InternalMessageInfo -func (m *RegisterObjectCmdResult) GetRecord() *types1.RelationshipRecord { +func (m *RegisterObjectCmdResult) GetRecord() *RelationshipRecord { if m != nil { return m.Record } @@ -1342,85 +1342,85 @@ func init() { func init() { proto.RegisterFile("sourcehub/acp/policy_cmd.proto", fileDescriptor_1de5e9736122d1ff) } var fileDescriptor_1de5e9736122d1ff = []byte{ - // 1241 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x57, 0xcf, 0x4f, 0x1b, 0xd7, - 0x13, 0xf7, 0x62, 0x6c, 0xcc, 0x00, 0x89, 0xf3, 0x62, 0xf0, 0x62, 0x22, 0x87, 0x6c, 0x92, 0xef, - 0x37, 0x50, 0xc9, 0x56, 0x89, 0x54, 0xf5, 0x50, 0x95, 0x9a, 0x1f, 0x91, 0x49, 0x1a, 0x40, 0x2f, - 0xa5, 0x87, 0xb4, 0x65, 0xb5, 0xec, 0x3e, 0xdb, 0x4b, 0xbc, 0x5e, 0x6b, 0xf7, 0x99, 0xc2, 0xb1, - 0x87, 0x4a, 0xbd, 0xb5, 0x52, 0xff, 0xa9, 0xde, 0x9a, 0x63, 0x8f, 0x11, 0x48, 0xfd, 0x3b, 0xaa, - 0xf7, 0x63, 0xed, 0xf5, 0xee, 0x33, 0x42, 0x88, 0x9b, 0x3d, 0xf3, 0x99, 0xcf, 0xcc, 0x9b, 0x99, - 0x37, 0x6f, 0x16, 0xaa, 0xa1, 0x3f, 0x08, 0x6c, 0xd2, 0x19, 0x9c, 0xd4, 0x2d, 0xbb, 0x5f, 0xef, - 0xfb, 0x5d, 0xd7, 0xbe, 0x30, 0x6d, 0xcf, 0xa9, 0xf5, 0x03, 0x9f, 0xfa, 0x68, 0x61, 0xa8, 0xaf, - 0x59, 0x76, 0xbf, 0xf2, 0xb8, 0xed, 0xfb, 0xed, 0x2e, 0xa9, 0x73, 0xe5, 0xc9, 0xa0, 0x55, 0xa7, - 0xae, 0x47, 0x42, 0x6a, 0x79, 0x7d, 0x81, 0xaf, 0xac, 0x09, 0x7c, 0x8f, 0xd0, 0x9f, 0xfd, 0xe0, - 0x03, 0xe3, 0x34, 0x6d, 0x3f, 0x20, 0xf5, 0x80, 0x74, 0x2d, 0xea, 0xfa, 0xb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0x1c, 0x0f, 0xb5, 0x20, 0x04, 0x7b, 0x0e, 0x5a, 0x87, 0xac, 0xed, 0x39, 0x7a, 0x9e, - 0x73, 0xea, 0x89, 0xcc, 0x0d, 0x4f, 0x8c, 0x19, 0xc8, 0xf8, 0x37, 0x07, 0xb3, 0xa3, 0xbc, 0x1f, - 0x41, 0x29, 0x24, 0xd4, 0x8c, 0x97, 0x99, 0x75, 0x91, 0x2c, 0xc2, 0x93, 0x64, 0x11, 0x08, 0xc5, - 0x31, 0xe4, 0xb6, 0xe7, 0x34, 0x33, 0x18, 0x85, 0x29, 0x29, 0x3a, 0x86, 0xb2, 0x43, 0xba, 0x84, - 0x92, 0x34, 0xf3, 0x14, 0x67, 0x7e, 0x96, 0x60, 0xde, 0xe1, 0xe8, 0x34, 0xf9, 0xa2, 0xa3, 0x52, - 0x20, 0x0c, 0x0f, 0x45, 0x5f, 0x91, 0xc0, 0xf4, 0x4f, 0x4e, 0x89, 0x4d, 0x39, 0x77, 0x96, 0x73, - 0xaf, 0x26, 0xb8, 0xb1, 0x44, 0x1e, 0x70, 0xa0, 0xe0, 0x7d, 0x10, 0x24, 0x85, 0xe8, 0x00, 0x90, - 0x15, 0xd8, 0x1d, 0xf7, 0x8c, 0xc4, 0x29, 0x45, 0x9d, 0x1e, 0x27, 0x28, 0x1b, 0x02, 0x18, 0x67, - 0x2c, 0x5a, 0x09, 0x19, 0xb2, 0x40, 0x17, 0x97, 0xc3, 0x8c, 0xdf, 0x81, 0x90, 0xd3, 0xe6, 0x94, - 0x4d, 0xbe, 0xcd, 0xe1, 0x38, 0x8e, 0x16, 0xe4, 0x4b, 0xb6, 0x52, 0xc3, 0xf2, 0x1c, 0x90, 0x33, - 0x62, 0x75, 0xc7, 0x5c, 0x98, 0xa3, 0x66, 0x78, 0x96, 0xca, 0x05, 0x43, 0xc7, 0x79, 0x64, 0x9e, - 0x03, 0x95, 0x02, 0xfd, 0x08, 0xe5, 0x56, 0xd7, 0x6a, 0x9b, 0x1d,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 0xea, 0x40, 0x45, 0xb5, 0xc6, - 0x49, 0x5f, 0x62, 0x93, 0x5b, 0xbb, 0xc1, 0x26, 0x37, 0x74, 0x55, 0x4e, 0xed, 0x73, 0xa3, 0x86, - 0x4e, 0xad, 0x74, 0xd2, 0x4d, 0x41, 0xd9, 0xd0, 0x93, 0x26, 0x30, 0x6b, 0xe8, 0xc4, 0x6e, 0x27, - 0x14, 0x5b, 0x85, 0xe8, 0x5d, 0x5d, 0x7f, 0x0d, 0xfa, 0xa4, 0x47, 0x14, 0xcd, 0x42, 0x6e, 0xff, - 0xc0, 0x3c, 0x38, 0x2c, 0x66, 0x50, 0x1e, 0xa6, 0x0e, 0xde, 0x14, 0x35, 0x34, 0x07, 0x33, 0x8d, - 0xb7, 0xbb, 0xfb, 0x3b, 0xbb, 0x3b, 0xc5, 0x29, 0x74, 0x0f, 0xe0, 0x68, 0xbf, 0x81, 0xb7, 0x9b, - 0x7b, 0xdf, 0xef, 0xee, 0x14, 0xb3, 0x5b, 0xcd, 0xbf, 0x2e, 0xab, 0xda, 0xc7, 0xcb, 0xaa, 0xf6, - 0xe9, 0xb2, 0xaa, 0xfd, 0x71, 0x55, 0xcd, 0x7c, 0xbc, 0xaa, 0x66, 0xfe, 0xb9, 0xaa, 0x66, 0xde, - 0xd7, 0xda, 0x2e, 0x65, 0xd1, 0xda, 0xbe, 0x57, 0x1f, 0xff, 0x4a, 0x1e, 0x7d, 0xe8, 0x9e, 0xf3, - 0x4f, 0x5d, 0x7a, 0xd1, 0x27, 0xe1, 0x49, 0x9e, 0x7f, 0xcb, 0xbd, 0xfc, 0x2f, 0x00, 0x00, 0xff, - 0xff, 0x0e, 0x7b, 0x91, 0x8d, 0xa3, 0x0f, 0x00, 0x00, + // 1248 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x57, 0x4b, 0x6f, 0xdb, 0x46, + 0x10, 0x16, 0x2d, 0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, 0x0f, 0x64, 0xe0, 0x46, 0x17, 0x16, 0x5e, + 0xba, 0xcd, 0x0e, 0x71, 0x8e, 0xf8, 0x91, 0x76, 0x3c, 0x07, 0x6d, 0xc1, 0x54, 0xd7, 0xba, 0x6c, + 0xfb, 0x96, 0xa3, 0x6b, 0xab, 0xda, 0xe3, 0x99, 0xcd, 0x47, 0x95, 0x91, 0xd3, 0x55, 0x62, 0x06, + 0x47, 0x02, 0x8c, 0xfb, 0x56, 0xe8, 0x1e, 0x4c, 0x87, 0x6e, 0xb3, 0x63, 0xd1, 0x5e, 0x40, 0xf4, + 0x89, 0x55, 0xed, 0xf1, 0x2c, 0x1e, 0x0a, 0x8c, 0x5f, 0x27, 0x60, 0x49, 0xcd, 0x80, 0x0a, 0x90, + 0xb1, 0x6c, 0xea, 0x07, 0xdc, 0xef, 0x34, 0x16, 0x7f, 0xd0, 0x03, 0x98, 0x73, 0xc3, 0xb0, 0x47, + 0x1c, 0xb3, 0x45, 0xdc, 0x66, 0x8b, 0x72, 0xca, 0x49, 0x3c, 0x2b, 0x84, 0x75, 0x2e, 0x43, 0xeb, + 0x90, 0x27, 0x17, 0x5d, 0x57, 0x9c, 0xdb, 0x74, 0x48, 0x9b, 0x5a, 0x7a, 0x9a, 0xe3, 0x16, 0x86, + 0xf2, 0x5d, 0x26, 0x46, 0x5b, 0x30, 0x67, 0x07, 0x44, 0x00, 0x59, 0x5d, 0xf4, 0x49, 0x7e, 0xca, + 0x52, 0x45, 0x14, 0xad, 0xd2, 0x2f, 0x5a, 0xe5, 0x55, 0xbf, 0x68, 0x78, 0xb6, 0x6f, 0xc0, 0x44, + 0x68, 0x05, 0xa6, 0x65, 0x03, 0xb8, 0x8e, 0x9e, 0xe1, 0xa1, 0xe6, 0x84, 0x60, 0xdf, 0x41, 0x1b, + 0x90, 0xb6, 0x3d, 0x47, 0xcf, 0x72, 0x4e, 0x3d, 0x96, 0xb9, 0xc1, 0x89, 0x31, 0x03, 0x19, 0xff, + 0x65, 0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6c, 0xe8, 0x71, + 0x53, 0x96, 0x35, 0x74, 0x6c, 0x6d, 0x13, 0x8a, 0xed, 0x5c, 0xff, 0xc9, 0xdc, 0x78, 0x06, 0xfa, + 0xb8, 0xf7, 0x11, 0x4d, 0x43, 0xe6, 0xe0, 0xd0, 0x3c, 0x3c, 0xca, 0xa7, 0x50, 0x16, 0x26, 0x0e, + 0x9f, 0xe7, 0x35, 0x34, 0x03, 0x53, 0xb5, 0x17, 0x7b, 0x07, 0xbb, 0x7b, 0xbb, 0xf9, 0x09, 0x34, + 0x0f, 0x70, 0x7c, 0x50, 0xc3, 0x3b, 0xf5, 0xfd, 0xef, 0xf7, 0x76, 0xf3, 0xe9, 0xed, 0xfa, 0x9f, + 0x57, 0x65, 0xed, 0xed, 0x55, 0x59, 0xfb, 0xf7, 0xaa, 0xac, 0xfd, 0x71, 0x5d, 0x4e, 0xbd, 0xbd, + 0x2e, 0xa7, 0xfe, 0xb9, 0x2e, 0xa7, 0x5e, 0x57, 0x9a, 0x2e, 0x65, 0xd1, 0xda, 0xbe, 0x57, 0x1d, + 0xfd, 0x38, 0x1e, 0x7e, 0xbd, 0x5e, 0xf0, 0xef, 0x57, 0x7a, 0xd9, 0x25, 0xe1, 0x69, 0x96, 0x7f, + 0xa6, 0x3d, 0xf9, 0x3f, 0x00, 0x00, 0xff, 0xff, 0xb6, 0x5b, 0xd8, 0x55, 0x9a, 0x0f, 0x00, 0x00, } func (m *SignedPolicyCmd) Marshal() (dAtA []byte, err error) { @@ -4318,7 +4318,7 @@ func (m *RevealRegistrationCmdResult) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.Record == nil { - m.Record = &types1.RelationshipRecord{} + m.Record = &RelationshipRecord{} } if err := m.Record.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -4681,7 +4681,7 @@ func (m *UnarchiveObjectCmdResult) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.Record == nil { - m.Record = &types1.RelationshipRecord{} + m.Record = &RelationshipRecord{} } if err := m.Record.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -4893,7 +4893,7 @@ func (m *SetRelationshipCmdResult) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.Record == nil { - m.Record = &types1.RelationshipRecord{} + m.Record = &RelationshipRecord{} } if err := m.Record.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -5049,7 +5049,7 @@ func (m *RegisterObjectCmdResult) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.Record == nil { - m.Record = &types1.RelationshipRecord{} + m.Record = &RelationshipRecord{} } if err := m.Record.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err diff --git a/x/acp/types/query.pb.go b/x/acp/types/query.pb.go index d5e4fe49..73a77105 100644 --- a/x/acp/types/query.pb.go +++ b/x/acp/types/query.pb.go @@ -160,12 +160,7 @@ func (m *QueryPolicyRequest) GetId() string { } type QueryPolicyResponse struct { - Policy *types.Policy `protobuf:"bytes,1,opt,name=policy,proto3" json:"policy,omitempty"` - // policy_raw contains the raw policy document the user submitted to create - // the policy - PolicyRaw string `protobuf:"bytes,2,opt,name=policy_raw,json=policyRaw,proto3" json:"policy_raw,omitempty"` - // marshal_type flags the format of policy_raw - MarshalType types.PolicyMarshalingType `protobuf:"varint,3,opt,name=marshal_type,json=marshalType,proto3,enum=sourcenetwork.acp_core.PolicyMarshalingType" json:"marshal_type,omitempty"` + Record *PolicyRecord `protobuf:"bytes,1,opt,name=record,proto3" json:"record,omitempty"` } func (m *QueryPolicyResponse) Reset() { *m = QueryPolicyResponse{} } @@ -201,27 +196,13 @@ func (m *QueryPolicyResponse) XXX_DiscardUnknown() { var xxx_messageInfo_QueryPolicyResponse proto.InternalMessageInfo -func (m *QueryPolicyResponse) GetPolicy() *types.Policy { +func (m *QueryPolicyResponse) GetRecord() *PolicyRecord { if m != nil { - return m.Policy + return m.Record } return nil } -func (m *QueryPolicyResponse) GetPolicyRaw() string { - if m != nil { - return m.PolicyRaw - } - return "" -} - -func (m *QueryPolicyResponse) GetMarshalType() types.PolicyMarshalingType { - if m != nil { - return m.MarshalType - } - return types.PolicyMarshalingType_UNKNOWN -} - type QueryPolicyIdsRequest struct { } @@ -356,7 +337,7 @@ func (m *QueryFilterRelationshipsRequest) GetSelector() *types.RelationshipSelec } type QueryFilterRelationshipsResponse struct { - Records []*types.RelationshipRecord `protobuf:"bytes,1,rep,name=records,proto3" json:"records,omitempty"` + Records []*RelationshipRecord `protobuf:"bytes,1,rep,name=records,proto3" json:"records,omitempty"` } func (m *QueryFilterRelationshipsResponse) Reset() { *m = QueryFilterRelationshipsResponse{} } @@ -392,7 +373,7 @@ func (m *QueryFilterRelationshipsResponse) XXX_DiscardUnknown() { var xxx_messageInfo_QueryFilterRelationshipsResponse proto.InternalMessageInfo -func (m *QueryFilterRelationshipsResponse) GetRecords() []*types.RelationshipRecord { +func (m *QueryFilterRelationshipsResponse) GetRecords() []*RelationshipRecord { if m != nil { return m.Records } @@ -1319,102 +1300,102 @@ func init() { func init() { proto.RegisterFile("sourcehub/acp/query.proto", fileDescriptor_0e48f8debbc27977) } var fileDescriptor_0e48f8debbc27977 = []byte{ - // 1511 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x58, 0xcf, 0x6f, 0xd4, 0xd6, - 0x16, 0x8e, 0x13, 0x18, 0x92, 0x13, 0x12, 0xc1, 0xe5, 0x47, 0x06, 0x03, 0x43, 0xde, 0x0d, 0x81, - 0x10, 0xf2, 0xc6, 0x64, 0x22, 0x20, 0x2c, 0x08, 0x8f, 0xf0, 0xe3, 0xc1, 0x7b, 0xa0, 0x80, 0x69, - 0xab, 0x8a, 0x2e, 0x2c, 0xc7, 0x73, 0x99, 0x31, 0xcc, 0xf8, 0x0e, 0xbe, 0x4e, 0x42, 0x44, 0x59, - 0xb4, 0x52, 0xa5, 0x22, 0x75, 0x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5, 0xb8, 0xea, 0x67, 0x1a, 0xec, 0xea, 0xb4, 0x56, 0xe4, 0x64, 0x1a, 0xc5, 0x0c, 0xd7, 0xa7, - 0xcf, 0xf4, 0x06, 0x46, 0xf2, 0x67, 0x25, 0xf9, 0x59, 0x62, 0xe4, 0x92, 0x6f, 0xb8, 0x22, 0xb0, - 0x70, 0x16, 0xd5, 0x39, 0x4c, 0xbe, 0xd6, 0x80, 0x74, 0x5b, 0x1e, 0xf2, 0xef, 0xb4, 0xea, 0x99, - 0x4e, 0x4e, 0x2f, 0xf7, 0x0a, 0x47, 0xba, 0xf3, 0x92, 0x6e, 0x85, 0x9c, 0xca, 0xa5, 0x5b, 0xc3, - 0x04, 0xf1, 0xc6, 0xfe, 0xa0, 0xc1, 0xfe, 0x74, 0x6b, 0x42, 0x66, 0xd3, 0x48, 0xe4, 0x3a, 0x21, - 0xbd, 0xb2, 0x95, 0x10, 0xe4, 0xbe, 0x20, 0xb9, 0xcf, 0x93, 0x33, 0xb9, 0xdc, 0xeb, 0x32, 0x89, - 0x65, 0x63, 0x96, 0x70, 0x3c, 0xd4, 0x67, 0xbf, 0x78, 0xed, 0xf9, 0xcb, 0x92, 0xf6, 0xe2, 0x65, - 0x49, 0xfb, 0xed, 0x65, 0x49, 0xfb, 0xf4, 0x55, 0xa9, 0xef, 0xc5, 0xab, 0x52, 0xdf, 0x2f, 0xaf, - 0x4a, 0x7d, 0x77, 0xcb, 0x35, 0x37, 0x08, 0x99, 0x38, 0xbc, 0x99, 0x99, 0xfb, 0x91, 0xcc, 0x1e, - 0xfe, 0x9c, 0x17, 0xcb, 0x05, 0xf9, 0xd7, 0xb6, 0xb9, 0xbf, 0x03, 0x00, 0x00, 0xff, 0xff, 0xe6, - 0xcf, 0x24, 0x0e, 0x6c, 0x15, 0x00, 0x00, + // 1505 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x58, 0xcf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e, 0x7d, 0x59, 0xea, 0xbb, 0x5d, 0xae, 0xb9, + 0x41, 0xc8, 0xc4, 0xe1, 0xcd, 0xcc, 0xdc, 0x0f, 0x65, 0xf6, 0xf0, 0xe7, 0xbc, 0x58, 0x2e, 0xc8, + 0x3f, 0x78, 0xcd, 0xfd, 0x13, 0x00, 0x00, 0xff, 0xff, 0x41, 0x6c, 0xaa, 0xb8, 0x0b, 0x15, 0x00, + 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -2061,21 +2042,9 @@ func (m *QueryPolicyResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.MarshalType != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.MarshalType)) - i-- - dAtA[i] = 0x18 - } - if len(m.PolicyRaw) > 0 { - i -= len(m.PolicyRaw) - copy(dAtA[i:], m.PolicyRaw) - i = encodeVarintQuery(dAtA, i, uint64(len(m.PolicyRaw))) - i-- - dAtA[i] = 0x12 - } - if m.Policy != nil { + if m.Record != nil { { - size, err := m.Policy.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Record.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -2961,17 +2930,10 @@ func (m *QueryPolicyResponse) Size() (n int) { } var l int _ = l - if m.Policy != nil { - l = m.Policy.Size() + if m.Record != nil { + l = m.Record.Size() n += 1 + l + sovQuery(uint64(l)) } - l = len(m.PolicyRaw) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - if m.MarshalType != 0 { - n += 1 + sovQuery(uint64(m.MarshalType)) - } return n } @@ -3568,7 +3530,7 @@ func (m *QueryPolicyResponse) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Policy", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Record", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -3595,64 +3557,13 @@ func (m *QueryPolicyResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Policy == nil { - m.Policy = &types.Policy{} + if m.Record == nil { + m.Record = &PolicyRecord{} } - if err := m.Policy.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Record.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PolicyRaw", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PolicyRaw = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MarshalType", wireType) - } - m.MarshalType = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.MarshalType |= types.PolicyMarshalingType(b&0x7F) << shift - if b < 0x80 { - break - } - } default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -3982,7 +3893,7 @@ func (m *QueryFilterRelationshipsResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Records = append(m.Records, &types.RelationshipRecord{}) + m.Records = append(m.Records, &RelationshipRecord{}) if err := m.Records[len(m.Records)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } diff --git a/x/acp/types/record.pb.go b/x/acp/types/record.pb.go new file mode 100644 index 00000000..60fa32fe --- /dev/null +++ b/x/acp/types/record.pb.go @@ -0,0 +1,1068 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: sourcehub/acp/record.proto + +package types + +import ( + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + _ "github.com/cosmos/cosmos-sdk/types/msgservice" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/cosmos/gogoproto/types" + types "github.com/sourcenetwork/acp_core/pkg/types" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +type RecordMetadata struct { + CreationTs *Timestamp `protobuf:"bytes,1,opt,name=creation_ts,json=creationTs,proto3" json:"creation_ts,omitempty"` + TxHash string `protobuf:"bytes,2,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` + TxSigner string `protobuf:"bytes,3,opt,name=tx_signer,json=txSigner,proto3" json:"tx_signer,omitempty"` + Owner string `protobuf:"bytes,4,opt,name=owner,proto3" json:"owner,omitempty"` +} + +func (m *RecordMetadata) Reset() { *m = RecordMetadata{} } +func (m *RecordMetadata) String() string { return proto.CompactTextString(m) } +func (*RecordMetadata) ProtoMessage() {} +func (*RecordMetadata) Descriptor() ([]byte, []int) { + return fileDescriptor_5977940639fee4f6, []int{0} +} +func (m *RecordMetadata) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RecordMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RecordMetadata.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RecordMetadata) XXX_Merge(src proto.Message) { + xxx_messageInfo_RecordMetadata.Merge(m, src) +} +func (m *RecordMetadata) XXX_Size() int { + return m.Size() +} +func (m *RecordMetadata) XXX_DiscardUnknown() { + xxx_messageInfo_RecordMetadata.DiscardUnknown(m) +} + +var xxx_messageInfo_RecordMetadata proto.InternalMessageInfo + +func (m *RecordMetadata) GetCreationTs() *Timestamp { + if m != nil { + return m.CreationTs + } + return nil +} + +func (m *RecordMetadata) GetTxHash() string { + if m != nil { + return m.TxHash + } + return "" +} + +func (m *RecordMetadata) GetTxSigner() string { + if m != nil { + return m.TxSigner + } + return "" +} + +func (m *RecordMetadata) GetOwner() string { + if m != nil { + return m.Owner + } + return "" +} + +type PolicyRecord struct { + Policy *types.Policy `protobuf:"bytes,1,opt,name=policy,proto3" json:"policy,omitempty"` + Metadata *RecordMetadata `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"` + RawPolicy string `protobuf:"bytes,3,opt,name=raw_policy,json=rawPolicy,proto3" json:"raw_policy,omitempty"` + // marshal_type flags the format of policy_raw + MarshalType types.PolicyMarshalingType `protobuf:"varint,4,opt,name=marshal_type,json=marshalType,proto3,enum=sourcenetwork.acp_core.PolicyMarshalingType" json:"marshal_type,omitempty"` +} + +func (m *PolicyRecord) Reset() { *m = PolicyRecord{} } +func (m *PolicyRecord) String() string { return proto.CompactTextString(m) } +func (*PolicyRecord) ProtoMessage() {} +func (*PolicyRecord) Descriptor() ([]byte, []int) { + return fileDescriptor_5977940639fee4f6, []int{1} +} +func (m *PolicyRecord) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PolicyRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PolicyRecord.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *PolicyRecord) XXX_Merge(src proto.Message) { + xxx_messageInfo_PolicyRecord.Merge(m, src) +} +func (m *PolicyRecord) XXX_Size() int { + return m.Size() +} +func (m *PolicyRecord) XXX_DiscardUnknown() { + xxx_messageInfo_PolicyRecord.DiscardUnknown(m) +} + +var xxx_messageInfo_PolicyRecord proto.InternalMessageInfo + +func (m *PolicyRecord) GetPolicy() *types.Policy { + if m != nil { + return m.Policy + } + return nil +} + +func (m *PolicyRecord) GetMetadata() *RecordMetadata { + if m != nil { + return m.Metadata + } + return nil +} + +func (m *PolicyRecord) GetRawPolicy() string { + if m != nil { + return m.RawPolicy + } + return "" +} + +func (m *PolicyRecord) GetMarshalType() types.PolicyMarshalingType { + if m != nil { + return m.MarshalType + } + return types.PolicyMarshalingType_UNKNOWN +} + +type RelationshipRecord struct { + Relationship *types.Relationship `protobuf:"bytes,1,opt,name=relationship,proto3" json:"relationship,omitempty"` + Metadata *RecordMetadata `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"` +} + +func (m *RelationshipRecord) Reset() { *m = RelationshipRecord{} } +func (m *RelationshipRecord) String() string { return proto.CompactTextString(m) } +func (*RelationshipRecord) ProtoMessage() {} +func (*RelationshipRecord) Descriptor() ([]byte, []int) { + return fileDescriptor_5977940639fee4f6, []int{2} +} +func (m *RelationshipRecord) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RelationshipRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RelationshipRecord.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RelationshipRecord) XXX_Merge(src proto.Message) { + xxx_messageInfo_RelationshipRecord.Merge(m, src) +} +func (m *RelationshipRecord) XXX_Size() int { + return m.Size() +} +func (m *RelationshipRecord) XXX_DiscardUnknown() { + xxx_messageInfo_RelationshipRecord.DiscardUnknown(m) +} + +var xxx_messageInfo_RelationshipRecord proto.InternalMessageInfo + +func (m *RelationshipRecord) GetRelationship() *types.Relationship { + if m != nil { + return m.Relationship + } + return nil +} + +func (m *RelationshipRecord) GetMetadata() *RecordMetadata { + if m != nil { + return m.Metadata + } + return nil +} + +func init() { + proto.RegisterType((*RecordMetadata)(nil), "sourcehub.acp.RecordMetadata") + proto.RegisterType((*PolicyRecord)(nil), "sourcehub.acp.PolicyRecord") + proto.RegisterType((*RelationshipRecord)(nil), "sourcehub.acp.RelationshipRecord") +} + +func init() { proto.RegisterFile("sourcehub/acp/record.proto", fileDescriptor_5977940639fee4f6) } + +var fileDescriptor_5977940639fee4f6 = []byte{ + // 484 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x52, 0xcd, 0x6e, 0x13, 0x31, + 0x10, 0x8e, 0xf9, 0x09, 0x8d, 0x13, 0x2a, 0x61, 0x55, 0x6a, 0x08, 0xea, 0x52, 0x05, 0x0e, 0x45, + 0x42, 0x6b, 0x11, 0x24, 0xa4, 0x5e, 0x39, 0xe5, 0x52, 0x81, 0x96, 0x9c, 0xb8, 0x58, 0x8e, 0x63, + 0x76, 0x2d, 0xb2, 0x3b, 0x2b, 0xdb, 0x21, 0x9b, 0xb7, 0xe0, 0x86, 0x78, 0x23, 0x8e, 0x3d, 0x72, + 0x44, 0xc9, 0x13, 0xf0, 0x06, 0x68, 0x6d, 0xa7, 0xd4, 0x48, 0x85, 0x03, 0x97, 0x5d, 0x8f, 0xbf, + 0x6f, 0x66, 0xbe, 0x6f, 0x3c, 0x78, 0x64, 0x60, 0xa5, 0x85, 0x2c, 0x56, 0x73, 0xca, 0x45, 0x4d, + 0xb5, 0x14, 0xa0, 0x17, 0x69, 0xad, 0xc1, 0x02, 0xb9, 0x7f, 0x85, 0xa5, 0x5c, 0xd4, 0xa3, 0x07, + 0xbc, 0x54, 0x15, 0x50, 0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 0xdf, 0x03, 0x00, 0x00, +} + +func (m *RecordMetadata) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RecordMetadata) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RecordMetadata) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintRecord(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0x22 + } + if len(m.TxSigner) > 0 { + i -= len(m.TxSigner) + copy(dAtA[i:], m.TxSigner) + i = encodeVarintRecord(dAtA, i, uint64(len(m.TxSigner))) + i-- + dAtA[i] = 0x1a + } + if len(m.TxHash) > 0 { + i -= len(m.TxHash) + copy(dAtA[i:], m.TxHash) + i = encodeVarintRecord(dAtA, i, uint64(len(m.TxHash))) + i-- + dAtA[i] = 0x12 + } + if m.CreationTs != nil { + { + size, err := m.CreationTs.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRecord(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *PolicyRecord) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PolicyRecord) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PolicyRecord) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.MarshalType != 0 { + i = encodeVarintRecord(dAtA, i, uint64(m.MarshalType)) + i-- + dAtA[i] = 0x20 + } + if len(m.RawPolicy) > 0 { + i -= len(m.RawPolicy) + copy(dAtA[i:], m.RawPolicy) + i = encodeVarintRecord(dAtA, i, uint64(len(m.RawPolicy))) + i-- + dAtA[i] = 0x1a + } + if m.Metadata != nil { + { + size, err := m.Metadata.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRecord(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.Policy != nil { + { + size, err := m.Policy.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRecord(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *RelationshipRecord) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RelationshipRecord) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RelationshipRecord) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Metadata != nil { + { + size, err := m.Metadata.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRecord(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.Relationship != nil { + { + size, err := m.Relationship.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRecord(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintRecord(dAtA []byte, offset int, v uint64) int { + offset -= sovRecord(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *RecordMetadata) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.CreationTs != nil { + l = m.CreationTs.Size() + n += 1 + l + sovRecord(uint64(l)) + } + l = len(m.TxHash) + if l > 0 { + n += 1 + l + sovRecord(uint64(l)) + } + l = len(m.TxSigner) + if l > 0 { + n += 1 + l + sovRecord(uint64(l)) + } + l = len(m.Owner) + if l > 0 { + n += 1 + l + sovRecord(uint64(l)) + } + return n +} + +func (m *PolicyRecord) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Policy != nil { + l = m.Policy.Size() + n += 1 + l + sovRecord(uint64(l)) + } + if m.Metadata != nil { + l = m.Metadata.Size() + n += 1 + l + sovRecord(uint64(l)) + } + l = len(m.RawPolicy) + if l > 0 { + n += 1 + l + sovRecord(uint64(l)) + } + if m.MarshalType != 0 { + n += 1 + sovRecord(uint64(m.MarshalType)) + } + return n +} + +func (m *RelationshipRecord) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Relationship != nil { + l = m.Relationship.Size() + n += 1 + l + sovRecord(uint64(l)) + } + if m.Metadata != nil { + l = m.Metadata.Size() + n += 1 + l + sovRecord(uint64(l)) + } + return n +} + +func sovRecord(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozRecord(x uint64) (n int) { + return sovRecord(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *RecordMetadata) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRecord + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RecordMetadata: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RecordMetadata: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CreationTs", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRecord + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRecord + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRecord + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.CreationTs == nil { + m.CreationTs = &Timestamp{} + } + if err := m.CreationTs.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TxHash", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRecord + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRecord + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRecord + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TxHash = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TxSigner", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRecord + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRecord + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRecord + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TxSigner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Owner", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRecord + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRecord + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRecord + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Owner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRecord(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthRecord + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PolicyRecord) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRecord + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PolicyRecord: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PolicyRecord: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Policy", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRecord + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRecord + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRecord + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Policy == nil { + m.Policy = &types.Policy{} + } + if err := m.Policy.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRecord + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRecord + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRecord + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Metadata == nil { + m.Metadata = &RecordMetadata{} + } + if err := m.Metadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RawPolicy", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRecord + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRecord + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRecord + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RawPolicy = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MarshalType", wireType) + } + m.MarshalType = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRecord + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MarshalType |= types.PolicyMarshalingType(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipRecord(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthRecord + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RelationshipRecord) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRecord + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RelationshipRecord: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RelationshipRecord: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Relationship", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRecord + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRecord + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRecord + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Relationship == nil { + m.Relationship = &types.Relationship{} + } + if err := m.Relationship.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRecord + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRecord + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRecord + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Metadata == nil { + m.Metadata = &RecordMetadata{} + } + if err := m.Metadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRecord(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthRecord + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipRecord(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowRecord + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowRecord + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowRecord + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthRecord + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupRecord + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthRecord + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthRecord = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowRecord = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupRecord = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/acp/types/tx.pb.go b/x/acp/types/tx.pb.go index 79927eaa..04177ea2 100644 --- a/x/acp/types/tx.pb.go +++ b/x/acp/types/tx.pb.go @@ -220,7 +220,7 @@ func (m *MsgCreatePolicy) GetCreationTime() *types1.Timestamp { } type MsgCreatePolicyResponse struct { - Policy *types.Policy `protobuf:"bytes,1,opt,name=policy,proto3" json:"policy,omitempty"` + Record *PolicyRecord `protobuf:"bytes,1,opt,name=record,proto3" json:"record,omitempty"` } func (m *MsgCreatePolicyResponse) Reset() { *m = MsgCreatePolicyResponse{} } @@ -256,9 +256,9 @@ func (m *MsgCreatePolicyResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgCreatePolicyResponse proto.InternalMessageInfo -func (m *MsgCreatePolicyResponse) GetPolicy() *types.Policy { +func (m *MsgCreatePolicyResponse) GetRecord() *PolicyRecord { if m != nil { - return m.Policy + return m.Record } return nil } @@ -730,64 +730,65 @@ func init() { func init() { proto.RegisterFile("sourcehub/acp/tx.proto", fileDescriptor_5bb2974ac27b9ccc) } var fileDescriptor_5bb2974ac27b9ccc = []byte{ - // 910 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0xcf, 0x8f, 0xdb, 0x44, - 0x14, 0x8e, 0xc9, 0x76, 0xb7, 0x99, 0x64, 0x77, 0x8b, 0x55, 0xb6, 0xae, 0xa1, 0xde, 0xad, 0x2b, - 0xd0, 0x76, 0x45, 0x6d, 0xb1, 0x48, 0x15, 0xf4, 0x82, 0x36, 0xe9, 0x81, 0x1f, 0xca, 0x16, 0x9c, - 0xb4, 0x95, 0xb8, 0x58, 0x8e, 0x3d, 0x38, 0xd6, 0xc6, 0x1e, 0x33, 0x33, 0x81, 0xe6, 0x86, 0x38, - 0x72, 0xe2, 0xcf, 0xe0, 0xb8, 0x87, 0x4a, 0xdc, 0x38, 0xa2, 0x1e, 0x2b, 0x4e, 0x48, 0x48, 0x08, - 0x6d, 0x0e, 0x2b, 0xfe, 0x0b, 0xe4, 0x99, 0x71, 0x62, 0x4f, 0x9c, 0x74, 0x61, 0xb9, 0x24, 0x79, - 0xef, 0x7d, 0xf3, 0x7e, 0x7c, 0xf9, 0xde, 0xd8, 0x60, 0x87, 0xa0, 0x31, 0xf6, 0xe1, 0x70, 0x3c, - 0xb0, 0x3d, 0x3f, 0xb5, 0xe9, 0x33, 0x2b, 0xc5, 0x88, 0x22, 0x75, 0x73, 0xe6, 0xb7, 0x3c, 0x3f, - 0xd5, 0x5f, 0xf7, 0xe2, 0x28, 0x41, 0x36, 0xfb, 0xe4, 0x08, 0xfd, 0x86, 0x8f, 0x48, 0x8c, 0x88, - 0x1d, 0x93, 0xd0, 0xfe, 0xe6, 0xbd, 0xec, 0x4b, 0x04, 0x6e, 0xf2, 0x80, 0xcb, 0x2c, 0x9b, 0x1b, - 0x22, 0x74, 0x3d, 0x44, 0x21, 0xe2, 0xfe, 0xec, 0x97, 0xf0, 0xee, 0x86, 0x08, 0x85, 0x23, 0x68, - 0x33, 0x6b, 0x30, 0xfe, 0xca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x54, 0x07, 0xc3, 0x2c, 0xc6, - 0xc6, 0x55, 0x35, 0xb0, 0xe1, 0x67, 0x36, 0xc2, 0x7c, 0x24, 0x27, 0x37, 0xd5, 0x1d, 0xb0, 0xce, - 0x29, 0x61, 0x6d, 0x37, 0x1c, 0x61, 0xa9, 0x8f, 0x40, 0x2b, 0xf6, 0x30, 0x19, 0x7a, 0x23, 0x97, - 0x4e, 0x52, 0xa8, 0xd5, 0xf7, 0x94, 0xfd, 0xad, 0xc3, 0x77, 0xad, 0x12, 0xad, 0x56, 0x4e, 0xab, - 0xc5, 0xeb, 0x74, 0xf9, 0x89, 0x28, 0x09, 0xfb, 0x93, 0x14, 0x3a, 0x4d, 0x91, 0x21, 0x33, 0xd4, - 0x8f, 0xc0, 0x26, 0xab, 0x19, 0xa1, 0xc4, 0xcd, 0x84, 0xa3, 0xad, 0x31, 0x9a, 0x74, 0x8b, 0xab, - 0xca, 0xca, 0x55, 0x65, 0xf5, 0x73, 0x55, 0x39, 0xad, 0xfc, 0x40, 0xe6, 0x7a, 0xd0, 0xca, 0x68, - 0xca, 0xfb, 0x36, 0xbf, 0x60, 0x04, 0x14, 0x87, 0xcc, 0x09, 0x50, 0xef, 0xcf, 0x46, 0x52, 0x58, - 0x09, 0x63, 0x75, 0xd3, 0xf9, 0xc8, 0xe6, 0x1f, 0x0a, 0xd8, 0xca, 0x72, 0x0e, 0xa1, 0x7f, 0x72, - 0xc4, 0xb4, 0xbb, 0x82, 0xb7, 0x37, 0x41, 0x43, 0xa8, 0x2e, 0x0a, 0x04, 0x75, 0x57, 0xb9, 0xe3, - 0x93, 0x60, 0x71, 0xd6, 0xfa, 0xbf, 0x9b, 0x55, 0xed, 0x80, 0x2d, 0xb1, 0x3d, 0x18, 0x7e, 0x3d, - 0x86, 0x84, 0x0a, 0xb6, 0xde, 0x92, 0x44, 0xc5, 0xdb, 0x74, 0x38, 0xc6, 0xd9, 0xf4, 0x8a, 0xa6, - 0x44, 0x58, 0x0f, 0xec, 0x94, 0x87, 0x9b, 0xf1, 0xf5, 0x21, 0xb8, 0x9a, 0xef, 0xa8, 0x60, 0xec, - 0x56, 0x65, 0x99, 0x87, 0x02, 0xe4, 0xcc, 0xe0, 0xe6, 0x2f, 0x0a, 0x50, 0xbb, 0x24, 0xec, 0x45, - 0x61, 0x02, 0x03, 0x4e, 0x67, 0x27, 0x0e, 0x56, 0xd0, 0xa6, 0x81, 0x8d, 0xd4, 0x9b, 0x8c, 0x90, - 0x97, 0x93, 0x96, 0x9b, 0xea, 0x11, 0x58, 0x2b, 0x08, 0xed, 0x9e, 0xd4, 0xc1, 0x62, 0x11, 0xab, - 0x83, 0x12, 0x0a, 0x13, 0xca, 0x94, 0xc6, 0x8e, 0x9a, 0x77, 0x40, 0xb3, 0xe0, 0x54, 0x9b, 0x60, - 0xe3, 0xf1, 0xf1, 0x67, 0xc7, 0x8f, 0x9e, 0x1e, 0x5f, 0xab, 0xa9, 0x1b, 0xa0, 0xfe, 0xe9, 0xd3, - 0xde, 0x35, 0x45, 0x62, 0xa5, 0x0f, 0xf4, 0xc5, 0xd4, 0x45, 0x25, 0x61, 0x48, 0xc6, 0x23, 0x2a, - 0x29, 0x69, 0xb6, 0xd3, 0x85, 0x13, 0xe3, 0x11, 0x75, 0x04, 0xda, 0xfc, 0x9b, 0xd3, 0xd2, 0x86, - 0x1e, 0x86, 0xf8, 0x22, 0xb4, 0xdc, 0x06, 0xad, 0x01, 0x03, 0xbb, 0x14, 0x9d, 0xc0, 0x44, 0x70, - 0xd3, 0xe4, 0xbe, 0x7e, 0xe6, 0x2a, 0x0b, 0xae, 0x2e, 0x09, 0xee, 0x00, 0xd4, 0xfd, 0x38, 0x10, - 0x22, 0xd1, 0x96, 0x76, 0x99, 0x81, 0x16, 0xc5, 0x79, 0xe5, 0x52, 0x8b, 0xc8, 0x19, 0x94, 0x46, - 0xbd, 0x34, 0x83, 0xbf, 0x72, 0x06, 0x1f, 0x46, 0x18, 0xfa, 0xf4, 0x22, 0x0c, 0xae, 0xdc, 0x47, - 0x41, 0x4f, 0xfd, 0x3f, 0xd1, 0xb3, 0xf6, 0x3f, 0xd0, 0x23, 0xcd, 0x71, 0x59, 0x7a, 0x0e, 0x9f, - 0xaf, 0x81, 0x7a, 0x97, 0x84, 0xea, 0x13, 0xd0, 0x2a, 0x3d, 0xbc, 0x8c, 0xc5, 0xb5, 0x29, 0xc6, - 0xf5, 0x77, 0x56, 0xc7, 0x67, 0x7d, 0x3d, 0x01, 0xad, 0xd2, 0xf3, 0xa3, 0x22, 0x6f, 0x31, 0x5e, - 0x95, 0xb7, 0xf2, 0x6a, 0xee, 0x81, 0x66, 0xf1, 0x7a, 0xbd, 0x55, 0x71, 0x6c, 0x1e, 0xd6, 0xdf, - 0x5e, 0x19, 0x9e, 0x25, 0x75, 0xc1, 0xb6, 0x7c, 0x01, 0xdd, 0x7e, 0xe5, 0xf5, 0xa1, 0xdf, 0x7d, - 0x25, 0xa4, 0x58, 0x40, 0x5e, 0xe5, 0x8a, 0x02, 0x12, 0xa4, 0xaa, 0xc0, 0xb2, 0x2d, 0x71, 0xc1, - 0xb6, 0xac, 0xf4, 0x8a, 0x02, 0x12, 0xa4, 0xaa, 0xc0, 0x12, 0x9d, 0xe9, 0x57, 0xbe, 0xcb, 0xde, - 0x38, 0xda, 0x1f, 0xbf, 0x38, 0x33, 0x94, 0x97, 0x67, 0x86, 0xf2, 0xd7, 0x99, 0xa1, 0xfc, 0x38, - 0x35, 0x6a, 0x2f, 0xa7, 0x46, 0xed, 0xf7, 0xa9, 0x51, 0xfb, 0xd2, 0x0a, 0x23, 0x9a, 0xe5, 0xf1, - 0x51, 0x6c, 0x97, 0xdf, 0x9c, 0xe4, 0x37, 0x91, 0xec, 0xa6, 0x25, 0x83, 0x75, 0xb6, 0x06, 0xef, - 0xff, 0x13, 0x00, 0x00, 0xff, 0xff, 0x50, 0xf7, 0xa1, 0xbe, 0x98, 0x0a, 0x00, 0x00, + // 924 bytes of a gzipped FileDescriptorProto + 0x1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, + 0xa1, 0x76, 0x09, 0xe2, 0x31, 0x31, 0xae, 0xd9, 0x05, 0x4b, 0x90, 0xdb, 0x98, 0xc8, 0x91, 0xfc, + 0xc2, 0x34, 0xd7, 0xc0, 0xa2, 0xa4, 0x44, 0xb4, 0xdd, 0xf2, 0x95, 0x65, 0x3e, 0x02, 0x9d, 0x34, + 0x24, 0x74, 0x10, 0x0e, 0x03, 0x36, 0xce, 0x51, 0xb7, 0xb9, 0x61, 0x6c, 0xae, 0xf4, 0x3e, 0x70, + 0x2b, 0xb4, 0xba, 0x05, 0xad, 0xae, 0xac, 0xb3, 0x27, 0x4f, 0x24, 0x59, 0x7c, 0x30, 0xce, 0x91, + 0xdf, 0x56, 0x19, 0xb8, 0x61, 0x7e, 0x02, 0x96, 0x45, 0xcd, 0x04, 0x67, 0x01, 0x17, 0x55, 0x77, + 0x41, 0xd0, 0x64, 0xb9, 0x52, 0x71, 0x6e, 0xa1, 0x38, 0xf7, 0xa0, 0x50, 0x9c, 0xdf, 0x29, 0x0e, + 0x70, 0xd7, 0x83, 0x0e, 0xa7, 0xa9, 0xe8, 0xdb, 0xd9, 0x17, 0x04, 0x94, 0x87, 0x2c, 0x08, 0x30, + 0xef, 0x81, 0x45, 0xa9, 0x1a, 0x31, 0x6b, 0xbb, 0x77, 0x43, 0x7f, 0x12, 0x0a, 0xce, 0x21, 0xbe, + 0x82, 0x3a, 0x7f, 0x1a, 0x60, 0x85, 0x27, 0x1c, 0x20, 0x78, 0xb4, 0x2d, 0x44, 0x3d, 0x87, 0xb4, + 0x1b, 0xa0, 0xa5, 0x24, 0x97, 0x44, 0x8a, 0xb7, 0xcb, 0xd2, 0xf1, 0x59, 0x34, 0x3d, 0x68, 0xf3, + 0xbf, 0x0d, 0x6a, 0xee, 0x82, 0x15, 0xb5, 0x56, 0x04, 0x7d, 0x33, 0x42, 0x94, 0x29, 0xaa, 0xde, + 0xd5, 0xe6, 0x90, 0x6d, 0xfa, 0x12, 0xe3, 0x2f, 0x87,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0x1d, 0xe8, 0xd5, 0x50, 0xb1, 0x0a, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1213,9 +1214,9 @@ func (m *MsgCreatePolicyResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) _ = i var l int _ = l - if m.Policy != nil { + if m.Record != nil { { - size, err := m.Policy.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Record.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -1665,8 +1666,8 @@ func (m *MsgCreatePolicyResponse) Size() (n int) { } var l int _ = l - if m.Policy != nil { - l = m.Policy.Size() + if m.Record != nil { + l = m.Record.Size() n += 1 + l + sovTx(uint64(l)) } return n @@ -2194,7 +2195,7 @@ func (m *MsgCreatePolicyResponse) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Policy", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Record", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -2221,10 +2222,10 @@ func (m *MsgCreatePolicyResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Policy == nil { - m.Policy = &types.Policy{} + if m.Record == nil { + m.Record = &PolicyRecord{} } - if err := m.Policy.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Record.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex