diff --git a/proto/shentu/bounty/v1/bounty.proto b/proto/shentu/bounty/v1/bounty.proto index 8d6ead100..0ff2124e4 100644 --- a/proto/shentu/bounty/v1/bounty.proto +++ b/proto/shentu/bounty/v1/bounty.proto @@ -16,11 +16,10 @@ message Program { string program_id = 1 [(gogoproto.jsontag) = "id", (gogoproto.moretags) = "yaml:\"id\""]; string name = 2 [(gogoproto.moretags) = "yaml:\"name\""]; // JSON by ProgramDetail - string description = 3 [(gogoproto.moretags) = "yaml:\"description\""]; + string detail = 3 [(gogoproto.moretags) = "yaml:\"detail\""]; string admin_address = 4 [(gogoproto.moretags) = "yaml:\"admin_address\""]; - repeated string member_accounts = 5 [(gogoproto.moretags) = "yaml:\"member_accounts\""]; - ProgramStatus status = 6 [(gogoproto.moretags) = "yaml:\"status\""]; - repeated BountyLevel bounty_levels = 7 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"bounty_levels\""]; + ProgramStatus status = 5 [(gogoproto.moretags) = "yaml:\"status\""]; + repeated BountyLevel bounty_levels = 6 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"bounty_levels\""]; } message Finding { @@ -30,14 +29,16 @@ message Finding { string program_id = 1 [(gogoproto.moretags) = "yaml:\"program_id\""]; string finding_id = 2 [(gogoproto.jsontag) = "id", (gogoproto.moretags) = "yaml:\"id\""]; string title = 3; - // JSON by FindingDetail string description = 4 [(gogoproto.moretags) = "yaml:\"description\""]; - // hash(desc + pos + submitter) - string finding_hash = 5 [(gogoproto.moretags) = "yaml:\"finding_hash\""]; - string submitter_address = 6 [(gogoproto.moretags) = "yaml:\"submitter_address\""]; - SeverityLevel severity_level = 7 [(gogoproto.moretags) = "yaml:\"severity_level\""]; - FindingStatus status = 8 [(gogoproto.moretags) = "yaml:\"status\""]; - google.protobuf.Timestamp create_time = 9 + string proof_of_concept = 5 [(gogoproto.moretags) = "yaml:\"proof_of_concept\""]; + // hash(desc + poc + submitter) + string finding_hash = 6 [(gogoproto.moretags) = "yaml:\"finding_hash\""]; + string submitter_address = 7 [(gogoproto.moretags) = "yaml:\"submitter_address\""]; + SeverityLevel severity_level = 8 [(gogoproto.moretags) = "yaml:\"severity_level\""]; + FindingStatus status = 9 [(gogoproto.moretags) = "yaml:\"status\""]; + // JSON by FindingDetail + string detail = 10 [(gogoproto.moretags) = "yaml:\"detail\""]; + google.protobuf.Timestamp create_time = 11 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"create_time\""]; } diff --git a/proto/shentu/bounty/v1/tx.proto b/proto/shentu/bounty/v1/tx.proto index 6329bedb7..e9587cf98 100644 --- a/proto/shentu/bounty/v1/tx.proto +++ b/proto/shentu/bounty/v1/tx.proto @@ -19,8 +19,8 @@ service Msg { // EditProgram defines a method for modifying a program. rpc EditProgram(MsgEditProgram) returns (MsgEditProgramResponse); - // Open a program status by program_id - rpc OpenProgram(MsgOpenProgram) returns (MsgOpenProgramResponse); + // Activate a program status by program_id + rpc ActivateProgram(MsgActivateProgram) returns (MsgActivateProgramResponse); // Closed a program status by program_id rpc CloseProgram(MsgCloseProgram) returns (MsgCloseProgramResponse); @@ -31,11 +31,8 @@ service Msg { // EditFinding defines a method for editing a new finding. rpc EditFinding(MsgEditFinding) returns (MsgEditFindingResponse); - // AcceptFinding defines a method for host accept a finding. - rpc AcceptFinding(MsgAcceptFinding) returns (MsgAcceptFindingResponse); - - // RejectFinding defines a method for host reject a finding. - rpc RejectFinding(MsgRejectFinding) returns (MsgRejectFindingResponse); + // ConfirmFinding defines a method for host confirm a finding. + rpc ConfirmFinding(MsgConfirmFinding) returns (MsgConfirmFindingResponse); // CloseFinding defines a method for submitter or certifier close a finding rpc CloseFinding(MsgCloseFinding) returns (MsgCloseFindingResponse); @@ -49,12 +46,11 @@ message MsgCreateProgram { option (gogoproto.equal) = false; option (gogoproto.goproto_getters) = false; - string name = 1; - string description = 2; - string operator_address = 3 [(gogoproto.moretags) = "yaml:\"operator_address\""]; - repeated string member_accounts = 4 [(gogoproto.moretags) = "yaml:\"member_accounts\""]; - string program_id = 5 [(gogoproto.moretags) = "yaml:\"program_id\""]; - repeated BountyLevel bounty_levels = 6 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"bounty_levels\""]; + string program_id = 1 [(gogoproto.moretags) = "yaml:\"program_id\""]; + string name = 2; + string detail = 3; + repeated BountyLevel bounty_levels = 4 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"bounty_levels\""]; + string operator_address = 5 [(gogoproto.moretags) = "yaml:\"operator_address\""]; } // MsgEditProgram defines a SDK message for editing a program. @@ -62,12 +58,11 @@ message MsgEditProgram { option (gogoproto.equal) = false; option (gogoproto.goproto_getters) = false; - string name = 1; - string description = 2; - string operator_address = 3 [(gogoproto.moretags) = "yaml:\"operator_address\""]; - repeated string member_accounts = 4 [(gogoproto.moretags) = "yaml:\"member_accounts\""]; - string program_id = 5 [(gogoproto.moretags) = "yaml:\"program_id\""]; - repeated BountyLevel bounty_levels = 6 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"bounty_levels\""]; + string program_id = 1 [(gogoproto.moretags) = "yaml:\"program_id\""]; + string name = 2; + string detail = 3; + repeated BountyLevel bounty_levels = 4 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"bounty_levels\""]; + string operator_address = 5 [(gogoproto.moretags) = "yaml:\"operator_address\""]; } // MsgCreateProgramResponse defines the Msg/CreateProgram response type. @@ -77,7 +72,7 @@ message MsgCreateProgramResponse { // MsgModifyProgramResponse defines the Msg/ModifyProgram response type. message MsgEditProgramResponse {} -message MsgOpenProgram { +message MsgActivateProgram { option (gogoproto.equal) = false; option (gogoproto.goproto_getters) = false; @@ -85,7 +80,7 @@ message MsgOpenProgram { string operator_address = 2 [(gogoproto.moretags) = "yaml:\"operator_address\""]; } -message MsgOpenProgramResponse {} +message MsgActivateProgramResponse {} message MsgCloseProgram { option (gogoproto.equal) = false; @@ -105,10 +100,10 @@ message MsgSubmitFinding { string program_id = 1 [(gogoproto.moretags) = "yaml:\"program_id\""]; string finding_id = 2 [(gogoproto.moretags) = "yaml:\"finding_id\""]; string title = 3; - string description = 4; - string finding_hash = 5 [(gogoproto.moretags) = "yaml:\"finding_hash\""]; - string submitter_address = 6 [(gogoproto.moretags) = "yaml:\"submitter_address\""]; - SeverityLevel severity_level = 7 [(gogoproto.moretags) = "yaml:\"severity_level\""]; + string finding_hash = 4 [(gogoproto.moretags) = "yaml:\"finding_hash\""]; + string submitter_address = 5 [(gogoproto.moretags) = "yaml:\"submitter_address\""]; + SeverityLevel severity_level = 6 [(gogoproto.moretags) = "yaml:\"severity_level\""]; + string detail = 7; } // MsgSubmitFindingResponse defines the MsgSubmitFinding response type. @@ -122,16 +117,17 @@ message MsgEditFinding { string program_id = 1 [(gogoproto.moretags) = "yaml:\"program_id\""]; string finding_id = 2 [(gogoproto.moretags) = "yaml:\"finding_id\""]; string title = 3; - string description = 4; + string finding_hash = 4 [(gogoproto.moretags) = "yaml:\"finding_hash\""]; string submitter_address = 5 [(gogoproto.moretags) = "yaml:\"submitter_address\""]; SeverityLevel severity_level = 6 [(gogoproto.moretags) = "yaml:\"severity_level\""]; + string detail = 7; } // MsgEditFindingResponse defines the MsgEditFinding response type. message MsgEditFindingResponse {} -// MsgAcceptFinding defines a message to accept a finding to an existing finding. -message MsgAcceptFinding { +// MsgConfirmFinding defines a message to accept a finding to an existing finding. +message MsgConfirmFinding { option (gogoproto.equal) = false; option (gogoproto.goproto_getters) = false; @@ -140,20 +136,8 @@ message MsgAcceptFinding { FindingStatus status = 3 [(gogoproto.moretags) = "yaml:\"status\""]; } -// MsgAcceptFindingResponse defines the Msg/AcceptFinding response type. -message MsgAcceptFindingResponse {} - -// MsgRejectFinding defines a message to reject a finding to an existing finding. -message MsgRejectFinding { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - string finding_id = 1 [(gogoproto.moretags) = "yaml:\"finding_id\""]; - string operator_address = 2 [(gogoproto.moretags) = "yaml:\"operator_address\""]; -} - -// MsgRejectFindingResponse defines the Msg/RejectFinding response type. -message MsgRejectFindingResponse {} +// MsgConfirmFindingResponse defines the Msg/AcceptFinding response type. +message MsgConfirmFindingResponse {} // MsgCloseFinding defines a message to close a finding to an existing finding. message MsgCloseFinding { @@ -172,8 +156,9 @@ message MsgReleaseFinding { option (gogoproto.equal) = false; string finding_id = 1 [(gogoproto.moretags) = "yaml:\"finding_id\""]; - string description = 2; - string operator_address = 3 [(gogoproto.moretags) = "yaml:\"operator_address\""]; + string description = 2 [(gogoproto.moretags) = "yaml:\"description\""]; + string proof_of_concept = 3 [(gogoproto.moretags) = "yaml:\"proof_of_concept\""]; + string operator_address = 4 [(gogoproto.moretags) = "yaml:\"operator_address\""]; } // MsgReleaseFindingResponse defines the MsgReleaseFinding response type. diff --git a/proto/shentu/cert/v1alpha1/cert.proto b/proto/shentu/cert/v1alpha1/cert.proto index 1221d9984..69c9b2aa2 100644 --- a/proto/shentu/cert/v1alpha1/cert.proto +++ b/proto/shentu/cert/v1alpha1/cert.proto @@ -29,6 +29,7 @@ enum CertificateType { CERT_TYPE_SHIELD_POOL_CREATOR = 5 [(gogoproto.enumvalue_customname) = "CertificateTypeShieldPoolCreator"]; CERT_TYPE_IDENTITY = 6 [(gogoproto.enumvalue_customname) = "CertificateTypeIdentity"]; CERT_TYPE_GENERAL = 7 [(gogoproto.enumvalue_customname) = "CertificateTypeGeneral"]; + CERT_TYPE_BOUNTY_ADMIN = 8 [(gogoproto.enumvalue_customname) = "CertificateTypeBountyAdmin"]; } message CompilationContent { @@ -101,6 +102,12 @@ message General { string content = 1; } +message BountyAdmin { + option (cosmos_proto.implements_interface) = "Content"; + + string content = 1; +} + // Platform is a genesis type for certified platform of a validator message Platform { option (gogoproto.equal) = false; diff --git a/x/bounty/client/cli/flags.go b/x/bounty/client/cli/flags.go index b83b5bddc..31c14d803 100644 --- a/x/bounty/client/cli/flags.go +++ b/x/bounty/client/cli/flags.go @@ -1,15 +1,18 @@ package cli const ( + FlagProgramID = "program-id" + FlagFindingID = "finding-id" + FlagName = "name" FlagMembers = "members" - FlagDesc = "desc" FlagFindingTitle = "title" FlagFindingSeverityLevel = "severity-level" + FlagFindingDescription = "description" + FlagFindingPoc = "poc" FlagFindingAddress = "finding-address" FlagSubmitterAddress = "submitter-address" - FlagProgramID = "program-id" - FlagFindingID = "finding-id" + FlagDetail = "detail" ) diff --git a/x/bounty/client/cli/tx.go b/x/bounty/client/cli/tx.go index 5f73e0a93..cb56417b2 100644 --- a/x/bounty/client/cli/tx.go +++ b/x/bounty/client/cli/tx.go @@ -1,6 +1,8 @@ package cli import ( + "crypto/sha256" + "encoding/hex" "fmt" "strings" @@ -24,12 +26,11 @@ func NewTxCmd() *cobra.Command { bountyTxCmds.AddCommand( NewCreateProgramCmd(), NewEditProgramCmd(), - NewOpenProgramCmd(), + NewActivateProgramCmd(), NewCloseProgramCmd(), NewSubmitFindingCmd(), NewEditFindingCmd(), - NewAcceptFindingCmd(), - NewRejectFindingCmd(), + NewConfirmFinding(), NewCloseFindingCmd(), NewReleaseFindingCmd(), ) @@ -56,16 +57,12 @@ func NewCreateProgramCmd() *cobra.Command { if err != nil { return err } - desc, err := cmd.Flags().GetString(FlagDesc) - if err != nil { - return err - } - members, err := cmd.Flags().GetStringArray(FlagMembers) + desc, err := cmd.Flags().GetString(FlagDetail) if err != nil { return err } - msg := types.NewMsgCreateProgram(pid, name, desc, creatorAddr, members, nil) + msg := types.NewMsgCreateProgram(pid, name, desc, creatorAddr, nil) return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) }, @@ -73,13 +70,13 @@ func NewCreateProgramCmd() *cobra.Command { cmd.Flags().String(FlagProgramID, "", "The program's id") cmd.Flags().String(FlagName, "", "The program's name") - cmd.Flags().String(FlagDesc, "", "The program's description") + cmd.Flags().String(FlagDetail, "", "The program's detail") cmd.Flags().StringArray(FlagMembers, []string{}, "") flags.AddTxFlagsToCmd(cmd) _ = cmd.MarkFlagRequired(FlagProgramID) _ = cmd.MarkFlagRequired(FlagName) - _ = cmd.MarkFlagRequired(FlagDesc) + _ = cmd.MarkFlagRequired(FlagDetail) _ = cmd.MarkFlagRequired(flags.FlagFrom) return cmd @@ -104,19 +101,12 @@ func NewEditProgramCmd() *cobra.Command { if err != nil { return err } - desc, err := cmd.Flags().GetString(FlagDesc) - if err != nil { - return err - } - members, err := cmd.Flags().GetStringArray(FlagMembers) + detail, err := cmd.Flags().GetString(FlagDetail) if err != nil { return err } - msg, err := types.NewMsgEditProgram(pid, name, desc, creatorAddr, members, nil) - if err != nil { - return err - } + msg := types.NewMsgEditProgram(pid, name, detail, creatorAddr, nil) return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) }, @@ -124,7 +114,7 @@ func NewEditProgramCmd() *cobra.Command { cmd.Flags().String(FlagProgramID, "", "The program's id") cmd.Flags().String(FlagName, "", "The program's name") - cmd.Flags().String(FlagDesc, "", "The program's description") + cmd.Flags().String(FlagDetail, "", "The program's detail") cmd.Flags().StringArray(FlagMembers, []string{}, "") flags.AddTxFlagsToCmd(cmd) @@ -134,7 +124,7 @@ func NewEditProgramCmd() *cobra.Command { return cmd } -func NewOpenProgramCmd() *cobra.Command { +func NewActivateProgramCmd() *cobra.Command { cmd := &cobra.Command{ Use: "open-program [program-id]", Args: cobra.ExactArgs(1), @@ -146,7 +136,7 @@ func NewOpenProgramCmd() *cobra.Command { } fromAddr := clientCtx.GetFromAddress() - msg := types.NewMsgOpenProgram(args[0], fromAddr) + msg := types.NewMsgActivateProgram(args[0], fromAddr) return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) }, } @@ -197,7 +187,7 @@ func NewSubmitFindingCmd() *cobra.Command { if err != nil { return err } - desc, err := cmd.Flags().GetString(FlagDesc) + detail, err := cmd.Flags().GetString(FlagDetail) if err != nil { return err } @@ -210,7 +200,18 @@ func NewSubmitFindingCmd() *cobra.Command { return fmt.Errorf("invalid %s value", FlagFindingSeverityLevel) } - msg := types.NewMsgSubmitFinding(pid, fid, title, desc, submitAddr, types.SeverityLevel(severityLevel)) + desc, err := cmd.Flags().GetString(FlagFindingDescription) + if err != nil { + return err + } + poc, err := cmd.Flags().GetString(FlagFindingPoc) + if err != nil { + return err + } + hash := sha256.Sum256([]byte(desc + poc + submitAddr.String())) + hashString := hex.EncodeToString(hash[:]) + + msg := types.NewMsgSubmitFinding(pid, fid, title, detail, hashString, submitAddr, types.SeverityLevel(severityLevel)) return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) }, } @@ -218,13 +219,16 @@ func NewSubmitFindingCmd() *cobra.Command { cmd.Flags().String(FlagProgramID, "", "The program's ID") cmd.Flags().String(FlagFindingID, "", "The finding's ID") cmd.Flags().String(FlagFindingTitle, "", "The finding's title") - cmd.Flags().String(FlagDesc, "", "The finding's description") + cmd.Flags().String(FlagDetail, "", "The finding's description") cmd.Flags().Int32(FlagFindingSeverityLevel, 0, "The finding's severity level") flags.AddTxFlagsToCmd(cmd) _ = cmd.MarkFlagRequired(flags.FlagFrom) _ = cmd.MarkFlagRequired(FlagProgramID) _ = cmd.MarkFlagRequired(FlagFindingID) + _ = cmd.MarkFlagRequired(FlagFindingTitle) + _ = cmd.MarkFlagRequired(FlagFindingDescription) + _ = cmd.MarkFlagRequired(FlagFindingPoc) return cmd } @@ -252,7 +256,7 @@ func NewEditFindingCmd() *cobra.Command { if err != nil { return err } - desc, err := cmd.Flags().GetString(FlagDesc) + detail, err := cmd.Flags().GetString(FlagDetail) if err != nil { return err } @@ -260,12 +264,19 @@ func NewEditFindingCmd() *cobra.Command { if err != nil { return err } - //_, ok := types.SeverityLevel_name[severityLevel] - //if !ok { - // return fmt.Errorf("invalid %s value", FlagFindingSeverityLevel) - //} - msg := types.NewMsgEditFinding(pid, fid, title, desc, submitAddr, types.SeverityLevel(severityLevel)) + desc, err := cmd.Flags().GetString(FlagFindingDescription) + if err != nil { + return err + } + poc, err := cmd.Flags().GetString(FlagFindingPoc) + if err != nil { + return err + } + hash := sha256.Sum256([]byte(desc + poc + submitAddr.String())) + hashString := hex.EncodeToString(hash[:]) + + msg := types.NewMsgEditFinding(pid, fid, title, detail, hashString, submitAddr, types.SeverityLevel(severityLevel)) return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) }, } @@ -273,7 +284,7 @@ func NewEditFindingCmd() *cobra.Command { cmd.Flags().String(FlagProgramID, "", "The program's ID") cmd.Flags().String(FlagFindingID, "", "The finding's ID") cmd.Flags().String(FlagFindingTitle, "", "The finding's title") - cmd.Flags().String(FlagDesc, "", "The finding's description") + cmd.Flags().String(FlagDetail, "", "The finding's detail") cmd.Flags().Int32(FlagFindingSeverityLevel, 8, "The finding's severity level") flags.AddTxFlagsToCmd(cmd) @@ -284,12 +295,12 @@ func NewEditFindingCmd() *cobra.Command { return cmd } -// NewAcceptFindingCmd implements accept a finding by host. -func NewAcceptFindingCmd() *cobra.Command { +// NewConfirmFinding implements accept a finding by host. +func NewConfirmFinding() *cobra.Command { cmd := &cobra.Command{ - Use: "accept-finding [finding-id]", + Use: "confirm-finding [finding-id]", Args: cobra.ExactArgs(1), - Short: "Host accept a finding for a program", + Short: "Host confirm a finding", Long: strings.TrimSpace( fmt.Sprintf(`Host accept a finding for a program.Meantime, you can also add some comments, which will be encrypted. Example: @@ -298,7 +309,7 @@ $ %s tx bounty accept-finding 1 --comment "Looks good to me" version.AppName, ), ), - RunE: AcceptFinding, + RunE: ConfirmFinding, } flags.AddTxFlagsToCmd(cmd) @@ -308,44 +319,7 @@ $ %s tx bounty accept-finding 1 --comment "Looks good to me" return cmd } -// NewRejectFindingCmd implements reject a finding by host. -func NewRejectFindingCmd() *cobra.Command { - cmd := &cobra.Command{ - Use: "reject-finding [finding-id]", - Args: cobra.ExactArgs(1), - Short: "Host reject a finding for a program", - Long: strings.TrimSpace( - fmt.Sprintf(`Host reject a finding for a program.Meantime, you can also add some comments, which will be encrypted. -Example: -$ %s tx bounty reject-finding 1 --comment "Verified to be an invalid finding" -`, - version.AppName, - ), - ), - RunE: RejectFinding, - } - - flags.AddTxFlagsToCmd(cmd) - - _ = cmd.MarkFlagRequired(flags.FlagFrom) - - return cmd -} - -func AcceptFinding(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientTxContext(cmd) - if err != nil { - return err - } - - // Get host address - hostAddr := clientCtx.GetFromAddress() - msg := types.NewMsgAcceptFinding(args[0], hostAddr) - - return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) -} - -func RejectFinding(cmd *cobra.Command, args []string) error { +func ConfirmFinding(cmd *cobra.Command, args []string) error { clientCtx, err := client.GetClientTxContext(cmd) if err != nil { return err @@ -353,8 +327,7 @@ func RejectFinding(cmd *cobra.Command, args []string) error { // Get host address hostAddr := clientCtx.GetFromAddress() - - msg := types.NewMsgRejectFinding(args[0], hostAddr) + msg := types.NewMsgConfirmFinding(args[0], hostAddr) return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) } @@ -384,25 +357,32 @@ func NewReleaseFindingCmd() *cobra.Command { cmd := &cobra.Command{ Use: "release-finding [finding id]", Args: cobra.ExactArgs(1), - Short: "close the specific finding", + Short: "release the specific finding", RunE: func(cmd *cobra.Command, args []string) error { clientCtx, err := client.GetClientTxContext(cmd) if err != nil { return err } submitAddr := clientCtx.GetFromAddress() - desc, err := cmd.Flags().GetString(FlagDesc) + desc, err := cmd.Flags().GetString(FlagFindingDescription) if err != nil { return err } - msg := types.NewMsgReleaseFinding(args[0], desc, submitAddr) + poc, err := cmd.Flags().GetString(FlagFindingPoc) + if err != nil { + return err + } + msg := types.NewMsgReleaseFinding(args[0], desc, poc, submitAddr) return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) }, } - cmd.Flags().String(FlagDesc, "", "The finding's description") + cmd.Flags().String(FlagFindingDescription, "", "The finding's description") + cmd.Flags().String(FlagFindingPoc, "", "The finding's poc") flags.AddTxFlagsToCmd(cmd) - _ = cmd.MarkFlagRequired(FlagDesc) + _ = cmd.MarkFlagRequired(FlagFindingDescription) + _ = cmd.MarkFlagRequired(FlagFindingPoc) + return cmd } diff --git a/x/bounty/handler.go b/x/bounty/handler.go index 6d1d5ac0e..5f0fa90ac 100644 --- a/x/bounty/handler.go +++ b/x/bounty/handler.go @@ -21,8 +21,8 @@ func NewHandler(k keeper.Keeper) sdk.Handler { case *types.MsgEditProgram: res, err := msgServer.EditProgram(sdk.WrapSDKContext(ctx), msg) return sdk.WrapServiceResult(ctx, res, err) - case *types.MsgOpenProgram: - res, err := msgServer.OpenProgram(sdk.WrapSDKContext(ctx), msg) + case *types.MsgActivateProgram: + res, err := msgServer.ActivateProgram(sdk.WrapSDKContext(ctx), msg) return sdk.WrapServiceResult(ctx, res, err) case *types.MsgCloseProgram: res, err := msgServer.CloseProgram(sdk.WrapSDKContext(ctx), msg) @@ -33,11 +33,8 @@ func NewHandler(k keeper.Keeper) sdk.Handler { case *types.MsgEditFinding: res, err := msgServer.EditFinding(sdk.WrapSDKContext(ctx), msg) return sdk.WrapServiceResult(ctx, res, err) - case *types.MsgAcceptFinding: - res, err := msgServer.AcceptFinding(sdk.WrapSDKContext(ctx), msg) - return sdk.WrapServiceResult(ctx, res, err) - case *types.MsgRejectFinding: - res, err := msgServer.RejectFinding(sdk.WrapSDKContext(ctx), msg) + case *types.MsgConfirmFinding: + res, err := msgServer.ConfirmFinding(sdk.WrapSDKContext(ctx), msg) return sdk.WrapServiceResult(ctx, res, err) case *types.MsgCloseFinding: res, err := msgServer.CloseFinding(sdk.WrapSDKContext(ctx), msg) diff --git a/x/bounty/keeper/msg_server.go b/x/bounty/keeper/msg_server.go index 027df9c38..344beeb05 100644 --- a/x/bounty/keeper/msg_server.go +++ b/x/bounty/keeper/msg_server.go @@ -2,6 +2,8 @@ package keeper import ( "context" + "crypto/sha256" + "encoding/hex" sdk "github.com/cosmos/cosmos-sdk/types" @@ -32,7 +34,7 @@ func (k msgServer) CreateProgram(goCtx context.Context, msg *types.MsgCreateProg return nil, types.ErrProgramAlreadyExists } - program, err := types.NewProgram(msg.ProgramId, msg.Name, msg.Description, operatorAddr, msg.MemberAccounts, types.ProgramStatusInactive, msg.BountyLevels) + program, err := types.NewProgram(msg.ProgramId, msg.Name, msg.Detail, operatorAddr, types.ProgramStatusInactive, msg.BountyLevels) if err != nil { return nil, err } @@ -67,21 +69,27 @@ func (k msgServer) EditProgram(goCtx context.Context, msg *types.MsgEditProgram) return nil, types.ErrNoProgramFound } - // Check the permissions. Only the admin of the program or cert address can operate. - if program.AdminAddress != msg.OperatorAddress { - if !k.certKeeper.IsCertifier(ctx, operatorAddr) { + // check the status. + // inactive: program admin, cert + // active: certificate + switch program.Status { + case types.ProgramStatusInactive: + if program.AdminAddress != msg.OperatorAddress && !k.certKeeper.IsBountyAdmin(ctx, operatorAddr) { return nil, types.ErrProgramOperatorNotAllowed } + case types.ProgramStatusActive: + if !k.certKeeper.IsBountyAdmin(ctx, operatorAddr) { + return nil, types.ErrProgramOperatorNotAllowed + } + default: + return nil, types.ErrProgramOperatorNotAllowed } if len(msg.Name) > 0 { program.Name = msg.Name } - if len(msg.Description) > 0 { - program.Description = msg.Description - } - if len(msg.MemberAccounts) > 0 { - program.MemberAccounts = msg.MemberAccounts + if len(msg.Detail) > 0 { + program.Detail = msg.Detail } if len(msg.BountyLevels) > 0 { program.BountyLevels = msg.BountyLevels @@ -104,7 +112,7 @@ func (k msgServer) EditProgram(goCtx context.Context, msg *types.MsgEditProgram) return &types.MsgEditProgramResponse{}, nil } -func (k msgServer) OpenProgram(goCtx context.Context, msg *types.MsgOpenProgram) (*types.MsgOpenProgramResponse, error) { +func (k msgServer) ActivateProgram(goCtx context.Context, msg *types.MsgActivateProgram) (*types.MsgActivateProgramResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) operatorAddr, err := sdk.AccAddressFromBech32(msg.OperatorAddress) @@ -117,7 +125,7 @@ func (k msgServer) OpenProgram(goCtx context.Context, msg *types.MsgOpenProgram) } ctx.EventManager().EmitEvents(sdk.Events{ sdk.NewEvent( - types.EventTypeOpenProgram, + types.EventTypeActivateProgram, sdk.NewAttribute(types.AttributeKeyProgramID, msg.ProgramId), ), sdk.NewEvent( @@ -126,7 +134,7 @@ func (k msgServer) OpenProgram(goCtx context.Context, msg *types.MsgOpenProgram) sdk.NewAttribute(sdk.AttributeKeySender, msg.OperatorAddress), ), }) - return &types.MsgOpenProgramResponse{}, nil + return &types.MsgActivateProgramResponse{}, nil } func (k msgServer) CloseProgram(goCtx context.Context, msg *types.MsgCloseProgram) (*types.MsgCloseProgramResponse, error) { @@ -171,14 +179,13 @@ func (k msgServer) SubmitFinding(goCtx context.Context, msg *types.MsgSubmitFind return nil, types.ErrProgramNotActive } - submitTime := ctx.BlockHeader().Time - _, found := k.GetFinding(ctx, msg.FindingId) if found { return nil, types.ErrFindingAlreadyExists } - finding, err := types.NewFinding(msg.ProgramId, msg.FindingId, msg.Title, msg.Description, msg.FindingHash, operatorAddr, submitTime, msg.SeverityLevel) + submitTime := ctx.BlockHeader().Time + finding, err := types.NewFinding(msg.ProgramId, msg.FindingId, msg.Title, msg.Detail, msg.FindingHash, operatorAddr, submitTime, msg.SeverityLevel) if err != nil { return nil, err } @@ -227,12 +234,15 @@ func (k msgServer) EditFinding(goCtx context.Context, msg *types.MsgEditFinding) if len(msg.Title) > 0 { finding.Title = msg.Title } - if len(msg.Description) > 0 { - finding.Description = msg.Description + if len(msg.FindingHash) > 0 { + finding.FindingHash = msg.FindingHash } if msg.SeverityLevel != types.Unspecified { finding.SeverityLevel = msg.SeverityLevel } + if len(msg.Detail) > 0 { + finding.Detail = msg.Detail + } k.SetFinding(ctx, finding) @@ -252,7 +262,7 @@ func (k msgServer) EditFinding(goCtx context.Context, msg *types.MsgEditFinding) return &types.MsgEditFindingResponse{}, nil } -func (k msgServer) AcceptFinding(goCtx context.Context, msg *types.MsgAcceptFinding) (*types.MsgAcceptFindingResponse, error) { +func (k msgServer) ConfirmFinding(goCtx context.Context, msg *types.MsgConfirmFinding) (*types.MsgConfirmFindingResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) finding, err := k.hostProcess(ctx, msg.FindingId, msg.OperatorAddress) @@ -265,34 +275,7 @@ func (k msgServer) AcceptFinding(goCtx context.Context, msg *types.MsgAcceptFind ctx.EventManager().EmitEvents(sdk.Events{ sdk.NewEvent( - types.EventTypeAcceptFinding, - sdk.NewAttribute(types.AttributeKeyFindingID, finding.FindingId), - sdk.NewAttribute(types.AttributeKeyProgramID, finding.ProgramId), - ), - sdk.NewEvent( - sdk.EventTypeMessage, - sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory), - sdk.NewAttribute(sdk.AttributeKeySender, msg.OperatorAddress), - ), - }) - - return &types.MsgAcceptFindingResponse{}, nil -} - -func (k msgServer) RejectFinding(goCtx context.Context, msg *types.MsgRejectFinding) (*types.MsgRejectFindingResponse, error) { - ctx := sdk.UnwrapSDKContext(goCtx) - - finding, err := k.hostProcess(ctx, msg.FindingId, msg.OperatorAddress) - if err != nil { - return nil, err - } - - finding.Status = types.FindingStatusClosed - k.SetFinding(ctx, *finding) - - ctx.EventManager().EmitEvents(sdk.Events{ - sdk.NewEvent( - types.EventTypeRejectFinding, + types.EventTypeConfirmFinding, sdk.NewAttribute(types.AttributeKeyFindingID, finding.FindingId), sdk.NewAttribute(types.AttributeKeyProgramID, finding.ProgramId), ), @@ -303,14 +286,14 @@ func (k msgServer) RejectFinding(goCtx context.Context, msg *types.MsgRejectFind ), }) - return &types.MsgRejectFindingResponse{}, nil + return &types.MsgConfirmFindingResponse{}, nil } func (k msgServer) hostProcess(ctx sdk.Context, fid, hostAddr string) (*types.Finding, error) { // get finding - finding, isExist := k.GetFinding(ctx, fid) - if !isExist { + finding, found := k.GetFinding(ctx, fid) + if !found { return nil, types.ErrFindingNotExists } // get program @@ -327,6 +310,7 @@ func (k msgServer) hostProcess(ctx sdk.Context, fid, hostAddr string) (*types.Fi return nil, types.ErrProgramCreatorInvalid } + // todo fingerprint comparison return &finding, nil } @@ -343,15 +327,20 @@ func (k msgServer) CloseFinding(goCtx context.Context, msg *types.MsgCloseFindin if !ok { return nil, types.ErrFindingNotExists } - - // check submitter - if finding.SubmitterAddress != msg.OperatorAddress && !k.certKeeper.IsCertifier(ctx, operatorAddr) { - return nil, types.ErrFindingSubmitterInvalid + // check finding status: StatusSubmitted and StatusActive can be closed + if finding.Status != types.FindingStatusSubmitted && finding.Status != types.FindingStatusActive { + return nil, types.ErrFindingStatusInvalid + } + // get program + program, isExist := k.GetProgram(ctx, finding.ProgramId) + if !isExist { + return nil, types.ErrProgramNotExists } - // check status - if finding.Status != types.FindingStatusSubmitted { - return nil, types.ErrFindingStatusInvalid + // check operator + // program, certificate, finding owner + if finding.SubmitterAddress != msg.OperatorAddress && !k.certKeeper.IsBountyAdmin(ctx, operatorAddr) && finding.SubmitterAddress != program.AdminAddress { + return nil, types.ErrFindingSubmitterInvalid } k.DeleteFidFromFidList(ctx, finding.ProgramId, finding.FindingId) @@ -386,15 +375,31 @@ func (k msgServer) ReleaseFinding(goCtx context.Context, msg *types.MsgReleaseFi if !isExist { return nil, types.ErrProgramNotExists } - if program.Status != types.ProgramStatusActive { + if program.Status == types.ProgramStatusInactive { return nil, types.ErrProgramNotActive } - if program.AdminAddress != msg.OperatorAddress { + // close,finding owner can release + // paid, program admin can release + switch finding.Status { + case types.FindingStatusClosed: + if finding.SubmitterAddress != msg.OperatorAddress { + return nil, types.ErrFindingSubmitterInvalid + } + case types.FindingStatusPaid: + if program.AdminAddress != msg.OperatorAddress { + return nil, types.ErrProgramCreatorInvalid + } + } + + // check hash + hash := sha256.Sum256([]byte(msg.Description + msg.ProofOfConcept + finding.SubmitterAddress)) + if finding.FindingHash != hex.EncodeToString(hash[:]) { return nil, types.ErrProgramCreatorInvalid } finding.Description = msg.Description + finding.ProofOfConcept = msg.ProofOfConcept k.SetFinding(ctx, finding) ctx.EventManager().EmitEvents(sdk.Events{ diff --git a/x/bounty/keeper/program.go b/x/bounty/keeper/program.go index 5328aa351..93b130a2f 100644 --- a/x/bounty/keeper/program.go +++ b/x/bounty/keeper/program.go @@ -53,8 +53,8 @@ func (k Keeper) OpenProgram(ctx sdk.Context, pid string, caller sdk.AccAddress) return types.ErrProgramAlreadyActive } - // Check the permissions. Only the cert address can operate. - if !k.certKeeper.IsCertifier(ctx, caller) { + // Check the permissions. Only the certificate address can operate. + if !k.certKeeper.IsBountyAdmin(ctx, caller) { return sdkerrors.Wrapf(govtypes.ErrInvalidVote, "%s is not a certified identity", caller.String()) } @@ -73,7 +73,10 @@ func (k Keeper) CloseProgram(ctx sdk.Context, pid string, caller sdk.AccAddress) if program.Status == types.ProgramStatusClosed { return types.ErrProgramAlreadyClosed } - + // todo finding 3种存在不可关闭 + // FINDING_STATUS_SUBMITTED = 0 [(gogoproto.enumvalue_customname) = "FindingStatusSubmitted"]; + // FINDING_STATUS_ACTIVE = 1 [(gogoproto.enumvalue_customname) = "FindingStatusActive"]; + // FINDING_STATUS_CONFIRMED = 2 [(gogoproto.enumvalue_customname) = "FindingStatusConfirmed"]; // Check the permissions. Only the admin of the program or cert address can operate. if program.AdminAddress != caller.String() && !k.certKeeper.IsCertifier(ctx, caller) { return types.ErrFindingOperatorNotAllowed diff --git a/x/bounty/types/bounty.pb.go b/x/bounty/types/bounty.pb.go index 7ad8470fb..cc4274f0f 100644 --- a/x/bounty/types/bounty.pb.go +++ b/x/bounty/types/bounty.pb.go @@ -133,11 +133,10 @@ type Program struct { ProgramId string `protobuf:"bytes,1,opt,name=program_id,json=programId,proto3" json:"id" yaml:"id"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty" yaml:"name"` // JSON by ProgramDetail - Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty" yaml:"description"` - AdminAddress string `protobuf:"bytes,4,opt,name=admin_address,json=adminAddress,proto3" json:"admin_address,omitempty" yaml:"admin_address"` - MemberAccounts []string `protobuf:"bytes,5,rep,name=member_accounts,json=memberAccounts,proto3" json:"member_accounts,omitempty" yaml:"member_accounts"` - Status ProgramStatus `protobuf:"varint,6,opt,name=status,proto3,enum=shentu.bounty.v1.ProgramStatus" json:"status,omitempty" yaml:"status"` - BountyLevels []BountyLevel `protobuf:"bytes,7,rep,name=bounty_levels,json=bountyLevels,proto3" json:"bounty_levels" yaml:"bounty_levels"` + Detail string `protobuf:"bytes,3,opt,name=detail,proto3" json:"detail,omitempty" yaml:"detail"` + AdminAddress string `protobuf:"bytes,4,opt,name=admin_address,json=adminAddress,proto3" json:"admin_address,omitempty" yaml:"admin_address"` + Status ProgramStatus `protobuf:"varint,5,opt,name=status,proto3,enum=shentu.bounty.v1.ProgramStatus" json:"status,omitempty" yaml:"status"` + BountyLevels []BountyLevel `protobuf:"bytes,6,rep,name=bounty_levels,json=bountyLevels,proto3" json:"bounty_levels" yaml:"bounty_levels"` } func (m *Program) Reset() { *m = Program{} } @@ -174,17 +173,19 @@ func (m *Program) XXX_DiscardUnknown() { var xxx_messageInfo_Program proto.InternalMessageInfo type Finding struct { - ProgramId string `protobuf:"bytes,1,opt,name=program_id,json=programId,proto3" json:"program_id,omitempty" yaml:"program_id"` - FindingId string `protobuf:"bytes,2,opt,name=finding_id,json=findingId,proto3" json:"id" yaml:"id"` - Title string `protobuf:"bytes,3,opt,name=title,proto3" json:"title,omitempty"` + ProgramId string `protobuf:"bytes,1,opt,name=program_id,json=programId,proto3" json:"program_id,omitempty" yaml:"program_id"` + FindingId string `protobuf:"bytes,2,opt,name=finding_id,json=findingId,proto3" json:"id" yaml:"id"` + Title string `protobuf:"bytes,3,opt,name=title,proto3" json:"title,omitempty"` + Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty" yaml:"description"` + ProofOfConcept string `protobuf:"bytes,5,opt,name=proof_of_concept,json=proofOfConcept,proto3" json:"proof_of_concept,omitempty" yaml:"proof_of_concept"` + // hash(desc + poc + submitter) + FindingHash string `protobuf:"bytes,6,opt,name=finding_hash,json=findingHash,proto3" json:"finding_hash,omitempty" yaml:"finding_hash"` + SubmitterAddress string `protobuf:"bytes,7,opt,name=submitter_address,json=submitterAddress,proto3" json:"submitter_address,omitempty" yaml:"submitter_address"` + SeverityLevel SeverityLevel `protobuf:"varint,8,opt,name=severity_level,json=severityLevel,proto3,enum=shentu.bounty.v1.SeverityLevel" json:"severity_level,omitempty" yaml:"severity_level"` + Status FindingStatus `protobuf:"varint,9,opt,name=status,proto3,enum=shentu.bounty.v1.FindingStatus" json:"status,omitempty" yaml:"status"` // JSON by FindingDetail - Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty" yaml:"description"` - // hash(desc + pos + submitter) - FindingHash string `protobuf:"bytes,5,opt,name=finding_hash,json=findingHash,proto3" json:"finding_hash,omitempty" yaml:"finding_hash"` - SubmitterAddress string `protobuf:"bytes,6,opt,name=submitter_address,json=submitterAddress,proto3" json:"submitter_address,omitempty" yaml:"submitter_address"` - SeverityLevel SeverityLevel `protobuf:"varint,7,opt,name=severity_level,json=severityLevel,proto3,enum=shentu.bounty.v1.SeverityLevel" json:"severity_level,omitempty" yaml:"severity_level"` - Status FindingStatus `protobuf:"varint,8,opt,name=status,proto3,enum=shentu.bounty.v1.FindingStatus" json:"status,omitempty" yaml:"status"` - CreateTime time.Time `protobuf:"bytes,9,opt,name=create_time,json=createTime,proto3,stdtime" json:"create_time" yaml:"create_time"` + Detail string `protobuf:"bytes,10,opt,name=detail,proto3" json:"detail,omitempty" yaml:"detail"` + CreateTime time.Time `protobuf:"bytes,11,opt,name=create_time,json=createTime,proto3,stdtime" json:"create_time" yaml:"create_time"` } func (m *Finding) Reset() { *m = Finding{} } @@ -272,78 +273,80 @@ func init() { func init() { proto.RegisterFile("shentu/bounty/v1/bounty.proto", fileDescriptor_36e6d679af1b94c6) } var fileDescriptor_36e6d679af1b94c6 = []byte{ - // 1131 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0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c, 0xeb, 0x11, 0x72, 0x3a, 0xab, 0x41, 0x7e, 0xbd, 0xf8, 0x33, 0x00, - 0x00, 0xff, 0xff, 0x31, 0x8a, 0x1a, 0x89, 0x7a, 0x09, 0x00, 0x00, + // 1155 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0x4f, 0x8f, 0xda, 0xc6, + 0x1b, 0xc6, 0xc0, 0xb2, 0xcb, 0xb0, 0x24, 0xde, 0xd9, 0x90, 0xf5, 0xfa, 0x97, 0x60, 0xff, 0x5c, + 0x55, 0xda, 0xe4, 0x60, 0xb4, 0xa4, 0xaa, 0xa2, 0x48, 0x3d, 0x00, 0xcb, 0x66, 0xdd, 0xf2, 0x67, + 0x65, 0xd8, 0x54, 0x6d, 0x0f, 0xd4, 0xe0, 0x01, 0x46, 0xc2, 0x1e, 0x64, 0x1b, 0x9a, 0xdc, 0x7b, + 0x88, 0x38, 0xa5, 0x1f, 0x00, 0x29, 0x55, 0x3f, 0x43, 0xfb, 0x19, 0x72, 0x8c, 0x7a, 0xea, 0xc9, + 0xad, 0x92, 0x4b, 0xd5, 0x23, 0x9f, 0xa0, 0xb2, 0x67, 0x58, 0x30, 0xbb, 0xdb, 0xa8, 0x52, 0x6f, + 0x33, 0xef, 0xfb, 0x3c, 0x8f, 0x67, 0xde, 0xf7, 0x9d, 0x47, 0x06, 0xf7, 0xdd, 0x21, 0xb2, 0xbd, + 0x49, 0xa1, 0x4b, 0x26, 0xb6, 0xf7, 0xa2, 0x30, 0x3d, 0x66, 0x2b, 0x75, 0xec, 0x10, 0x8f, 0x40, + 0x9e, 0xa6, 0x55, 0x16, 0x9c, 0x1e, 0x8b, 0x77, 0x06, 0x64, 0x40, 0xc2, 0x64, 0x21, 0x58, 0x51, + 0x9c, 0x28, 0x0d, 0x08, 0x19, 0x8c, 0x50, 0x21, 0xdc, 0x75, 0x27, 0xfd, 0x82, 0x87,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d3, + 0xb1, 0xb9, 0x49, 0x5e, 0x73, 0xba, 0xf5, 0xb9, 0x29, 0x7f, 0xf1, 0xe6, 0x5d, 0x9e, 0x7b, 0xfb, + 0x2e, 0xcf, 0xfd, 0xf1, 0x2e, 0xcf, 0xbd, 0x7a, 0x9f, 0x8f, 0xbd, 0x7d, 0x9f, 0x8f, 0xfd, 0xf6, + 0x3e, 0x1f, 0xfb, 0xfa, 0x78, 0x80, 0xbd, 0xe1, 0xa4, 0xab, 0xf6, 0x88, 0x55, 0xa0, 0x26, 0xd1, + 0x27, 0x13, 0xdb, 0x0c, 0x4b, 0xcc, 0x02, 0x85, 0xe7, 0xcb, 0x5f, 0x2f, 0xef, 0xc5, 0x18, 0xb9, + 0xdd, 0x54, 0xe8, 0x5f, 0x8f, 0xfe, 0x0e, 0x00, 0x00, 0xff, 0xff, 0x6c, 0x27, 0x4f, 0xf0, 0x98, + 0x09, 0x00, 0x00, } func (m *Program) Marshal() (dAtA []byte, err error) { @@ -377,22 +380,13 @@ func (m *Program) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintBounty(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x3a + dAtA[i] = 0x32 } } if m.Status != 0 { i = encodeVarintBounty(dAtA, i, uint64(m.Status)) i-- - dAtA[i] = 0x30 - } - if len(m.MemberAccounts) > 0 { - for iNdEx := len(m.MemberAccounts) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.MemberAccounts[iNdEx]) - copy(dAtA[i:], m.MemberAccounts[iNdEx]) - i = encodeVarintBounty(dAtA, i, uint64(len(m.MemberAccounts[iNdEx]))) - i-- - dAtA[i] = 0x2a - } + dAtA[i] = 0x28 } if len(m.AdminAddress) > 0 { i -= len(m.AdminAddress) @@ -401,10 +395,10 @@ func (m *Program) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x22 } - if len(m.Description) > 0 { - i -= len(m.Description) - copy(dAtA[i:], m.Description) - i = encodeVarintBounty(dAtA, i, uint64(len(m.Description))) + if len(m.Detail) > 0 { + i -= len(m.Detail) + copy(dAtA[i:], m.Detail) + i = encodeVarintBounty(dAtA, i, uint64(len(m.Detail))) i-- dAtA[i] = 0x1a } @@ -452,29 +446,43 @@ func (m *Finding) MarshalToSizedBuffer(dAtA []byte) (int, error) { i -= n1 i = encodeVarintBounty(dAtA, i, uint64(n1)) i-- - dAtA[i] = 0x4a + dAtA[i] = 0x5a + if len(m.Detail) > 0 { + i -= len(m.Detail) + copy(dAtA[i:], m.Detail) + i = encodeVarintBounty(dAtA, i, uint64(len(m.Detail))) + i-- + dAtA[i] = 0x52 + } if m.Status != 0 { i = encodeVarintBounty(dAtA, i, uint64(m.Status)) i-- - dAtA[i] = 0x40 + dAtA[i] = 0x48 } if m.SeverityLevel != 0 { i = encodeVarintBounty(dAtA, i, uint64(m.SeverityLevel)) i-- - dAtA[i] = 0x38 + dAtA[i] = 0x40 } if len(m.SubmitterAddress) > 0 { i -= len(m.SubmitterAddress) copy(dAtA[i:], m.SubmitterAddress) i = encodeVarintBounty(dAtA, i, uint64(len(m.SubmitterAddress))) i-- - dAtA[i] = 0x32 + dAtA[i] = 0x3a } if len(m.FindingHash) > 0 { i -= len(m.FindingHash) copy(dAtA[i:], m.FindingHash) i = encodeVarintBounty(dAtA, i, uint64(len(m.FindingHash))) i-- + dAtA[i] = 0x32 + } + if len(m.ProofOfConcept) > 0 { + i -= len(m.ProofOfConcept) + copy(dAtA[i:], m.ProofOfConcept) + i = encodeVarintBounty(dAtA, i, uint64(len(m.ProofOfConcept))) + i-- dAtA[i] = 0x2a } if len(m.Description) > 0 { @@ -591,7 +599,7 @@ func (m *Program) Size() (n int) { if l > 0 { n += 1 + l + sovBounty(uint64(l)) } - l = len(m.Description) + l = len(m.Detail) if l > 0 { n += 1 + l + sovBounty(uint64(l)) } @@ -599,12 +607,6 @@ func (m *Program) Size() (n int) { if l > 0 { n += 1 + l + sovBounty(uint64(l)) } - if len(m.MemberAccounts) > 0 { - for _, s := range m.MemberAccounts { - l = len(s) - n += 1 + l + sovBounty(uint64(l)) - } - } if m.Status != 0 { n += 1 + sovBounty(uint64(m.Status)) } @@ -639,6 +641,10 @@ func (m *Finding) Size() (n int) { if l > 0 { n += 1 + l + sovBounty(uint64(l)) } + l = len(m.ProofOfConcept) + if l > 0 { + n += 1 + l + sovBounty(uint64(l)) + } l = len(m.FindingHash) if l > 0 { n += 1 + l + sovBounty(uint64(l)) @@ -653,6 +659,10 @@ func (m *Finding) Size() (n int) { if m.Status != 0 { n += 1 + sovBounty(uint64(m.Status)) } + l = len(m.Detail) + if l > 0 { + n += 1 + l + sovBounty(uint64(l)) + } l = github_com_gogo_protobuf_types.SizeOfStdTime(m.CreateTime) n += 1 + l + sovBounty(uint64(l)) return n @@ -778,7 +788,7 @@ func (m *Program) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Detail", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -806,7 +816,7 @@ func (m *Program) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Description = string(dAtA[iNdEx:postIndex]) + m.Detail = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 2 { @@ -841,38 +851,6 @@ func (m *Program) Unmarshal(dAtA []byte) error { m.AdminAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MemberAccounts", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBounty - } - 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 ErrInvalidLengthBounty - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthBounty - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.MemberAccounts = append(m.MemberAccounts, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 6: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) } @@ -891,7 +869,7 @@ func (m *Program) Unmarshal(dAtA []byte) error { break } } - case 7: + case 6: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field BountyLevels", wireType) } @@ -1104,6 +1082,38 @@ func (m *Finding) Unmarshal(dAtA []byte) error { m.Description = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ProofOfConcept", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBounty + } + 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 ErrInvalidLengthBounty + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthBounty + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ProofOfConcept = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field FindingHash", wireType) } @@ -1135,7 +1145,7 @@ func (m *Finding) Unmarshal(dAtA []byte) error { } m.FindingHash = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 6: + case 7: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field SubmitterAddress", wireType) } @@ -1167,7 +1177,7 @@ func (m *Finding) Unmarshal(dAtA []byte) error { } m.SubmitterAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 7: + case 8: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field SeverityLevel", wireType) } @@ -1186,7 +1196,7 @@ func (m *Finding) Unmarshal(dAtA []byte) error { break } } - case 8: + case 9: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) } @@ -1205,7 +1215,39 @@ func (m *Finding) Unmarshal(dAtA []byte) error { break } } - case 9: + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Detail", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBounty + } + 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 ErrInvalidLengthBounty + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthBounty + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Detail = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 11: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field CreateTime", wireType) } diff --git a/x/bounty/types/events.go b/x/bounty/types/events.go index a2f6094a8..3d49ea460 100644 --- a/x/bounty/types/events.go +++ b/x/bounty/types/events.go @@ -3,13 +3,13 @@ package types const ( EventTypeCreateProgram = "create_program" EventTypeEditProgram = "edit_program" - EventTypeOpenProgram = "open_program" - EventTypeCloseProgram = "close_program" + //todo + EventTypeActivateProgram = "activate_program" + EventTypeCloseProgram = "close_program" EventTypeSubmitFinding = "submit_finding" EventTypeEditFinding = "edit_finding" - EventTypeRejectFinding = "reject_finding" - EventTypeAcceptFinding = "accept_finding" + EventTypeConfirmFinding = "confirm_finding" EventTypeCloseFinding = "close_finding" EventTypeReleaseFinding = "release_finding" diff --git a/x/bounty/types/expected_keepers.go b/x/bounty/types/expected_keepers.go index 4349055dd..8316da6f5 100644 --- a/x/bounty/types/expected_keepers.go +++ b/x/bounty/types/expected_keepers.go @@ -12,5 +12,5 @@ type ParamSubspace interface { } type CertKeeper interface { - IsCertifier(ctx sdk.Context, addr sdk.AccAddress) bool + IsBountyAdmin(ctx sdk.Context, addr sdk.AccAddress) bool } diff --git a/x/bounty/types/finding.go b/x/bounty/types/finding.go index 9ede560fa..854cdaef1 100644 --- a/x/bounty/types/finding.go +++ b/x/bounty/types/finding.go @@ -10,18 +10,18 @@ import ( // Findings is an array of finding type Findings []Finding -func NewFinding(pid, fid, title, desc, hash string, operator sdk.AccAddress, submitTime time.Time, level SeverityLevel) (Finding, error) { +func NewFinding(pid, fid, title, detail, hash string, operator sdk.AccAddress, submitTime time.Time, level SeverityLevel) (Finding, error) { return Finding{ ProgramId: pid, FindingId: fid, Title: title, - Description: desc, - SubmitterAddress: operator.String(), - CreateTime: submitTime, - Status: FindingStatusSubmitted, FindingHash: hash, + SubmitterAddress: operator.String(), SeverityLevel: level, + Status: FindingStatusSubmitted, + Detail: detail, + CreateTime: submitTime, }, nil } diff --git a/x/bounty/types/msgs.go b/x/bounty/types/msgs.go index 508619716..3d3968e78 100644 --- a/x/bounty/types/msgs.go +++ b/x/bounty/types/msgs.go @@ -8,27 +8,25 @@ import ( ) const ( - TypeMsgCreateProgram = "create_program" - TypeMsgOpenProgram = "open_program" - TypeMsgCloseProgram = "close_program" - TypeMsgSubmitFinding = "submit_finding" - TypeMsgEditFinding = "edit_finding" - TypeMsgAcceptFinding = "accept_finding" - TypeMsgRejectFinding = "reject_finding" - TypeMsgCloseFinding = "close_finding" - TypeMsgReleaseFinding = "release_finding" + TypeMsgCreateProgram = "create_program" + TypeMsgActivateProgram = "activate_program" + TypeMsgCloseProgram = "close_program" + TypeMsgSubmitFinding = "submit_finding" + TypeMsgEditFinding = "edit_finding" + TypeMsgConfirmFinding = "confirm_finding" + TypeMsgCloseFinding = "close_finding" + TypeMsgReleaseFinding = "release_finding" ) // NewMsgCreateProgram creates a new NewMsgCreateProgram instance. // Delegator address and validator address are the same. -func NewMsgCreateProgram(pid, name, desc string, operator sdk.AccAddress, members []string, levels []BountyLevel) *MsgCreateProgram { +func NewMsgCreateProgram(pid, name, detail string, operator sdk.AccAddress, levels []BountyLevel) *MsgCreateProgram { return &MsgCreateProgram{ - Name: name, - Description: desc, - OperatorAddress: operator.String(), - MemberAccounts: members, ProgramId: pid, + Name: name, + Detail: detail, BountyLevels: levels, + OperatorAddress: operator.String(), } } @@ -68,15 +66,14 @@ func (msg MsgCreateProgram) ValidateBasic() error { } // NewMsgEditProgram edit a program. -func NewMsgEditProgram(pid, name, desc string, operator sdk.AccAddress, members []string, levels []BountyLevel) (*MsgCreateProgram, error) { - return &MsgCreateProgram{ - Name: name, - Description: desc, - OperatorAddress: operator.String(), - MemberAccounts: members, +func NewMsgEditProgram(pid, name, detail string, operator sdk.AccAddress, levels []BountyLevel) *MsgEditProgram { + return &MsgEditProgram{ ProgramId: pid, + Name: name, + Detail: detail, BountyLevels: levels, - }, nil + OperatorAddress: operator.String(), + } } // Route implements the sdk.Msg interface. @@ -115,15 +112,15 @@ func (msg MsgEditProgram) ValidateBasic() error { } // NewMsgSubmitFinding submit a new finding. -func NewMsgSubmitFinding(pid, fid, title, desc string, operator sdk.AccAddress, level SeverityLevel) *MsgSubmitFinding { - +func NewMsgSubmitFinding(pid, fid, title, detail, hash string, operator sdk.AccAddress, level SeverityLevel) *MsgSubmitFinding { return &MsgSubmitFinding{ ProgramId: pid, FindingId: fid, Title: title, - Description: desc, + FindingHash: hash, SubmitterAddress: operator.String(), SeverityLevel: level, + Detail: detail, } } @@ -166,15 +163,15 @@ func (msg MsgSubmitFinding) ValidateBasic() error { } // NewMsgEditFinding submit a new finding. -func NewMsgEditFinding(pid, fid, title, desc string, operator sdk.AccAddress, level SeverityLevel) *MsgEditFinding { - +func NewMsgEditFinding(pid, fid, title, detail, hash string, operator sdk.AccAddress, level SeverityLevel) *MsgEditFinding { return &MsgEditFinding{ ProgramId: pid, FindingId: fid, Title: title, - Description: desc, + FindingHash: hash, SubmitterAddress: operator.String(), SeverityLevel: level, + Detail: detail, } } @@ -216,34 +213,34 @@ func (msg MsgEditFinding) ValidateBasic() error { return nil } -func NewMsgOpenProgram(pid string, accAddr sdk.AccAddress) *MsgOpenProgram { - return &MsgOpenProgram{ +func NewMsgActivateProgram(pid string, accAddr sdk.AccAddress) *MsgActivateProgram { + return &MsgActivateProgram{ ProgramId: pid, OperatorAddress: accAddr.String(), } } // Route implements sdk.Msg interface. -func (msg MsgOpenProgram) Route() string { return RouterKey } +func (msg MsgActivateProgram) Route() string { return RouterKey } // Type implements sdk.Msg interface. -func (msg MsgOpenProgram) Type() string { return TypeMsgOpenProgram } +func (msg MsgActivateProgram) Type() string { return TypeMsgActivateProgram } // GetSigners implements sdk.Msg interface. It returns the address(es) that // must sign over msg.GetSignBytes(). -func (msg MsgOpenProgram) GetSigners() []sdk.AccAddress { +func (msg MsgActivateProgram) GetSigners() []sdk.AccAddress { cAddr, _ := sdk.AccAddressFromBech32(msg.OperatorAddress) return []sdk.AccAddress{cAddr} } // GetSignBytes implements the sdk.Msg interface, returns the message bytes to sign over. -func (msg MsgOpenProgram) GetSignBytes() []byte { +func (msg MsgActivateProgram) GetSignBytes() []byte { bz := ModuleCdc.MustMarshalJSON(&msg) return sdk.MustSortJSON(bz) } // ValidateBasic implements the sdk.Msg interface. -func (msg MsgOpenProgram) ValidateBasic() error { +func (msg MsgActivateProgram) ValidateBasic() error { _, err := sdk.AccAddressFromBech32(msg.OperatorAddress) if err != nil { return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "Invalid address (%s)", err.Error()) @@ -286,72 +283,28 @@ func (msg MsgCloseProgram) ValidateBasic() error { return nil } -func NewMsgAcceptFinding(findingID string, hostAddr sdk.AccAddress) *MsgAcceptFinding { - return &MsgAcceptFinding{ - FindingId: findingID, - OperatorAddress: hostAddr.String(), - } -} - -// Route implements the sdk.Msg interface. -func (msg MsgAcceptFinding) Route() string { return RouterKey } - -// Type implements the sdk.Msg interface. -func (msg MsgAcceptFinding) Type() string { return TypeMsgAcceptFinding } - -// GetSignBytes returns the message bytes to sign over. -func (msg MsgAcceptFinding) GetSignBytes() []byte { - bz := ModuleCdc.MustMarshalJSON(&msg) - return sdk.MustSortJSON(bz) -} - -// GetSigners implements the sdk.Msg interface. It returns the address(es) that -// must sign over msg.GetSignBytes(). -func (msg MsgAcceptFinding) GetSigners() []sdk.AccAddress { - // host should sign the message - hostAddr, err := sdk.AccAddressFromBech32(msg.OperatorAddress) - if err != nil { - panic(err) - } - - return []sdk.AccAddress{hostAddr} -} - -// ValidateBasic implements the sdk.Msg interface. -func (msg MsgAcceptFinding) ValidateBasic() error { - _, err := sdk.AccAddressFromBech32(msg.OperatorAddress) - if err != nil { - return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "Invalid issuer address (%s)", err.Error()) - } - - if len(msg.FindingId) == 0 { - return errors.New("empty finding-id is not allowed") - } - return nil -} - -func NewMsgRejectFinding(findingID string, hostAddr sdk.AccAddress) *MsgRejectFinding { - return &MsgRejectFinding{ +func NewMsgConfirmFinding(findingID string, hostAddr sdk.AccAddress) *MsgConfirmFinding { + return &MsgConfirmFinding{ FindingId: findingID, OperatorAddress: hostAddr.String(), } } // Route implements the sdk.Msg interface. -func (msg MsgRejectFinding) Route() string { return RouterKey } +func (msg MsgConfirmFinding) Route() string { return RouterKey } // Type implements the sdk.Msg interface. -func (msg MsgRejectFinding) Type() string { return TypeMsgRejectFinding } +func (msg MsgConfirmFinding) Type() string { return TypeMsgConfirmFinding } // GetSignBytes returns the message bytes to sign over. -func (msg MsgRejectFinding) GetSignBytes() []byte { +func (msg MsgConfirmFinding) GetSignBytes() []byte { bz := ModuleCdc.MustMarshalJSON(&msg) return sdk.MustSortJSON(bz) } // GetSigners implements the sdk.Msg interface. It returns the address(es) that // must sign over msg.GetSignBytes(). -func (msg MsgRejectFinding) GetSigners() []sdk.AccAddress { +func (msg MsgConfirmFinding) GetSigners() []sdk.AccAddress { // host should sign the message hostAddr, err := sdk.AccAddressFromBech32(msg.OperatorAddress) if err != nil { @@ -362,7 +315,7 @@ func (msg MsgRejectFinding) GetSigners() []sdk.AccAddress { } // ValidateBasic implements the sdk.Msg interface. -func (msg MsgRejectFinding) ValidateBasic() error { +func (msg MsgConfirmFinding) ValidateBasic() error { _, err := sdk.AccAddressFromBech32(msg.OperatorAddress) if err != nil { return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "Invalid issuer address (%s)", err.Error()) @@ -419,10 +372,11 @@ func (msg MsgCloseFinding) ValidateBasic() error { } // NewMsgReleaseFinding release finding. -func NewMsgReleaseFinding(fid, desc string, operator sdk.AccAddress) *MsgReleaseFinding { +func NewMsgReleaseFinding(fid, desc, poc string, operator sdk.AccAddress) *MsgReleaseFinding { return &MsgReleaseFinding{ FindingId: fid, Description: desc, + ProofOfConcept: poc, OperatorAddress: operator.String(), } } diff --git a/x/bounty/types/program.go b/x/bounty/types/program.go index 54fb5643c..062900834 100644 --- a/x/bounty/types/program.go +++ b/x/bounty/types/program.go @@ -7,17 +7,16 @@ import ( // Programs is an array of program type Programs []Program -func NewProgram(pid, name, desc string, - admin sdk.AccAddress, members []string, status ProgramStatus, levels []BountyLevel) (Program, error) { +func NewProgram(pid, name, detail string, + admin sdk.AccAddress, status ProgramStatus, levels []BountyLevel) (Program, error) { return Program{ - ProgramId: pid, - Name: name, - Description: desc, - AdminAddress: admin.String(), - MemberAccounts: members, - Status: status, - BountyLevels: levels, + ProgramId: pid, + Name: name, + Detail: detail, + AdminAddress: admin.String(), + Status: status, + BountyLevels: levels, }, nil } diff --git a/x/bounty/types/tx.pb.go b/x/bounty/types/tx.pb.go index 866a6f3dd..7f2048d1a 100644 --- a/x/bounty/types/tx.pb.go +++ b/x/bounty/types/tx.pb.go @@ -34,12 +34,11 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // MsgCreateProgram defines a SDK message for creating a new program. type MsgCreateProgram struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` - OperatorAddress string `protobuf:"bytes,3,opt,name=operator_address,json=operatorAddress,proto3" json:"operator_address,omitempty" yaml:"operator_address"` - MemberAccounts []string `protobuf:"bytes,4,rep,name=member_accounts,json=memberAccounts,proto3" json:"member_accounts,omitempty" yaml:"member_accounts"` - ProgramId string `protobuf:"bytes,5,opt,name=program_id,json=programId,proto3" json:"program_id,omitempty" yaml:"program_id"` - BountyLevels []BountyLevel `protobuf:"bytes,6,rep,name=bounty_levels,json=bountyLevels,proto3" json:"bounty_levels" yaml:"bounty_levels"` + ProgramId string `protobuf:"bytes,1,opt,name=program_id,json=programId,proto3" json:"program_id,omitempty" yaml:"program_id"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Detail string `protobuf:"bytes,3,opt,name=detail,proto3" json:"detail,omitempty"` + BountyLevels []BountyLevel `protobuf:"bytes,4,rep,name=bounty_levels,json=bountyLevels,proto3" json:"bounty_levels" yaml:"bounty_levels"` + OperatorAddress string `protobuf:"bytes,5,opt,name=operator_address,json=operatorAddress,proto3" json:"operator_address,omitempty" yaml:"operator_address"` } func (m *MsgCreateProgram) Reset() { *m = MsgCreateProgram{} } @@ -77,12 +76,11 @@ var xxx_messageInfo_MsgCreateProgram proto.InternalMessageInfo // MsgEditProgram defines a SDK message for editing a program. type MsgEditProgram struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` - OperatorAddress string `protobuf:"bytes,3,opt,name=operator_address,json=operatorAddress,proto3" json:"operator_address,omitempty" yaml:"operator_address"` - MemberAccounts []string `protobuf:"bytes,4,rep,name=member_accounts,json=memberAccounts,proto3" json:"member_accounts,omitempty" yaml:"member_accounts"` - ProgramId string `protobuf:"bytes,5,opt,name=program_id,json=programId,proto3" json:"program_id,omitempty" yaml:"program_id"` - BountyLevels []BountyLevel `protobuf:"bytes,6,rep,name=bounty_levels,json=bountyLevels,proto3" json:"bounty_levels" yaml:"bounty_levels"` + ProgramId string `protobuf:"bytes,1,opt,name=program_id,json=programId,proto3" json:"program_id,omitempty" yaml:"program_id"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Detail string `protobuf:"bytes,3,opt,name=detail,proto3" json:"detail,omitempty"` + BountyLevels []BountyLevel `protobuf:"bytes,4,rep,name=bounty_levels,json=bountyLevels,proto3" json:"bounty_levels" yaml:"bounty_levels"` + OperatorAddress string `protobuf:"bytes,5,opt,name=operator_address,json=operatorAddress,proto3" json:"operator_address,omitempty" yaml:"operator_address"` } func (m *MsgEditProgram) Reset() { *m = MsgEditProgram{} } @@ -192,23 +190,23 @@ func (m *MsgEditProgramResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgEditProgramResponse proto.InternalMessageInfo -type MsgOpenProgram struct { +type MsgActivateProgram struct { ProgramId string `protobuf:"bytes,1,opt,name=program_id,json=programId,proto3" json:"program_id,omitempty" yaml:"program_id"` OperatorAddress string `protobuf:"bytes,2,opt,name=operator_address,json=operatorAddress,proto3" json:"operator_address,omitempty" yaml:"operator_address"` } -func (m *MsgOpenProgram) Reset() { *m = MsgOpenProgram{} } -func (m *MsgOpenProgram) String() string { return proto.CompactTextString(m) } -func (*MsgOpenProgram) ProtoMessage() {} -func (*MsgOpenProgram) Descriptor() ([]byte, []int) { +func (m *MsgActivateProgram) Reset() { *m = MsgActivateProgram{} } +func (m *MsgActivateProgram) String() string { return proto.CompactTextString(m) } +func (*MsgActivateProgram) ProtoMessage() {} +func (*MsgActivateProgram) Descriptor() ([]byte, []int) { return fileDescriptor_1e4b4296bac3db30, []int{4} } -func (m *MsgOpenProgram) XXX_Unmarshal(b []byte) error { +func (m *MsgActivateProgram) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgOpenProgram) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgActivateProgram) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgOpenProgram.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgActivateProgram.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -218,33 +216,33 @@ func (m *MsgOpenProgram) XXX_Marshal(b []byte, deterministic bool) ([]byte, erro return b[:n], nil } } -func (m *MsgOpenProgram) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgOpenProgram.Merge(m, src) +func (m *MsgActivateProgram) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgActivateProgram.Merge(m, src) } -func (m *MsgOpenProgram) XXX_Size() int { +func (m *MsgActivateProgram) XXX_Size() int { return m.Size() } -func (m *MsgOpenProgram) XXX_DiscardUnknown() { - xxx_messageInfo_MsgOpenProgram.DiscardUnknown(m) +func (m *MsgActivateProgram) XXX_DiscardUnknown() { + xxx_messageInfo_MsgActivateProgram.DiscardUnknown(m) } -var xxx_messageInfo_MsgOpenProgram proto.InternalMessageInfo +var xxx_messageInfo_MsgActivateProgram proto.InternalMessageInfo -type MsgOpenProgramResponse struct { +type MsgActivateProgramResponse struct { } -func (m *MsgOpenProgramResponse) Reset() { *m = MsgOpenProgramResponse{} } -func (m *MsgOpenProgramResponse) String() string { return proto.CompactTextString(m) } -func (*MsgOpenProgramResponse) ProtoMessage() {} -func (*MsgOpenProgramResponse) Descriptor() ([]byte, []int) { +func (m *MsgActivateProgramResponse) Reset() { *m = MsgActivateProgramResponse{} } +func (m *MsgActivateProgramResponse) String() string { return proto.CompactTextString(m) } +func (*MsgActivateProgramResponse) ProtoMessage() {} +func (*MsgActivateProgramResponse) Descriptor() ([]byte, []int) { return fileDescriptor_1e4b4296bac3db30, []int{5} } -func (m *MsgOpenProgramResponse) XXX_Unmarshal(b []byte) error { +func (m *MsgActivateProgramResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgOpenProgramResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgActivateProgramResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgOpenProgramResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgActivateProgramResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -254,17 +252,17 @@ func (m *MsgOpenProgramResponse) XXX_Marshal(b []byte, deterministic bool) ([]by return b[:n], nil } } -func (m *MsgOpenProgramResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgOpenProgramResponse.Merge(m, src) +func (m *MsgActivateProgramResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgActivateProgramResponse.Merge(m, src) } -func (m *MsgOpenProgramResponse) XXX_Size() int { +func (m *MsgActivateProgramResponse) XXX_Size() int { return m.Size() } -func (m *MsgOpenProgramResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgOpenProgramResponse.DiscardUnknown(m) +func (m *MsgActivateProgramResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgActivateProgramResponse.DiscardUnknown(m) } -var xxx_messageInfo_MsgOpenProgramResponse proto.InternalMessageInfo +var xxx_messageInfo_MsgActivateProgramResponse proto.InternalMessageInfo type MsgCloseProgram struct { ProgramId string `protobuf:"bytes,1,opt,name=program_id,json=programId,proto3" json:"program_id,omitempty" yaml:"program_id"` @@ -345,10 +343,10 @@ type MsgSubmitFinding struct { ProgramId string `protobuf:"bytes,1,opt,name=program_id,json=programId,proto3" json:"program_id,omitempty" yaml:"program_id"` FindingId string `protobuf:"bytes,2,opt,name=finding_id,json=findingId,proto3" json:"finding_id,omitempty" yaml:"finding_id"` Title string `protobuf:"bytes,3,opt,name=title,proto3" json:"title,omitempty"` - Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` - FindingHash string `protobuf:"bytes,5,opt,name=finding_hash,json=findingHash,proto3" json:"finding_hash,omitempty" yaml:"finding_hash"` - SubmitterAddress string `protobuf:"bytes,6,opt,name=submitter_address,json=submitterAddress,proto3" json:"submitter_address,omitempty" yaml:"submitter_address"` - SeverityLevel SeverityLevel `protobuf:"varint,7,opt,name=severity_level,json=severityLevel,proto3,enum=shentu.bounty.v1.SeverityLevel" json:"severity_level,omitempty" yaml:"severity_level"` + FindingHash string `protobuf:"bytes,4,opt,name=finding_hash,json=findingHash,proto3" json:"finding_hash,omitempty" yaml:"finding_hash"` + SubmitterAddress string `protobuf:"bytes,5,opt,name=submitter_address,json=submitterAddress,proto3" json:"submitter_address,omitempty" yaml:"submitter_address"` + SeverityLevel SeverityLevel `protobuf:"varint,6,opt,name=severity_level,json=severityLevel,proto3,enum=shentu.bounty.v1.SeverityLevel" json:"severity_level,omitempty" yaml:"severity_level"` + Detail string `protobuf:"bytes,7,opt,name=detail,proto3" json:"detail,omitempty"` } func (m *MsgSubmitFinding) Reset() { *m = MsgSubmitFinding{} } @@ -426,9 +424,10 @@ type MsgEditFinding struct { ProgramId string `protobuf:"bytes,1,opt,name=program_id,json=programId,proto3" json:"program_id,omitempty" yaml:"program_id"` FindingId string `protobuf:"bytes,2,opt,name=finding_id,json=findingId,proto3" json:"finding_id,omitempty" yaml:"finding_id"` Title string `protobuf:"bytes,3,opt,name=title,proto3" json:"title,omitempty"` - Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` + FindingHash string `protobuf:"bytes,4,opt,name=finding_hash,json=findingHash,proto3" json:"finding_hash,omitempty" yaml:"finding_hash"` SubmitterAddress string `protobuf:"bytes,5,opt,name=submitter_address,json=submitterAddress,proto3" json:"submitter_address,omitempty" yaml:"submitter_address"` SeverityLevel SeverityLevel `protobuf:"varint,6,opt,name=severity_level,json=severityLevel,proto3,enum=shentu.bounty.v1.SeverityLevel" json:"severity_level,omitempty" yaml:"severity_level"` + Detail string `protobuf:"bytes,7,opt,name=detail,proto3" json:"detail,omitempty"` } func (m *MsgEditFinding) Reset() { *m = MsgEditFinding{} } @@ -501,25 +500,25 @@ func (m *MsgEditFindingResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgEditFindingResponse proto.InternalMessageInfo -// MsgAcceptFinding defines a message to accept a finding to an existing finding. -type MsgAcceptFinding struct { +// MsgConfirmFinding defines a message to accept a finding to an existing finding. +type MsgConfirmFinding struct { FindingId string `protobuf:"bytes,1,opt,name=finding_id,json=findingId,proto3" json:"finding_id,omitempty" yaml:"finding_id"` OperatorAddress string `protobuf:"bytes,2,opt,name=operator_address,json=operatorAddress,proto3" json:"operator_address,omitempty" yaml:"operator_address"` Status FindingStatus `protobuf:"varint,3,opt,name=status,proto3,enum=shentu.bounty.v1.FindingStatus" json:"status,omitempty" yaml:"status"` } -func (m *MsgAcceptFinding) Reset() { *m = MsgAcceptFinding{} } -func (m *MsgAcceptFinding) String() string { return proto.CompactTextString(m) } -func (*MsgAcceptFinding) ProtoMessage() {} -func (*MsgAcceptFinding) Descriptor() ([]byte, []int) { +func (m *MsgConfirmFinding) Reset() { *m = MsgConfirmFinding{} } +func (m *MsgConfirmFinding) String() string { return proto.CompactTextString(m) } +func (*MsgConfirmFinding) ProtoMessage() {} +func (*MsgConfirmFinding) Descriptor() ([]byte, []int) { return fileDescriptor_1e4b4296bac3db30, []int{12} } -func (m *MsgAcceptFinding) XXX_Unmarshal(b []byte) error { +func (m *MsgConfirmFinding) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgAcceptFinding) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgConfirmFinding) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgAcceptFinding.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgConfirmFinding.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -529,73 +528,34 @@ func (m *MsgAcceptFinding) XXX_Marshal(b []byte, deterministic bool) ([]byte, er return b[:n], nil } } -func (m *MsgAcceptFinding) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgAcceptFinding.Merge(m, src) +func (m *MsgConfirmFinding) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgConfirmFinding.Merge(m, src) } -func (m *MsgAcceptFinding) XXX_Size() int { +func (m *MsgConfirmFinding) XXX_Size() int { return m.Size() } -func (m *MsgAcceptFinding) XXX_DiscardUnknown() { - xxx_messageInfo_MsgAcceptFinding.DiscardUnknown(m) +func (m *MsgConfirmFinding) XXX_DiscardUnknown() { + xxx_messageInfo_MsgConfirmFinding.DiscardUnknown(m) } -var xxx_messageInfo_MsgAcceptFinding proto.InternalMessageInfo +var xxx_messageInfo_MsgConfirmFinding proto.InternalMessageInfo -// MsgAcceptFindingResponse defines the Msg/AcceptFinding response type. -type MsgAcceptFindingResponse struct { +// MsgConfirmFindingResponse defines the Msg/AcceptFinding response type. +type MsgConfirmFindingResponse struct { } -func (m *MsgAcceptFindingResponse) Reset() { *m = MsgAcceptFindingResponse{} } -func (m *MsgAcceptFindingResponse) String() string { return proto.CompactTextString(m) } -func (*MsgAcceptFindingResponse) ProtoMessage() {} -func (*MsgAcceptFindingResponse) Descriptor() ([]byte, []int) { +func (m *MsgConfirmFindingResponse) Reset() { *m = MsgConfirmFindingResponse{} } +func (m *MsgConfirmFindingResponse) String() string { return proto.CompactTextString(m) } +func (*MsgConfirmFindingResponse) ProtoMessage() {} +func (*MsgConfirmFindingResponse) Descriptor() ([]byte, []int) { return fileDescriptor_1e4b4296bac3db30, []int{13} } -func (m *MsgAcceptFindingResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgAcceptFindingResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgAcceptFindingResponse.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 *MsgAcceptFindingResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgAcceptFindingResponse.Merge(m, src) -} -func (m *MsgAcceptFindingResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgAcceptFindingResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgAcceptFindingResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgAcceptFindingResponse proto.InternalMessageInfo - -// MsgRejectFinding defines a message to reject a finding to an existing finding. -type MsgRejectFinding struct { - FindingId string `protobuf:"bytes,1,opt,name=finding_id,json=findingId,proto3" json:"finding_id,omitempty" yaml:"finding_id"` - OperatorAddress string `protobuf:"bytes,2,opt,name=operator_address,json=operatorAddress,proto3" json:"operator_address,omitempty" yaml:"operator_address"` -} - -func (m *MsgRejectFinding) Reset() { *m = MsgRejectFinding{} } -func (m *MsgRejectFinding) String() string { return proto.CompactTextString(m) } -func (*MsgRejectFinding) ProtoMessage() {} -func (*MsgRejectFinding) Descriptor() ([]byte, []int) { - return fileDescriptor_1e4b4296bac3db30, []int{14} -} -func (m *MsgRejectFinding) XXX_Unmarshal(b []byte) error { +func (m *MsgConfirmFindingResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgRejectFinding) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgConfirmFindingResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgRejectFinding.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgConfirmFindingResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -605,54 +565,17 @@ func (m *MsgRejectFinding) XXX_Marshal(b []byte, deterministic bool) ([]byte, er return b[:n], nil } } -func (m *MsgRejectFinding) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgRejectFinding.Merge(m, src) +func (m *MsgConfirmFindingResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgConfirmFindingResponse.Merge(m, src) } -func (m *MsgRejectFinding) XXX_Size() int { +func (m *MsgConfirmFindingResponse) XXX_Size() int { return m.Size() } -func (m *MsgRejectFinding) XXX_DiscardUnknown() { - xxx_messageInfo_MsgRejectFinding.DiscardUnknown(m) +func (m *MsgConfirmFindingResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgConfirmFindingResponse.DiscardUnknown(m) } -var xxx_messageInfo_MsgRejectFinding proto.InternalMessageInfo - -// MsgRejectFindingResponse defines the Msg/RejectFinding response type. -type MsgRejectFindingResponse struct { -} - -func (m *MsgRejectFindingResponse) Reset() { *m = MsgRejectFindingResponse{} } -func (m *MsgRejectFindingResponse) String() string { return proto.CompactTextString(m) } -func (*MsgRejectFindingResponse) ProtoMessage() {} -func (*MsgRejectFindingResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_1e4b4296bac3db30, []int{15} -} -func (m *MsgRejectFindingResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgRejectFindingResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgRejectFindingResponse.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 *MsgRejectFindingResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgRejectFindingResponse.Merge(m, src) -} -func (m *MsgRejectFindingResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgRejectFindingResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgRejectFindingResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgRejectFindingResponse proto.InternalMessageInfo +var xxx_messageInfo_MsgConfirmFindingResponse proto.InternalMessageInfo // MsgCloseFinding defines a message to close a finding to an existing finding. type MsgCloseFinding struct { @@ -664,7 +587,7 @@ func (m *MsgCloseFinding) Reset() { *m = MsgCloseFinding{} } func (m *MsgCloseFinding) String() string { return proto.CompactTextString(m) } func (*MsgCloseFinding) ProtoMessage() {} func (*MsgCloseFinding) Descriptor() ([]byte, []int) { - return fileDescriptor_1e4b4296bac3db30, []int{16} + return fileDescriptor_1e4b4296bac3db30, []int{14} } func (m *MsgCloseFinding) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -701,7 +624,7 @@ func (m *MsgCloseFindingResponse) Reset() { *m = MsgCloseFindingResponse func (m *MsgCloseFindingResponse) String() string { return proto.CompactTextString(m) } func (*MsgCloseFindingResponse) ProtoMessage() {} func (*MsgCloseFindingResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_1e4b4296bac3db30, []int{17} + return fileDescriptor_1e4b4296bac3db30, []int{15} } func (m *MsgCloseFindingResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -733,15 +656,16 @@ var xxx_messageInfo_MsgCloseFindingResponse proto.InternalMessageInfo // MsgReleaseFinding defines a message to release a finding. type MsgReleaseFinding struct { FindingId string `protobuf:"bytes,1,opt,name=finding_id,json=findingId,proto3" json:"finding_id,omitempty" yaml:"finding_id"` - Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` - OperatorAddress string `protobuf:"bytes,3,opt,name=operator_address,json=operatorAddress,proto3" json:"operator_address,omitempty" yaml:"operator_address"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty" yaml:"description"` + ProofOfConcept string `protobuf:"bytes,3,opt,name=proof_of_concept,json=proofOfConcept,proto3" json:"proof_of_concept,omitempty" yaml:"proof_of_concept"` + OperatorAddress string `protobuf:"bytes,4,opt,name=operator_address,json=operatorAddress,proto3" json:"operator_address,omitempty" yaml:"operator_address"` } func (m *MsgReleaseFinding) Reset() { *m = MsgReleaseFinding{} } func (m *MsgReleaseFinding) String() string { return proto.CompactTextString(m) } func (*MsgReleaseFinding) ProtoMessage() {} func (*MsgReleaseFinding) Descriptor() ([]byte, []int) { - return fileDescriptor_1e4b4296bac3db30, []int{18} + return fileDescriptor_1e4b4296bac3db30, []int{16} } func (m *MsgReleaseFinding) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -784,6 +708,13 @@ func (m *MsgReleaseFinding) GetDescription() string { return "" } +func (m *MsgReleaseFinding) GetProofOfConcept() string { + if m != nil { + return m.ProofOfConcept + } + return "" +} + func (m *MsgReleaseFinding) GetOperatorAddress() string { if m != nil { return m.OperatorAddress @@ -799,7 +730,7 @@ func (m *MsgReleaseFindingResponse) Reset() { *m = MsgReleaseFindingResp func (m *MsgReleaseFindingResponse) String() string { return proto.CompactTextString(m) } func (*MsgReleaseFindingResponse) ProtoMessage() {} func (*MsgReleaseFindingResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_1e4b4296bac3db30, []int{19} + return fileDescriptor_1e4b4296bac3db30, []int{17} } func (m *MsgReleaseFindingResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -833,18 +764,16 @@ func init() { proto.RegisterType((*MsgEditProgram)(nil), "shentu.bounty.v1.MsgEditProgram") proto.RegisterType((*MsgCreateProgramResponse)(nil), "shentu.bounty.v1.MsgCreateProgramResponse") proto.RegisterType((*MsgEditProgramResponse)(nil), "shentu.bounty.v1.MsgEditProgramResponse") - proto.RegisterType((*MsgOpenProgram)(nil), "shentu.bounty.v1.MsgOpenProgram") - proto.RegisterType((*MsgOpenProgramResponse)(nil), "shentu.bounty.v1.MsgOpenProgramResponse") + proto.RegisterType((*MsgActivateProgram)(nil), "shentu.bounty.v1.MsgActivateProgram") + proto.RegisterType((*MsgActivateProgramResponse)(nil), "shentu.bounty.v1.MsgActivateProgramResponse") proto.RegisterType((*MsgCloseProgram)(nil), "shentu.bounty.v1.MsgCloseProgram") proto.RegisterType((*MsgCloseProgramResponse)(nil), "shentu.bounty.v1.MsgCloseProgramResponse") proto.RegisterType((*MsgSubmitFinding)(nil), "shentu.bounty.v1.MsgSubmitFinding") proto.RegisterType((*MsgSubmitFindingResponse)(nil), "shentu.bounty.v1.MsgSubmitFindingResponse") proto.RegisterType((*MsgEditFinding)(nil), "shentu.bounty.v1.MsgEditFinding") proto.RegisterType((*MsgEditFindingResponse)(nil), "shentu.bounty.v1.MsgEditFindingResponse") - proto.RegisterType((*MsgAcceptFinding)(nil), "shentu.bounty.v1.MsgAcceptFinding") - proto.RegisterType((*MsgAcceptFindingResponse)(nil), "shentu.bounty.v1.MsgAcceptFindingResponse") - proto.RegisterType((*MsgRejectFinding)(nil), "shentu.bounty.v1.MsgRejectFinding") - proto.RegisterType((*MsgRejectFindingResponse)(nil), "shentu.bounty.v1.MsgRejectFindingResponse") + proto.RegisterType((*MsgConfirmFinding)(nil), "shentu.bounty.v1.MsgConfirmFinding") + proto.RegisterType((*MsgConfirmFindingResponse)(nil), "shentu.bounty.v1.MsgConfirmFindingResponse") proto.RegisterType((*MsgCloseFinding)(nil), "shentu.bounty.v1.MsgCloseFinding") proto.RegisterType((*MsgCloseFindingResponse)(nil), "shentu.bounty.v1.MsgCloseFindingResponse") proto.RegisterType((*MsgReleaseFinding)(nil), "shentu.bounty.v1.MsgReleaseFinding") @@ -854,69 +783,67 @@ func init() { func init() { proto.RegisterFile("shentu/bounty/v1/tx.proto", fileDescriptor_1e4b4296bac3db30) } var fileDescriptor_1e4b4296bac3db30 = []byte{ - // 977 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x57, 0x4f, 0x6f, 0xe3, 0x44, - 0x14, 0x8f, 0x93, 0x36, 0x4b, 0xa7, 0x4d, 0xda, 0x9a, 0xee, 0xd6, 0xc9, 0xee, 0xc6, 0xc1, 0x5c, - 0xb2, 0x20, 0xc5, 0x4a, 0xd9, 0x53, 0x6f, 0xcd, 0x8a, 0x15, 0x05, 0x2a, 0x90, 0x7b, 0x02, 0x21, - 0x85, 0xb1, 0x3d, 0x75, 0x8c, 0x62, 0x8f, 0xe5, 0x99, 0x44, 0x9b, 0x6f, 0xc0, 0x91, 0x23, 0x70, - 0xda, 0x33, 0xdf, 0x00, 0x3e, 0xc1, 0x1e, 0xf7, 0xc8, 0xc9, 0x42, 0xad, 0x84, 0x38, 0x70, 0x8a, - 0x84, 0xb8, 0x22, 0xcf, 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x0a, 0xd2, 0x7e, - 0xb4, 0x16, 0x92, 0xb0, 0x8f, 0x40, 0x23, 0x3b, 0x18, 0x94, 0x07, 0x3d, 0x83, 0x59, 0x11, 0xf4, - 0xd2, 0x1f, 0xad, 0x38, 0xe8, 0x31, 0xfd, 0xea, 0xa0, 0xc7, 0xe4, 0xbd, 0x75, 0x88, 0xb4, 0xf6, - 0x6c, 0x0b, 0x2e, 0xd7, 0x9e, 0xc1, 0xac, 0xd0, 0x5e, 0xda, 0xe2, 0xc2, 0x0b, 0xb2, 0xed, 0xad, - 0xfc, 0x82, 0x0c, 0x66, 0xc5, 0x05, 0xa5, 0xad, 0x28, 0xc9, 0x6d, 0xcc, 0xff, 0x27, 0xb9, 0x8d, - 0xe9, 0x1f, 0xad, 0x85, 0x24, 0xec, 0x3a, 0x68, 0xe6, 0xba, 0xc5, 0x9b, 0x2b, 0xb4, 0xa5, 0x41, - 0xed, 0xb7, 0xaf, 0x01, 0x8a, 0xef, 0x18, 0x7e, 0xf0, 0xe2, 0xb2, 0x23, 0xbc, 0xbc, 0xec, 0x08, - 0x3f, 0x5d, 0x76, 0x84, 0xaf, 0xae, 0x3a, 0x95, 0x97, 0x57, 0x9d, 0xca, 0x8f, 0x57, 0x9d, 0xca, - 0xa7, 0x03, 0xcb, 0xa6, 0xe3, 0xa9, 0xde, 0x37, 0xb0, 0xa3, 0x72, 0xc2, 0x0b, 0x3c, 0x75, 0x4d, - 0x18, 0xb6, 0x97, 0x68, 0x43, 0x7d, 0x16, 0xff, 0x8f, 0xa6, 0x73, 0x0f, 0x11, 0xbd, 0xce, 0xfe, - 0x44, 0xbf, 0xf3, 0x47, 0x00, 0x00, 0x00, 0xff, 0xff, 0x5b, 0xd2, 0x6c, 0x3d, 0x1f, 0x10, 0x00, - 0x00, + // 954 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x57, 0x41, 0x6f, 0xe3, 0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14, 0x61, 0xd0, 0x5f, 0xc4, + 0xff, 0x17, 0xd9, 0xb9, 0x8f, 0xa9, 0x59, 0x8b, 0xfe, 0x2c, 0x7e, 0xfe, 0x5f, 0x00, 0x00, 0x00, + 0xff, 0xff, 0x69, 0xc1, 0x5c, 0x4b, 0x07, 0x0f, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -935,18 +862,16 @@ type MsgClient interface { CreateProgram(ctx context.Context, in *MsgCreateProgram, opts ...grpc.CallOption) (*MsgCreateProgramResponse, error) // EditProgram defines a method for modifying a program. EditProgram(ctx context.Context, in *MsgEditProgram, opts ...grpc.CallOption) (*MsgEditProgramResponse, error) - // Open a program status by program_id - OpenProgram(ctx context.Context, in *MsgOpenProgram, opts ...grpc.CallOption) (*MsgOpenProgramResponse, error) + // Activate a program status by program_id + ActivateProgram(ctx context.Context, in *MsgActivateProgram, opts ...grpc.CallOption) (*MsgActivateProgramResponse, error) // Closed a program status by program_id CloseProgram(ctx context.Context, in *MsgCloseProgram, opts ...grpc.CallOption) (*MsgCloseProgramResponse, error) // SubmitFinding defines a method for submitting a new finding. SubmitFinding(ctx context.Context, in *MsgSubmitFinding, opts ...grpc.CallOption) (*MsgSubmitFindingResponse, error) // EditFinding defines a method for editing a new finding. EditFinding(ctx context.Context, in *MsgEditFinding, opts ...grpc.CallOption) (*MsgEditFindingResponse, error) - // AcceptFinding defines a method for host accept a finding. - AcceptFinding(ctx context.Context, in *MsgAcceptFinding, opts ...grpc.CallOption) (*MsgAcceptFindingResponse, error) - // RejectFinding defines a method for host reject a finding. - RejectFinding(ctx context.Context, in *MsgRejectFinding, opts ...grpc.CallOption) (*MsgRejectFindingResponse, error) + // ConfirmFinding defines a method for host confirm a finding. + ConfirmFinding(ctx context.Context, in *MsgConfirmFinding, opts ...grpc.CallOption) (*MsgConfirmFindingResponse, error) // CloseFinding defines a method for submitter or certifier close a finding CloseFinding(ctx context.Context, in *MsgCloseFinding, opts ...grpc.CallOption) (*MsgCloseFindingResponse, error) // MsgReleaseFinding defines a method for release a finding. @@ -979,9 +904,9 @@ func (c *msgClient) EditProgram(ctx context.Context, in *MsgEditProgram, opts .. return out, nil } -func (c *msgClient) OpenProgram(ctx context.Context, in *MsgOpenProgram, opts ...grpc.CallOption) (*MsgOpenProgramResponse, error) { - out := new(MsgOpenProgramResponse) - err := c.cc.Invoke(ctx, "/shentu.bounty.v1.Msg/OpenProgram", in, out, opts...) +func (c *msgClient) ActivateProgram(ctx context.Context, in *MsgActivateProgram, opts ...grpc.CallOption) (*MsgActivateProgramResponse, error) { + out := new(MsgActivateProgramResponse) + err := c.cc.Invoke(ctx, "/shentu.bounty.v1.Msg/ActivateProgram", in, out, opts...) if err != nil { return nil, err } @@ -1015,18 +940,9 @@ func (c *msgClient) EditFinding(ctx context.Context, in *MsgEditFinding, opts .. return out, nil } -func (c *msgClient) AcceptFinding(ctx context.Context, in *MsgAcceptFinding, opts ...grpc.CallOption) (*MsgAcceptFindingResponse, error) { - out := new(MsgAcceptFindingResponse) - err := c.cc.Invoke(ctx, "/shentu.bounty.v1.Msg/AcceptFinding", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) RejectFinding(ctx context.Context, in *MsgRejectFinding, opts ...grpc.CallOption) (*MsgRejectFindingResponse, error) { - out := new(MsgRejectFindingResponse) - err := c.cc.Invoke(ctx, "/shentu.bounty.v1.Msg/RejectFinding", in, out, opts...) +func (c *msgClient) ConfirmFinding(ctx context.Context, in *MsgConfirmFinding, opts ...grpc.CallOption) (*MsgConfirmFindingResponse, error) { + out := new(MsgConfirmFindingResponse) + err := c.cc.Invoke(ctx, "/shentu.bounty.v1.Msg/ConfirmFinding", in, out, opts...) if err != nil { return nil, err } @@ -1057,18 +973,16 @@ type MsgServer interface { CreateProgram(context.Context, *MsgCreateProgram) (*MsgCreateProgramResponse, error) // EditProgram defines a method for modifying a program. EditProgram(context.Context, *MsgEditProgram) (*MsgEditProgramResponse, error) - // Open a program status by program_id - OpenProgram(context.Context, *MsgOpenProgram) (*MsgOpenProgramResponse, error) + // Activate a program status by program_id + ActivateProgram(context.Context, *MsgActivateProgram) (*MsgActivateProgramResponse, error) // Closed a program status by program_id CloseProgram(context.Context, *MsgCloseProgram) (*MsgCloseProgramResponse, error) // SubmitFinding defines a method for submitting a new finding. SubmitFinding(context.Context, *MsgSubmitFinding) (*MsgSubmitFindingResponse, error) // EditFinding defines a method for editing a new finding. EditFinding(context.Context, *MsgEditFinding) (*MsgEditFindingResponse, error) - // AcceptFinding defines a method for host accept a finding. - AcceptFinding(context.Context, *MsgAcceptFinding) (*MsgAcceptFindingResponse, error) - // RejectFinding defines a method for host reject a finding. - RejectFinding(context.Context, *MsgRejectFinding) (*MsgRejectFindingResponse, error) + // ConfirmFinding defines a method for host confirm a finding. + ConfirmFinding(context.Context, *MsgConfirmFinding) (*MsgConfirmFindingResponse, error) // CloseFinding defines a method for submitter or certifier close a finding CloseFinding(context.Context, *MsgCloseFinding) (*MsgCloseFindingResponse, error) // MsgReleaseFinding defines a method for release a finding. @@ -1085,8 +999,8 @@ func (*UnimplementedMsgServer) CreateProgram(ctx context.Context, req *MsgCreate func (*UnimplementedMsgServer) EditProgram(ctx context.Context, req *MsgEditProgram) (*MsgEditProgramResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method EditProgram not implemented") } -func (*UnimplementedMsgServer) OpenProgram(ctx context.Context, req *MsgOpenProgram) (*MsgOpenProgramResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method OpenProgram not implemented") +func (*UnimplementedMsgServer) ActivateProgram(ctx context.Context, req *MsgActivateProgram) (*MsgActivateProgramResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ActivateProgram not implemented") } func (*UnimplementedMsgServer) CloseProgram(ctx context.Context, req *MsgCloseProgram) (*MsgCloseProgramResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CloseProgram not implemented") @@ -1097,11 +1011,8 @@ func (*UnimplementedMsgServer) SubmitFinding(ctx context.Context, req *MsgSubmit func (*UnimplementedMsgServer) EditFinding(ctx context.Context, req *MsgEditFinding) (*MsgEditFindingResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method EditFinding not implemented") } -func (*UnimplementedMsgServer) AcceptFinding(ctx context.Context, req *MsgAcceptFinding) (*MsgAcceptFindingResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method AcceptFinding not implemented") -} -func (*UnimplementedMsgServer) RejectFinding(ctx context.Context, req *MsgRejectFinding) (*MsgRejectFindingResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method RejectFinding not implemented") +func (*UnimplementedMsgServer) ConfirmFinding(ctx context.Context, req *MsgConfirmFinding) (*MsgConfirmFindingResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ConfirmFinding not implemented") } func (*UnimplementedMsgServer) CloseFinding(ctx context.Context, req *MsgCloseFinding) (*MsgCloseFindingResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CloseFinding not implemented") @@ -1150,20 +1061,20 @@ func _Msg_EditProgram_Handler(srv interface{}, ctx context.Context, dec func(int return interceptor(ctx, in, info, handler) } -func _Msg_OpenProgram_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgOpenProgram) +func _Msg_ActivateProgram_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgActivateProgram) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(MsgServer).OpenProgram(ctx, in) + return srv.(MsgServer).ActivateProgram(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/shentu.bounty.v1.Msg/OpenProgram", + FullMethod: "/shentu.bounty.v1.Msg/ActivateProgram", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).OpenProgram(ctx, req.(*MsgOpenProgram)) + return srv.(MsgServer).ActivateProgram(ctx, req.(*MsgActivateProgram)) } return interceptor(ctx, in, info, handler) } @@ -1222,38 +1133,20 @@ func _Msg_EditFinding_Handler(srv interface{}, ctx context.Context, dec func(int return interceptor(ctx, in, info, handler) } -func _Msg_AcceptFinding_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgAcceptFinding) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).AcceptFinding(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/shentu.bounty.v1.Msg/AcceptFinding", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).AcceptFinding(ctx, req.(*MsgAcceptFinding)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_RejectFinding_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgRejectFinding) +func _Msg_ConfirmFinding_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgConfirmFinding) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(MsgServer).RejectFinding(ctx, in) + return srv.(MsgServer).ConfirmFinding(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/shentu.bounty.v1.Msg/RejectFinding", + FullMethod: "/shentu.bounty.v1.Msg/ConfirmFinding", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).RejectFinding(ctx, req.(*MsgRejectFinding)) + return srv.(MsgServer).ConfirmFinding(ctx, req.(*MsgConfirmFinding)) } return interceptor(ctx, in, info, handler) } @@ -1307,8 +1200,8 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ Handler: _Msg_EditProgram_Handler, }, { - MethodName: "OpenProgram", - Handler: _Msg_OpenProgram_Handler, + MethodName: "ActivateProgram", + Handler: _Msg_ActivateProgram_Handler, }, { MethodName: "CloseProgram", @@ -1323,12 +1216,8 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ Handler: _Msg_EditFinding_Handler, }, { - MethodName: "AcceptFinding", - Handler: _Msg_AcceptFinding_Handler, - }, - { - MethodName: "RejectFinding", - Handler: _Msg_RejectFinding_Handler, + MethodName: "ConfirmFinding", + Handler: _Msg_ConfirmFinding_Handler, }, { MethodName: "CloseFinding", @@ -1363,6 +1252,13 @@ func (m *MsgCreateProgram) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.OperatorAddress) > 0 { + i -= len(m.OperatorAddress) + copy(dAtA[i:], m.OperatorAddress) + i = encodeVarintTx(dAtA, i, uint64(len(m.OperatorAddress))) + i-- + dAtA[i] = 0x2a + } if len(m.BountyLevels) > 0 { for iNdEx := len(m.BountyLevels) - 1; iNdEx >= 0; iNdEx-- { { @@ -1374,44 +1270,28 @@ func (m *MsgCreateProgram) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintTx(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x32 - } - } - if len(m.ProgramId) > 0 { - i -= len(m.ProgramId) - copy(dAtA[i:], m.ProgramId) - i = encodeVarintTx(dAtA, i, uint64(len(m.ProgramId))) - i-- - dAtA[i] = 0x2a - } - if len(m.MemberAccounts) > 0 { - for iNdEx := len(m.MemberAccounts) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.MemberAccounts[iNdEx]) - copy(dAtA[i:], m.MemberAccounts[iNdEx]) - i = encodeVarintTx(dAtA, i, uint64(len(m.MemberAccounts[iNdEx]))) - i-- dAtA[i] = 0x22 } } - if len(m.OperatorAddress) > 0 { - i -= len(m.OperatorAddress) - copy(dAtA[i:], m.OperatorAddress) - i = encodeVarintTx(dAtA, i, uint64(len(m.OperatorAddress))) + if len(m.Detail) > 0 { + i -= len(m.Detail) + copy(dAtA[i:], m.Detail) + i = encodeVarintTx(dAtA, i, uint64(len(m.Detail))) i-- dAtA[i] = 0x1a } - if len(m.Description) > 0 { - i -= len(m.Description) - copy(dAtA[i:], m.Description) - i = encodeVarintTx(dAtA, i, uint64(len(m.Description))) - i-- - dAtA[i] = 0x12 - } if len(m.Name) > 0 { i -= len(m.Name) copy(dAtA[i:], m.Name) i = encodeVarintTx(dAtA, i, uint64(len(m.Name))) i-- + dAtA[i] = 0x12 + } + if len(m.ProgramId) > 0 { + i -= len(m.ProgramId) + copy(dAtA[i:], m.ProgramId) + i = encodeVarintTx(dAtA, i, uint64(len(m.ProgramId))) + i-- dAtA[i] = 0xa } return len(dAtA) - i, nil @@ -1437,6 +1317,13 @@ func (m *MsgEditProgram) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.OperatorAddress) > 0 { + i -= len(m.OperatorAddress) + copy(dAtA[i:], m.OperatorAddress) + i = encodeVarintTx(dAtA, i, uint64(len(m.OperatorAddress))) + i-- + dAtA[i] = 0x2a + } if len(m.BountyLevels) > 0 { for iNdEx := len(m.BountyLevels) - 1; iNdEx >= 0; iNdEx-- { { @@ -1448,44 +1335,28 @@ func (m *MsgEditProgram) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintTx(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x32 - } - } - if len(m.ProgramId) > 0 { - i -= len(m.ProgramId) - copy(dAtA[i:], m.ProgramId) - i = encodeVarintTx(dAtA, i, uint64(len(m.ProgramId))) - i-- - dAtA[i] = 0x2a - } - if len(m.MemberAccounts) > 0 { - for iNdEx := len(m.MemberAccounts) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.MemberAccounts[iNdEx]) - copy(dAtA[i:], m.MemberAccounts[iNdEx]) - i = encodeVarintTx(dAtA, i, uint64(len(m.MemberAccounts[iNdEx]))) - i-- dAtA[i] = 0x22 } } - if len(m.OperatorAddress) > 0 { - i -= len(m.OperatorAddress) - copy(dAtA[i:], m.OperatorAddress) - i = encodeVarintTx(dAtA, i, uint64(len(m.OperatorAddress))) + if len(m.Detail) > 0 { + i -= len(m.Detail) + copy(dAtA[i:], m.Detail) + i = encodeVarintTx(dAtA, i, uint64(len(m.Detail))) i-- dAtA[i] = 0x1a } - if len(m.Description) > 0 { - i -= len(m.Description) - copy(dAtA[i:], m.Description) - i = encodeVarintTx(dAtA, i, uint64(len(m.Description))) - i-- - dAtA[i] = 0x12 - } if len(m.Name) > 0 { i -= len(m.Name) copy(dAtA[i:], m.Name) i = encodeVarintTx(dAtA, i, uint64(len(m.Name))) i-- + dAtA[i] = 0x12 + } + if len(m.ProgramId) > 0 { + i -= len(m.ProgramId) + copy(dAtA[i:], m.ProgramId) + i = encodeVarintTx(dAtA, i, uint64(len(m.ProgramId))) + i-- dAtA[i] = 0xa } return len(dAtA) - i, nil @@ -1537,7 +1408,7 @@ func (m *MsgEditProgramResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } -func (m *MsgOpenProgram) Marshal() (dAtA []byte, err error) { +func (m *MsgActivateProgram) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1547,12 +1418,12 @@ func (m *MsgOpenProgram) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgOpenProgram) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgActivateProgram) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgOpenProgram) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgActivateProgram) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1574,7 +1445,7 @@ func (m *MsgOpenProgram) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *MsgOpenProgramResponse) Marshal() (dAtA []byte, err error) { +func (m *MsgActivateProgramResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1584,12 +1455,12 @@ func (m *MsgOpenProgramResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgOpenProgramResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgActivateProgramResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgOpenProgramResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgActivateProgramResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1677,30 +1548,30 @@ func (m *MsgSubmitFinding) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.Detail) > 0 { + i -= len(m.Detail) + copy(dAtA[i:], m.Detail) + i = encodeVarintTx(dAtA, i, uint64(len(m.Detail))) + i-- + dAtA[i] = 0x3a + } if m.SeverityLevel != 0 { i = encodeVarintTx(dAtA, i, uint64(m.SeverityLevel)) i-- - dAtA[i] = 0x38 + dAtA[i] = 0x30 } if len(m.SubmitterAddress) > 0 { i -= len(m.SubmitterAddress) copy(dAtA[i:], m.SubmitterAddress) i = encodeVarintTx(dAtA, i, uint64(len(m.SubmitterAddress))) i-- - dAtA[i] = 0x32 + dAtA[i] = 0x2a } if len(m.FindingHash) > 0 { i -= len(m.FindingHash) copy(dAtA[i:], m.FindingHash) i = encodeVarintTx(dAtA, i, uint64(len(m.FindingHash))) i-- - dAtA[i] = 0x2a - } - if len(m.Description) > 0 { - i -= len(m.Description) - copy(dAtA[i:], m.Description) - i = encodeVarintTx(dAtA, i, uint64(len(m.Description))) - i-- dAtA[i] = 0x22 } if len(m.Title) > 0 { @@ -1770,6 +1641,13 @@ func (m *MsgEditFinding) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.Detail) > 0 { + i -= len(m.Detail) + copy(dAtA[i:], m.Detail) + i = encodeVarintTx(dAtA, i, uint64(len(m.Detail))) + i-- + dAtA[i] = 0x3a + } if m.SeverityLevel != 0 { i = encodeVarintTx(dAtA, i, uint64(m.SeverityLevel)) i-- @@ -1782,10 +1660,10 @@ func (m *MsgEditFinding) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x2a } - if len(m.Description) > 0 { - i -= len(m.Description) - copy(dAtA[i:], m.Description) - i = encodeVarintTx(dAtA, i, uint64(len(m.Description))) + if len(m.FindingHash) > 0 { + i -= len(m.FindingHash) + copy(dAtA[i:], m.FindingHash) + i = encodeVarintTx(dAtA, i, uint64(len(m.FindingHash))) i-- dAtA[i] = 0x22 } @@ -1836,7 +1714,7 @@ func (m *MsgEditFindingResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } -func (m *MsgAcceptFinding) Marshal() (dAtA []byte, err error) { +func (m *MsgConfirmFinding) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1846,12 +1724,12 @@ func (m *MsgAcceptFinding) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgAcceptFinding) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgConfirmFinding) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgAcceptFinding) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgConfirmFinding) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1878,67 +1756,7 @@ func (m *MsgAcceptFinding) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *MsgAcceptFindingResponse) 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 *MsgAcceptFindingResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgAcceptFindingResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *MsgRejectFinding) 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 *MsgRejectFinding) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgRejectFinding) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.OperatorAddress) > 0 { - i -= len(m.OperatorAddress) - copy(dAtA[i:], m.OperatorAddress) - i = encodeVarintTx(dAtA, i, uint64(len(m.OperatorAddress))) - i-- - dAtA[i] = 0x12 - } - if len(m.FindingId) > 0 { - i -= len(m.FindingId) - copy(dAtA[i:], m.FindingId) - i = encodeVarintTx(dAtA, i, uint64(len(m.FindingId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgRejectFindingResponse) Marshal() (dAtA []byte, err error) { +func (m *MsgConfirmFindingResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1948,12 +1766,12 @@ func (m *MsgRejectFindingResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgRejectFindingResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgConfirmFindingResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgRejectFindingResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgConfirmFindingResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -2046,6 +1864,13 @@ func (m *MsgReleaseFinding) MarshalToSizedBuffer(dAtA []byte) (int, error) { copy(dAtA[i:], m.OperatorAddress) i = encodeVarintTx(dAtA, i, uint64(len(m.OperatorAddress))) i-- + dAtA[i] = 0x22 + } + if len(m.ProofOfConcept) > 0 { + i -= len(m.ProofOfConcept) + copy(dAtA[i:], m.ProofOfConcept) + i = encodeVarintTx(dAtA, i, uint64(len(m.ProofOfConcept))) + i-- dAtA[i] = 0x1a } if len(m.Description) > 0 { @@ -2105,25 +1930,15 @@ func (m *MsgCreateProgram) Size() (n int) { } var l int _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.Description) + l = len(m.ProgramId) if l > 0 { n += 1 + l + sovTx(uint64(l)) } - l = len(m.OperatorAddress) + l = len(m.Name) if l > 0 { n += 1 + l + sovTx(uint64(l)) } - if len(m.MemberAccounts) > 0 { - for _, s := range m.MemberAccounts { - l = len(s) - n += 1 + l + sovTx(uint64(l)) - } - } - l = len(m.ProgramId) + l = len(m.Detail) if l > 0 { n += 1 + l + sovTx(uint64(l)) } @@ -2133,6 +1948,10 @@ func (m *MsgCreateProgram) Size() (n int) { n += 1 + l + sovTx(uint64(l)) } } + l = len(m.OperatorAddress) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } return n } @@ -2142,25 +1961,15 @@ func (m *MsgEditProgram) Size() (n int) { } var l int _ = l - l = len(m.Name) + l = len(m.ProgramId) if l > 0 { n += 1 + l + sovTx(uint64(l)) } - l = len(m.Description) + l = len(m.Name) if l > 0 { n += 1 + l + sovTx(uint64(l)) } - l = len(m.OperatorAddress) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - if len(m.MemberAccounts) > 0 { - for _, s := range m.MemberAccounts { - l = len(s) - n += 1 + l + sovTx(uint64(l)) - } - } - l = len(m.ProgramId) + l = len(m.Detail) if l > 0 { n += 1 + l + sovTx(uint64(l)) } @@ -2170,6 +1979,10 @@ func (m *MsgEditProgram) Size() (n int) { n += 1 + l + sovTx(uint64(l)) } } + l = len(m.OperatorAddress) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } return n } @@ -2191,7 +2004,7 @@ func (m *MsgEditProgramResponse) Size() (n int) { return n } -func (m *MsgOpenProgram) Size() (n int) { +func (m *MsgActivateProgram) Size() (n int) { if m == nil { return 0 } @@ -2208,7 +2021,7 @@ func (m *MsgOpenProgram) Size() (n int) { return n } -func (m *MsgOpenProgramResponse) Size() (n int) { +func (m *MsgActivateProgramResponse) Size() (n int) { if m == nil { return 0 } @@ -2261,10 +2074,6 @@ func (m *MsgSubmitFinding) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - l = len(m.Description) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } l = len(m.FindingHash) if l > 0 { n += 1 + l + sovTx(uint64(l)) @@ -2276,6 +2085,10 @@ func (m *MsgSubmitFinding) Size() (n int) { if m.SeverityLevel != 0 { n += 1 + sovTx(uint64(m.SeverityLevel)) } + l = len(m.Detail) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } return n } @@ -2306,7 +2119,7 @@ func (m *MsgEditFinding) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - l = len(m.Description) + l = len(m.FindingHash) if l > 0 { n += 1 + l + sovTx(uint64(l)) } @@ -2317,6 +2130,10 @@ func (m *MsgEditFinding) Size() (n int) { if m.SeverityLevel != 0 { n += 1 + sovTx(uint64(m.SeverityLevel)) } + l = len(m.Detail) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } return n } @@ -2329,7 +2146,7 @@ func (m *MsgEditFindingResponse) Size() (n int) { return n } -func (m *MsgAcceptFinding) Size() (n int) { +func (m *MsgConfirmFinding) Size() (n int) { if m == nil { return 0 } @@ -2349,33 +2166,7 @@ func (m *MsgAcceptFinding) Size() (n int) { return n } -func (m *MsgAcceptFindingResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *MsgRejectFinding) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.FindingId) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.OperatorAddress) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - return n -} - -func (m *MsgRejectFindingResponse) Size() (n int) { +func (m *MsgConfirmFindingResponse) Size() (n int) { if m == nil { return 0 } @@ -2424,6 +2215,10 @@ func (m *MsgReleaseFinding) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } + l = len(m.ProofOfConcept) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } l = len(m.OperatorAddress) if l > 0 { n += 1 + l + sovTx(uint64(l)) @@ -2477,7 +2272,7 @@ func (m *MsgCreateProgram) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ProgramId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2505,11 +2300,11 @@ func (m *MsgCreateProgram) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Name = string(dAtA[iNdEx:postIndex]) + m.ProgramId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2537,11 +2332,11 @@ func (m *MsgCreateProgram) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Description = string(dAtA[iNdEx:postIndex]) + m.Name = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OperatorAddress", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Detail", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2569,13 +2364,13 @@ func (m *MsgCreateProgram) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.OperatorAddress = string(dAtA[iNdEx:postIndex]) + m.Detail = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MemberAccounts", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field BountyLevels", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -2585,27 +2380,29 @@ func (m *MsgCreateProgram) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthTx } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthTx } if postIndex > l { return io.ErrUnexpectedEOF } - m.MemberAccounts = append(m.MemberAccounts, string(dAtA[iNdEx:postIndex])) + m.BountyLevels = append(m.BountyLevels, BountyLevel{}) + if err := m.BountyLevels[len(m.BountyLevels)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProgramId", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field OperatorAddress", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2633,41 +2430,7 @@ func (m *MsgCreateProgram) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.ProgramId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BountyLevels", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.BountyLevels = append(m.BountyLevels, BountyLevel{}) - if err := m.BountyLevels[len(m.BountyLevels)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.OperatorAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -2721,7 +2484,7 @@ func (m *MsgEditProgram) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ProgramId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2749,11 +2512,11 @@ func (m *MsgEditProgram) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Name = string(dAtA[iNdEx:postIndex]) + m.ProgramId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2781,11 +2544,11 @@ func (m *MsgEditProgram) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Description = string(dAtA[iNdEx:postIndex]) + m.Name = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OperatorAddress", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Detail", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2813,13 +2576,13 @@ func (m *MsgEditProgram) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.OperatorAddress = string(dAtA[iNdEx:postIndex]) + m.Detail = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MemberAccounts", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field BountyLevels", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -2829,61 +2592,31 @@ func (m *MsgEditProgram) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthTx } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthTx } if postIndex > l { return io.ErrUnexpectedEOF } - m.MemberAccounts = append(m.MemberAccounts, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProgramId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - 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 ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF + m.BountyLevels = append(m.BountyLevels, BountyLevel{}) + if err := m.BountyLevels[len(m.BountyLevels)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } - m.ProgramId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 6: + case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BountyLevels", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field OperatorAddress", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -2893,25 +2626,23 @@ func (m *MsgEditProgram) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthTx } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthTx } if postIndex > l { return io.ErrUnexpectedEOF } - m.BountyLevels = append(m.BountyLevels, BountyLevel{}) - if err := m.BountyLevels[len(m.BountyLevels)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.OperatorAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -3034,7 +2765,7 @@ func (m *MsgEditProgramResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgOpenProgram) Unmarshal(dAtA []byte) error { +func (m *MsgActivateProgram) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3057,10 +2788,10 @@ func (m *MsgOpenProgram) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgOpenProgram: wiretype end group for non-group") + return fmt.Errorf("proto: MsgActivateProgram: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgOpenProgram: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgActivateProgram: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -3148,7 +2879,7 @@ func (m *MsgOpenProgram) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgOpenProgramResponse) Unmarshal(dAtA []byte) error { +func (m *MsgActivateProgramResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3171,10 +2902,10 @@ func (m *MsgOpenProgramResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgOpenProgramResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgActivateProgramResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgOpenProgramResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgActivateProgramResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -3489,7 +3220,7 @@ func (m *MsgSubmitFinding) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field FindingHash", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3517,11 +3248,11 @@ func (m *MsgSubmitFinding) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Description = string(dAtA[iNdEx:postIndex]) + m.FindingHash = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FindingHash", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SubmitterAddress", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3549,13 +3280,13 @@ func (m *MsgSubmitFinding) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.FindingHash = string(dAtA[iNdEx:postIndex]) + m.SubmitterAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SubmitterAddress", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SeverityLevel", wireType) } - var stringLen uint64 + m.SeverityLevel = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -3565,29 +3296,16 @@ func (m *MsgSubmitFinding) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.SeverityLevel |= SeverityLevel(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SubmitterAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SeverityLevel", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Detail", wireType) } - m.SeverityLevel = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -3597,11 +3315,24 @@ func (m *MsgSubmitFinding) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.SeverityLevel |= SeverityLevel(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Detail = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) @@ -3800,7 +3531,7 @@ func (m *MsgEditFinding) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field FindingHash", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3828,7 +3559,7 @@ func (m *MsgEditFinding) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Description = string(dAtA[iNdEx:postIndex]) + m.FindingHash = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 5: if wireType != 2 { @@ -3881,6 +3612,38 @@ func (m *MsgEditFinding) Unmarshal(dAtA []byte) error { break } } + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Detail", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + 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 ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Detail = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) @@ -3952,7 +3715,7 @@ func (m *MsgEditFindingResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgAcceptFinding) Unmarshal(dAtA []byte) error { +func (m *MsgConfirmFinding) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3975,10 +3738,10 @@ func (m *MsgAcceptFinding) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgAcceptFinding: wiretype end group for non-group") + return fmt.Errorf("proto: MsgConfirmFinding: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgAcceptFinding: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgConfirmFinding: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -4085,7 +3848,7 @@ func (m *MsgAcceptFinding) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgAcceptFindingResponse) Unmarshal(dAtA []byte) error { +func (m *MsgConfirmFindingResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4108,10 +3871,10 @@ func (m *MsgAcceptFindingResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgAcceptFindingResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgConfirmFindingResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgAcceptFindingResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgConfirmFindingResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -4135,7 +3898,7 @@ func (m *MsgAcceptFindingResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgRejectFinding) Unmarshal(dAtA []byte) error { +func (m *MsgCloseFinding) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4158,10 +3921,10 @@ func (m *MsgRejectFinding) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgRejectFinding: wiretype end group for non-group") + return fmt.Errorf("proto: MsgCloseFinding: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgRejectFinding: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgCloseFinding: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -4249,7 +4012,7 @@ func (m *MsgRejectFinding) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgRejectFindingResponse) Unmarshal(dAtA []byte) error { +func (m *MsgCloseFindingResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4272,10 +4035,10 @@ func (m *MsgRejectFindingResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgRejectFindingResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgCloseFindingResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgRejectFindingResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgCloseFindingResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -4299,7 +4062,7 @@ func (m *MsgRejectFindingResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgCloseFinding) Unmarshal(dAtA []byte) error { +func (m *MsgReleaseFinding) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4322,10 +4085,10 @@ func (m *MsgCloseFinding) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgCloseFinding: wiretype end group for non-group") + return fmt.Errorf("proto: MsgReleaseFinding: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgCloseFinding: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgReleaseFinding: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -4362,139 +4125,7 @@ func (m *MsgCloseFinding) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OperatorAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - 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 ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.OperatorAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgCloseFindingResponse) 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 ErrIntOverflowTx - } - 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: MsgCloseFindingResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgCloseFindingResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgReleaseFinding) 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 ErrIntOverflowTx - } - 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: MsgReleaseFinding: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgReleaseFinding: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FindingId", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -4522,11 +4153,11 @@ func (m *MsgReleaseFinding) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.FindingId = string(dAtA[iNdEx:postIndex]) + m.Description = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 2: + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ProofOfConcept", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -4554,9 +4185,9 @@ func (m *MsgReleaseFinding) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Description = string(dAtA[iNdEx:postIndex]) + m.ProofOfConcept = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 3: + case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OperatorAddress", wireType) } diff --git a/x/cert/keeper/certificate.go b/x/cert/keeper/certificate.go index de02f28a5..3ea288e0b 100644 --- a/x/cert/keeper/certificate.go +++ b/x/cert/keeper/certificate.go @@ -201,3 +201,16 @@ func (k Keeper) GetNextCertificateID(ctx sdk.Context) uint64 { opBz := store.Get(types.NextCertificateIDStoreKey()) return binary.LittleEndian.Uint64(opBz) } + +// IsBountyAdmin checks if an address is a bounty admin. +func (k Keeper) IsBountyAdmin(ctx sdk.Context, address sdk.AccAddress) bool { + certificates := k.GetCertificatesByTypeAndContent(ctx, types.CertificateTypeBountyAdmin, address.String()) + + for _, certificate := range certificates { + if certificate.GetContentString() == address.String() { + return true + } + } + + return false +} diff --git a/x/cert/types/cert.pb.go b/x/cert/types/cert.pb.go index 6a5302025..786a50d57 100644 --- a/x/cert/types/cert.pb.go +++ b/x/cert/types/cert.pb.go @@ -37,6 +37,7 @@ const ( CertificateTypeShieldPoolCreator CertificateType = 5 CertificateTypeIdentity CertificateType = 6 CertificateTypeGeneral CertificateType = 7 + CertificateTypeBountyAdmin CertificateType = 8 ) var CertificateType_name = map[int32]string{ @@ -48,6 +49,7 @@ var CertificateType_name = map[int32]string{ 5: "CERT_TYPE_SHIELD_POOL_CREATOR", 6: "CERT_TYPE_IDENTITY", 7: "CERT_TYPE_GENERAL", + 8: "CERT_TYPE_BOUNTY_ADMIN", } var CertificateType_value = map[string]int32{ @@ -59,6 +61,7 @@ var CertificateType_value = map[string]int32{ "CERT_TYPE_SHIELD_POOL_CREATOR": 5, "CERT_TYPE_IDENTITY": 6, "CERT_TYPE_GENERAL": 7, + "CERT_TYPE_BOUNTY_ADMIN": 8, } func (x CertificateType) String() string { @@ -535,6 +538,50 @@ func (m *General) GetContent() string { return "" } +type BountyAdmin struct { + Content string `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"` +} + +func (m *BountyAdmin) Reset() { *m = BountyAdmin{} } +func (m *BountyAdmin) String() string { return proto.CompactTextString(m) } +func (*BountyAdmin) ProtoMessage() {} +func (*BountyAdmin) Descriptor() ([]byte, []int) { + return fileDescriptor_14e43b05a8c34048, []int{11} +} +func (m *BountyAdmin) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *BountyAdmin) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_BountyAdmin.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 *BountyAdmin) XXX_Merge(src proto.Message) { + xxx_messageInfo_BountyAdmin.Merge(m, src) +} +func (m *BountyAdmin) XXX_Size() int { + return m.Size() +} +func (m *BountyAdmin) XXX_DiscardUnknown() { + xxx_messageInfo_BountyAdmin.DiscardUnknown(m) +} + +var xxx_messageInfo_BountyAdmin proto.InternalMessageInfo + +func (m *BountyAdmin) GetContent() string { + if m != nil { + return m.Content + } + return "" +} + // Platform is a genesis type for certified platform of a validator type Platform struct { ValidatorPubkey *types.Any `protobuf:"bytes,1,opt,name=validator_pubkey,json=validatorPubkey,proto3" json:"validator_pubkey,omitempty"` @@ -545,7 +592,7 @@ func (m *Platform) Reset() { *m = Platform{} } func (m *Platform) String() string { return proto.CompactTextString(m) } func (*Platform) ProtoMessage() {} func (*Platform) Descriptor() ([]byte, []int) { - return fileDescriptor_14e43b05a8c34048, []int{11} + return fileDescriptor_14e43b05a8c34048, []int{12} } func (m *Platform) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -588,7 +635,7 @@ func (m *CertifierUpdateProposal) Reset() { *m = CertifierUpdateProposal func (m *CertifierUpdateProposal) String() string { return proto.CompactTextString(m) } func (*CertifierUpdateProposal) ProtoMessage() {} func (*CertifierUpdateProposal) Descriptor() ([]byte, []int) { - return fileDescriptor_14e43b05a8c34048, []int{12} + return fileDescriptor_14e43b05a8c34048, []int{13} } func (m *CertifierUpdateProposal) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -626,7 +673,7 @@ func (m *KVPair) Reset() { *m = KVPair{} } func (m *KVPair) String() string { return proto.CompactTextString(m) } func (*KVPair) ProtoMessage() {} func (*KVPair) Descriptor() ([]byte, []int) { - return fileDescriptor_14e43b05a8c34048, []int{13} + return fileDescriptor_14e43b05a8c34048, []int{14} } func (m *KVPair) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -682,6 +729,7 @@ func init() { proto.RegisterType((*ShieldPoolCreator)(nil), "shentu.cert.v1alpha1.ShieldPoolCreator") proto.RegisterType((*Identity)(nil), "shentu.cert.v1alpha1.Identity") proto.RegisterType((*General)(nil), "shentu.cert.v1alpha1.General") + proto.RegisterType((*BountyAdmin)(nil), "shentu.cert.v1alpha1.BountyAdmin") proto.RegisterType((*Platform)(nil), "shentu.cert.v1alpha1.Platform") proto.RegisterType((*CertifierUpdateProposal)(nil), "shentu.cert.v1alpha1.CertifierUpdateProposal") proto.RegisterType((*KVPair)(nil), "shentu.cert.v1alpha1.KVPair") @@ -690,77 +738,79 @@ func init() { func init() { proto.RegisterFile("shentu/cert/v1alpha1/cert.proto", fileDescriptor_14e43b05a8c34048) } var fileDescriptor_14e43b05a8c34048 = []byte{ - // 1110 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0x4f, 0x6f, 0xe2, 0xd6, - 0x17, 0x85, 0x10, 0x02, 0x79, 0x4c, 0x12, 0xe6, 0x0d, 0x93, 0x21, 0xfe, 0xfd, 0x06, 0x53, 0xab, - 0x6a, 0xa3, 0x51, 0x83, 0xcb, 0x4c, 0xa5, 0xb6, 0xa9, 0x46, 0x1a, 0x20, 0x4c, 0xc6, 0x0a, 0xc5, - 0x96, 0x43, 0x2a, 0xa5, 0x1b, 0xeb, 0x61, 0xbf, 0x80, 0x35, 0x86, 0x67, 0x3d, 0x1b, 0x34, 0xfe, - 0x06, 0x23, 0x16, 0x55, 0x2b, 0x75, 0x8b, 0x34, 0x52, 0xbf, 0x42, 0x3e, 0x44, 0x95, 0xd5, 0xac, - 0xaa, 0x2e, 0x2a, 0x54, 0x25, 0x9b, 0xae, 0x59, 0x76, 0xd3, 0x0a, 0xff, 0xc1, 0x86, 0xcc, 0x54, - 0xb4, 0xab, 0x70, 0xdf, 0x39, 0xe7, 0xea, 0xbe, 0x7b, 0xef, 0x3b, 0x0e, 0x60, 0xad, 0x2e, 0xee, - 0xdb, 0x03, 0x5e, 0xc5, 0xd4, 0xe6, 0x87, 0x65, 0x64, 0x98, 0x5d, 0x54, 0x76, 0xa3, 0x92, 0x49, - 0x89, 0x4d, 0x60, 0xce, 0x23, 0x94, 0xdc, 0xa3, 0x80, 0xc0, 0xe4, 0x3a, 0xa4, 0x43, 0x5c, 0x02, - 0x3f, 0xfb, 0xe5, 0x71, 0x99, 0x82, 0x4a, 0xac, 0x1e, 0xb1, 0xf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, 0xe8, 0x56, 0x17, 0x53, 0x6f, 0xd6, 0x72, 0x78, 0x10, 0x49, 0xf6, - 0x19, 0xc8, 0x44, 0xda, 0x31, 0x4b, 0x18, 0xb4, 0xd0, 0x4f, 0xe8, 0x87, 0x87, 0xd1, 0xf6, 0x73, - 0x65, 0x90, 0xae, 0x0c, 0x34, 0xdd, 0xd6, 0xfb, 0x9d, 0x55, 0x25, 0x25, 0x90, 0x94, 0x28, 0x21, - 0x17, 0xab, 0xf2, 0x3f, 0x07, 0xdb, 0x22, 0x45, 0xaa, 0x81, 0x45, 0x13, 0x53, 0x64, 0x13, 0xba, - 0xaa, 0xf0, 0x10, 0xdc, 0x3d, 0xed, 0xea, 0xd8, 0xd0, 0x24, 0x42, 0x8c, 0x1a, 0xc5, 0xff, 0x46, - 0x5b, 0x06, 0x69, 0x41, 0xc3, 0x7d, 0x5b, 0xb7, 0x9d, 0x55, 0x25, 0x9f, 0x82, 0xd4, 0x31, 0xee, - 0x63, 0x8a, 0x8c, 0x55, 0x15, 0x3f, 0xc4, 0x41, 0x5a, 0x32, 0x90, 0x7d, 0x41, 0x68, 0x0f, 0x9e, - 0x83, 0xec, 0x10, 0x19, 0xba, 0x36, 0xab, 0x52, 0x31, 0x07, 0xed, 0x97, 0xd8, 0x71, 0xc5, 0xef, - 0x7b, 0x05, 0xf9, 0xab, 0xcb, 0x83, 0x9c, 0xef, 0x8a, 0x2a, 0x75, 0x4c, 0x9b, 0x94, 0xa4, 0x41, - 0xfb, 0x04, 0x3b, 0xf2, 0xce, 0x3c, 0x8f, 0xe4, 0xa6, 0x81, 0xc5, 0xc5, 0xfd, 0xf4, 0x96, 0xe0, - 0x3d, 0x36, 0xf3, 0x63, 0x02, 0x3c, 0x98, 0xfb, 0xe7, 0x99, 0xa9, 0x21, 0x1b, 0x4b, 0xae, 0x8d, - 0x21, 0x63, 0xe6, 0x8f, 0xb6, 0x6e, 0x1b, 0xd8, 0x37, 0x9a, 0x88, 0x3f, 0xba, 0xc7,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xf6, 0xeb, 0x4d, 0x21, 0xf6, 0x2d, 0x1f, 0x59, - 0x2e, 0xef, 0xab, 0x77, 0x41, 0x06, 0x7d, 0xcd, 0x9d, 0x89, 0x7f, 0xc0, 0xbf, 0xf2, 0xfe, 0x85, - 0x73, 0x77, 0xac, 0xbd, 0xe1, 0xfa, 0xca, 0x93, 0xbf, 0x03, 0x00, 0x00, 0xff, 0xff, 0x29, 0xb6, - 0xe4, 0xe2, 0xde, 0x09, 0x00, 0x00, + // 1144 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0x4f, 0x8f, 0xda, 0xc6, + 0x1b, 0x86, 0x05, 0x16, 0x76, 0x48, 0xb2, 0x8e, 0x43, 0x36, 0xc4, 0xbf, 0x5f, 0x30, 0xb5, 0xaa, + 0x36, 0x8a, 0xba, 0xb8, 0x24, 0x91, 0xda, 0x52, 0x45, 0x0a, 0xb0, 0x64, 0x63, 0x2d, 0xc1, 0x96, + 0xc3, 0x56, 0xda, 0x5e, 0xac, 0xc1, 0x9e, 0x05, 0x2b, 0xc6, 0x63, 0x8d, 0x0d, 0x8a, 0xbf, 0x41, + 0xc4, 0xa1, 0x6a, 0xa5, 0x1e, 0x7a, 0x41, 0x8a, 0xd4, 0xaf, 0x90, 0x0f, 0x51, 0xed, 0x29, 0xa7, + 0xaa, 0x27, 0x54, 0xed, 0x5e, 0x7a, 0xe6, 0xd8, 0x4b, 0x2b, 0xfc, 0x07, 0x1b, 0x76, 0x53, 0xd1, + 0x9e, 0x96, 0x77, 0x9e, 0xe7, 0x79, 0x35, 0xef, 0x9f, 0x79, 0xbc, 0x80, 0xb5, 0x07, 0xc8, 0x74, + 0x46, 0xbc, 0x8a, 0x88, 0xc3, 0x8f, 0xab, 0xd0, 0xb0, 0x06, 0xb0, 0xea, 0x45, 0x15, 0x8b, 0x60, + 0x07, 0xd3, 0x05, 0x9f, 0x50, 0xf1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 0x5a, 0xde, 0x5b, 0xd3, 0x84, 0x96, 0x54, 0x03, 0x7b, 0x91, 0xa4, 0x21, + 0x1e, 0x77, 0xba, 0x27, 0x4a, 0xfd, 0xe0, 0x85, 0xd0, 0xa1, 0x72, 0x57, 0x8e, 0x24, 0x66, 0x4c, + 0x4c, 0xfa, 0xcd, 0xcf, 0xa5, 0x44, 0x43, 0xf8, 0xe5, 0xbc, 0x94, 0x7c, 0x7f, 0x5e, 0x4a, 0xfe, + 0x7e, 0x5e, 0x4a, 0x7e, 0x7f, 0x51, 0x4a, 0xbc, 0xbf, 0x28, 0x25, 0x7e, 0xbb, 0x28, 0x25, 0xbe, + 0xe5, 0x63, 0x8b, 0xe9, 0x7f, 0x67, 0x4f, 0xf1, 0xc8, 0xd4, 0xbc, 0x79, 0x06, 0x07, 0xfc, 0x6b, + 0xff, 0x9f, 0x46, 0x6f, 0x3f, 0x7b, 0xdb, 0x9e, 0x27, 0x3d, 0xfa, 0x3b, 0x00, 0x00, 0xff, 0xff, + 0x23, 0x6a, 0x97, 0xaf, 0x50, 0x0a, 0x00, 0x00, } func (m *Certifier) Marshal() (dAtA []byte, err error) { @@ -1164,6 +1214,36 @@ func (m *General) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *BountyAdmin) 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 *BountyAdmin) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BountyAdmin) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Content) > 0 { + i -= len(m.Content) + copy(dAtA[i:], m.Content) + i = encodeVarintCert(dAtA, i, uint64(len(m.Content))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func (m *Platform) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1500,6 +1580,19 @@ func (m *General) Size() (n int) { return n } +func (m *BountyAdmin) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Content) + if l > 0 { + n += 1 + l + sovCert(uint64(l)) + } + return n +} + func (m *Platform) Size() (n int) { if m == nil { return 0 @@ -2757,6 +2850,88 @@ func (m *General) Unmarshal(dAtA []byte) error { } return nil } +func (m *BountyAdmin) 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 ErrIntOverflowCert + } + 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: BountyAdmin: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BountyAdmin: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Content", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCert + } + 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 ErrInvalidLengthCert + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthCert + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Content = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipCert(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthCert + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *Platform) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0