92 implement pop result handler (#101)

* ignite scaffold message report-pop-result challenge:Challenge --module dao

* add issuePoPRewards and fix typo

* add util validate struct and report pop test cases

* add TODOs

* replace depricated error

* fix broken import

* add error handler for failed pop issuance

* add placeholder for validator is issuer check

* added changed go.mod and go.sum

* generate docs

* reduce cognitive complexity

---------

Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>
Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>
Co-authored-by: Jürgen Eckel <juergen@riddleandcode.com>
This commit is contained in:
Lorenz Herzberger 2023-11-16 12:44:56 +01:00 committed by GitHub
parent 6ef5e3c803
commit a5cea30e26
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
17 changed files with 866 additions and 117 deletions

View File

@ -4,6 +4,7 @@ import (
errorsmod "cosmossdk.io/errors"
sdk "github.com/cosmos/cosmos-sdk/types"
assettypes "github.com/planetmint/planetmint-go/x/asset/types"
daotypes "github.com/planetmint/planetmint-go/x/dao/types"
machinetypes "github.com/planetmint/planetmint-go/x/machine/types"
)
@ -17,35 +18,62 @@ func NewCheckMachineDecorator(mk MachineKeeper) CheckMachineDecorator {
}
}
func (cm CheckMachineDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (sdk.Context, error) {
func (cm CheckMachineDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (_ sdk.Context, err error) {
for _, msg := range tx.GetMsgs() {
switch sdk.MsgTypeURL(msg) {
case "/planetmintgo.asset.MsgNotarizeAsset":
notarizeMsg, ok := msg.(*assettypes.MsgNotarizeAsset)
if ok {
_, found := cm.mk.GetMachineIndexByAddress(ctx, notarizeMsg.GetCreator())
if !found {
return ctx, errorsmod.Wrapf(machinetypes.ErrMachineNotFound, "error during CheckTx or ReCheckTx")
}
ctx, err = cm.handleNotarizeAsset(ctx, notarizeMsg)
}
case "/planetmintgo.machine.MsgAttestMachine":
attestMsg, ok := msg.(*machinetypes.MsgAttestMachine)
if ok {
if attestMsg.GetCreator() != attestMsg.Machine.GetAddress() {
return ctx, errorsmod.Wrapf(machinetypes.ErrMachineIsNotCreator, "error during CheckTx or ReCheckTx")
}
_, activated, found := cm.mk.GetTrustAnchor(ctx, attestMsg.Machine.MachineId)
if !found {
return ctx, errorsmod.Wrapf(machinetypes.ErrTrustAnchorNotFound, "error during CheckTx or ReCheckTx")
}
if activated {
return ctx, errorsmod.Wrapf(machinetypes.ErrTrustAnchorAlreadyInUse, "error during CheckTx or ReCheckTx")
}
ctx, err = cm.handleAttestMachine(ctx, attestMsg)
}
case "planetmintgo.dao.MsgReportPoPResult":
popMsg, ok := msg.(*daotypes.MsgReportPopResult)
if ok {
ctx, err = cm.handlePopResult(ctx, popMsg)
}
default:
continue
}
}
if err != nil {
return ctx, err
}
return next(ctx, tx, simulate)
}
func (cm CheckMachineDecorator) handleNotarizeAsset(ctx sdk.Context, notarizeMsg *assettypes.MsgNotarizeAsset) (sdk.Context, error) {
_, found := cm.mk.GetMachineIndexByAddress(ctx, notarizeMsg.GetCreator())
if !found {
return ctx, errorsmod.Wrapf(machinetypes.ErrMachineNotFound, "error during CheckTx or ReCheckTx")
}
return ctx, nil
}
func (cm CheckMachineDecorator) handleAttestMachine(ctx sdk.Context, attestMsg *machinetypes.MsgAttestMachine) (sdk.Context, error) {
if attestMsg.GetCreator() != attestMsg.Machine.GetAddress() {
return ctx, errorsmod.Wrapf(machinetypes.ErrMachineIsNotCreator, "error during CheckTx or ReCheckTx")
}
_, activated, found := cm.mk.GetTrustAnchor(ctx, attestMsg.Machine.MachineId)
if !found {
return ctx, errorsmod.Wrapf(machinetypes.ErrTrustAnchorNotFound, "error during CheckTx or ReCheckTx")
}
if activated {
return ctx, errorsmod.Wrapf(machinetypes.ErrTrustAnchorAlreadyInUse, "error during CheckTx or ReCheckTx")
}
return ctx, nil
}
func (cm CheckMachineDecorator) handlePopResult(ctx sdk.Context, popMsg *daotypes.MsgReportPopResult) (sdk.Context, error) {
_, found := cm.mk.GetMachineIndexByAddress(ctx, popMsg.GetCreator())
if !found {
return ctx, errorsmod.Wrapf(machinetypes.ErrMachineNotFound, "error during CheckTx or ReCheckTx")
}
return ctx, nil
}

View File

@ -75967,6 +75967,22 @@ definitions:
description: params holds all the parameters of this module.
type: object
description: QueryParamsResponse is response type for the Query/Params RPC method.
planetmintgo.dao.Challenge:
type: object
properties:
initiator:
type: string
challenger:
type: string
challengee:
type: string
height:
type: string
format: uint64
success:
type: boolean
description:
type: string
planetmintgo.dao.DistributionOrder:
type: object
properties:
@ -76031,6 +76047,8 @@ definitions:
type: object
planetmintgo.dao.MsgReissueRDDLResultResponse:
type: object
planetmintgo.dao.MsgReportPopResultResponse:
type: object
planetmintgo.dao.MsgUpdateParamsResponse:
type: object
planetmintgo.dao.Params:

View File

@ -7,7 +7,7 @@ message Challenge {
string initiator = 1;
string challenger = 2;
string challangee = 3;
string challengee = 3;
uint64 height = 4;
bool success = 5;
string description = 6;

View File

@ -2,6 +2,7 @@ syntax = "proto3";
package planetmintgo.dao;
import "planetmintgo/dao/challenge.proto";
import "planetmintgo/dao/mint_request.proto";
import "planetmintgo/dao/distribution_order.proto";
import "planetmintgo/dao/params.proto";
@ -18,9 +19,17 @@ service Msg {
rpc MintToken (MsgMintToken ) returns (MsgMintTokenResponse );
rpc ReissueRDDLResult (MsgReissueRDDLResult ) returns (MsgReissueRDDLResultResponse );
rpc DistributionResult (MsgDistributionResult ) returns (MsgDistributionResultResponse );
rpc DistributionRequest (MsgDistributionRequest) returns (MsgDistributionRequestResponse);
rpc UpdateParams (MsgUpdateParams ) returns (MsgUpdateParamsResponse );
rpc DistributionRequest (MsgDistributionRequest) returns (MsgDistributionRequestResponse);
rpc UpdateParams (MsgUpdateParams ) returns (MsgUpdateParamsResponse );
rpc ReportPopResult (MsgReportPopResult) returns (MsgReportPopResultResponse);
}
message MsgReportPopResult {
string creator = 1;
Challenge challenge = 2;
}
message MsgReportPopResultResponse {}
message MsgReissueRDDLProposal {
string creator = 1;
string proposer = 2;

36
util/validate_struct.go Normal file
View File

@ -0,0 +1,36 @@
package util
import (
"errors"
"fmt"
"reflect"
)
func ValidateStruct(s interface{}) (err error) {
structType := reflect.TypeOf(s)
kind := structType.Kind()
if kind != reflect.Struct {
return errors.New("input param should be a struct")
}
structVal := reflect.ValueOf(s)
fieldNum := structVal.NumField()
for i := 0; i < fieldNum; i++ {
field := structVal.Field(i)
fieldName := structType.Field(i).Name
isSet := field.IsValid() && !field.IsZero()
// Set to true because bool is always set (i.e. defaults to true)
if field.Type().Kind() == reflect.Bool {
isSet = true
}
if !isSet {
return fmt.Errorf("%s is not set", fieldName)
}
}
return err
}

View File

@ -25,6 +25,7 @@ func GetTxCmd() *cobra.Command {
RunE: client.ValidateCmd,
}
cmd.AddCommand(CmdReportPopResult())
cmd.AddCommand(CmdReissueRDDLProposal())
cmd.AddCommand(CmdMintToken())
cmd.AddCommand(CmdReissueRDDLResult())

View File

@ -0,0 +1,47 @@
package cli
import (
"strconv"
"encoding/json"
"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/flags"
"github.com/cosmos/cosmos-sdk/client/tx"
"github.com/planetmint/planetmint-go/x/dao/types"
"github.com/spf13/cobra"
)
var _ = strconv.Itoa(0)
func CmdReportPopResult() *cobra.Command {
cmd := &cobra.Command{
Use: "report-pop-result [challenge]",
Short: "Broadcast message report-pop-result",
Args: cobra.ExactArgs(1),
RunE: func(cmd *cobra.Command, args []string) (err error) {
argChallenge := new(types.Challenge)
err = json.Unmarshal([]byte(args[0]), argChallenge)
if err != nil {
return err
}
clientCtx, err := client.GetClientTxContext(cmd)
if err != nil {
return err
}
msg := types.NewMsgReportPopResult(
clientCtx.GetFromAddress().String(),
argChallenge,
)
if err := msg.ValidateBasic(); err != nil {
return err
}
return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg)
},
}
flags.AddTxFlagsToCmd(cmd)
return cmd
}

View File

@ -17,8 +17,8 @@ func createNChallenge(keeper *keeper.Keeper, ctx sdk.Context, n int) []types.Cha
for i := range items {
items[i].Height = uint64(i)
items[i].Initiator = fmt.Sprintf("initiator%v", i)
items[i].Challenger = fmt.Sprintf("challanger%v", i)
items[i].Challangee = fmt.Sprintf("challangee%v", i)
items[i].Challenger = fmt.Sprintf("challenger%v", i)
items[i].Challengee = fmt.Sprintf("challengee%v", i)
items[i].Success = true
items[i].Description = fmt.Sprintf("expected %v got %v", i, i)
keeper.StoreChallenge(ctx, items[i])

View File

@ -0,0 +1,50 @@
package keeper
import (
"context"
errorsmod "cosmossdk.io/errors"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/planetmint/planetmint-go/util"
"github.com/planetmint/planetmint-go/x/dao/types"
)
func (k msgServer) ReportPopResult(goCtx context.Context, msg *types.MsgReportPopResult) (*types.MsgReportPopResultResponse, error) {
ctx := sdk.UnwrapSDKContext(goCtx)
err := util.ValidateStruct(*msg.Challenge)
if err != nil {
return nil, errorsmod.Wrapf(types.ErrInvalidChallenge, err.Error())
}
if isInitiator(*msg.Challenge) {
err = k.issuePoPRewards(*msg.Challenge)
if err != nil {
return nil, errorsmod.Wrapf(types.ErrFailedPoPRewardsIssuance, err.Error())
}
}
k.StoreChallenge(ctx, *msg.Challenge)
return &types.MsgReportPopResultResponse{}, nil
}
// TODO: ensuer issuePoPrewards is only called once per PoP on all validators
func (k msgServer) issuePoPRewards(_ types.Challenge) (err error) {
//cfg := config.GetConfig()
//client := osc.NewClient(cfg.WatchmenEndpoint, 1234)
// TODO: finalize message and endpoint
//msg := osc.NewMessage("/rddl/token")
//msg.Append(challenge.Challenger)
//msg.Append(challenge.Challengee)
//err := client.Send(msg)
return err
}
// TODO: implement check if node is responsible for triggering issuance
func isInitiator(_ types.Challenge) bool {
return false
}

View File

@ -25,6 +25,74 @@ func TestMsgServer(t *testing.T) {
require.NotNil(t, ctx)
}
func TestMsgServerReportPoPResult(t *testing.T) {
initiator := sample.Secp256k1AccAddress()
challenger := sample.Secp256k1AccAddress()
challengee := sample.Secp256k1AccAddress()
description := "sample text"
testCases := []struct {
name string
msg types.MsgReportPopResult
errMsg string
}{
{
"report pop result",
types.MsgReportPopResult{
Creator: challenger.String(),
Challenge: &types.Challenge{
Initiator: initiator.String(),
Challenger: challenger.String(),
Challengee: challengee.String(),
Height: 1,
Description: description,
Success: true,
},
},
"",
},
{
"success not set",
types.MsgReportPopResult{
Creator: challenger.String(),
Challenge: &types.Challenge{
Initiator: initiator.String(),
Challenger: challenger.String(),
Challengee: challengee.String(),
Height: 1,
Description: description,
},
},
"", // no error because Go defaults bool to false
},
{
"initiator not set",
types.MsgReportPopResult{
Creator: challenger.String(),
Challenge: &types.Challenge{
Challenger: challenger.String(),
Challengee: challengee.String(),
Height: 1,
Description: description,
Success: true,
},
},
"Initiator is not set: invalid challenge",
},
}
msgServer, ctx := setupMsgServer(t)
for _, tc := range testCases {
res, err := msgServer.ReportPopResult(ctx, &tc.msg)
if tc.errMsg != "" {
assert.EqualError(t, err, tc.errMsg)
} else {
assert.Equal(t, &types.MsgReportPopResultResponse{}, res)
}
}
}
func TestMsgServerMintToken(t *testing.T) {
minter := sample.AccAddress()
beneficiary := sample.ConstBech32Addr

View File

@ -24,7 +24,10 @@ var (
)
const (
opWeightMsgReissueRDDLProposal = "op_weight_msg_reissue_rddl_proposal"
opWeightMsgReportPopResult = "op_weight_msg_report_pop_result"
// TODO: Determine the simulation weight value
defaultWeightMsgReportPopResult int = 100
opWeightMsgReissueRDDLProposal = "op_weight_msg_reissue_rddl_proposal"
// TODO: Determine the simulation weight value
defaultWeightMsgReissueRDDLProposal int = 100
@ -60,6 +63,17 @@ func (AppModule) ProposalContents(_ module.SimulationState) []simtypes.WeightedP
func (am AppModule) WeightedOperations(simState module.SimulationState) []simtypes.WeightedOperation {
operations := make([]simtypes.WeightedOperation, 0)
var weightMsgReportPopResult int
simState.AppParams.GetOrGenerate(simState.Cdc, opWeightMsgReportPopResult, &weightMsgReportPopResult, nil,
func(_ *rand.Rand) {
weightMsgReportPopResult = defaultWeightMsgReportPopResult
},
)
operations = append(operations, simulation.NewWeightedOperation(
weightMsgReportPopResult,
daosimulation.SimulateMsgReportPopResult(am.accountKeeper, am.bankKeeper, am.keeper),
))
var weightMsgReissueRDDLProposal int
simState.AppParams.GetOrGenerate(simState.Cdc, opWeightMsgReissueRDDLProposal, &weightMsgReissueRDDLProposal, nil,
func(_ *rand.Rand) {
@ -90,6 +104,14 @@ func (am AppModule) WeightedOperations(simState module.SimulationState) []simtyp
// ProposalMsgs returns msgs used for governance proposals for simulations.
func (am AppModule) ProposalMsgs(_ module.SimulationState) []simtypes.WeightedProposalMsg {
return []simtypes.WeightedProposalMsg{
simulation.NewWeightedProposalMsg(
opWeightMsgReportPopResult,
defaultWeightMsgReportPopResult,
func(r *rand.Rand, ctx sdk.Context, accs []simtypes.Account) sdk.Msg {
daosimulation.SimulateMsgReportPopResult(am.accountKeeper, am.bankKeeper, am.keeper)
return nil
},
),
simulation.NewWeightedProposalMsg(
opWeightMsgReissueRDDLProposal,
defaultWeightMsgReissueRDDLProposal,

View File

@ -0,0 +1,29 @@
package simulation
import (
"math/rand"
"github.com/cosmos/cosmos-sdk/baseapp"
sdk "github.com/cosmos/cosmos-sdk/types"
simtypes "github.com/cosmos/cosmos-sdk/types/simulation"
"github.com/planetmint/planetmint-go/x/dao/keeper"
"github.com/planetmint/planetmint-go/x/dao/types"
)
func SimulateMsgReportPopResult(
_ types.AccountKeeper,
_ types.BankKeeper,
_ keeper.Keeper,
) simtypes.Operation {
return func(r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, chainID string,
) (simtypes.OperationMsg, []simtypes.FutureOperation, error) {
simAccount, _ := simtypes.RandomAcc(r, accs)
msg := &types.MsgReportPopResult{
Creator: simAccount.Address.String(),
}
// TODO: Handling the ReportPopResult simulation
return simtypes.NoOpMsg(types.ModuleName, msg.Type(), "ReportPopResult simulation not implemented"), nil, nil
}
}

View File

@ -25,7 +25,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
type Challenge struct {
Initiator string `protobuf:"bytes,1,opt,name=initiator,proto3" json:"initiator,omitempty"`
Challenger string `protobuf:"bytes,2,opt,name=challenger,proto3" json:"challenger,omitempty"`
Challangee string `protobuf:"bytes,3,opt,name=challangee,proto3" json:"challangee,omitempty"`
Challengee string `protobuf:"bytes,3,opt,name=challengee,proto3" json:"challengee,omitempty"`
Height uint64 `protobuf:"varint,4,opt,name=height,proto3" json:"height,omitempty"`
Success bool `protobuf:"varint,5,opt,name=success,proto3" json:"success,omitempty"`
Description string `protobuf:"bytes,6,opt,name=description,proto3" json:"description,omitempty"`
@ -78,9 +78,9 @@ func (m *Challenge) GetChallenger() string {
return ""
}
func (m *Challenge) GetChallangee() string {
func (m *Challenge) GetChallengee() string {
if m != nil {
return m.Challangee
return m.Challengee
}
return ""
}
@ -113,22 +113,22 @@ func init() {
func init() { proto.RegisterFile("planetmintgo/dao/challenge.proto", fileDescriptor_04a15978d0195742) }
var fileDescriptor_04a15978d0195742 = []byte{
// 238 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x4c, 0x90, 0x31, 0x4e, 0xc4, 0x30,
0x14, 0x44, 0x63, 0x58, 0x02, 0x31, 0x0d, 0x72, 0x81, 0x5c, 0x20, 0xcb, 0xa2, 0x4a, 0x43, 0x5c,
0x70, 0x03, 0xa8, 0x68, 0x53, 0xd2, 0x79, 0x1d, 0xcb, 0xb1, 0x94, 0xf5, 0x8f, 0xe2, 0xbf, 0x12,
0xdc, 0x82, 0x0b, 0xd1, 0x53, 0x6e, 0x49, 0x89, 0x92, 0x8b, 0x20, 0x59, 0xbb, 0x1b, 0x77, 0x7f,
0xde, 0x8c, 0x46, 0xfa, 0x43, 0xe5, 0x38, 0xe8, 0x60, 0x71, 0xe7, 0x03, 0x3a, 0x50, 0x9d, 0x06,
0x65, 0x7a, 0x3d, 0x0c, 0x36, 0x38, 0xdb, 0x8c, 0x13, 0x20, 0xb0, 0xbb, 0x3c, 0xd1, 0x74, 0x1a,
0x1e, 0xbf, 0x09, 0xad, 0x5e, 0x4f, 0x29, 0xf6, 0x40, 0x2b, 0x1f, 0x3c, 0x7a, 0x8d, 0x30, 0x71,
0x22, 0x49, 0x5d, 0xb5, 0x2b, 0x60, 0x82, 0xd2, 0x73, 0xe1, 0xc4, 0x2f, 0x92, 0x9d, 0x91, 0xb3,
0xaf, 0x83, 0xb3, 0x96, 0x5f, 0x66, 0x7e, 0x22, 0xec, 0x9e, 0x96, 0xbd, 0xf5, 0xae, 0x47, 0xbe,
0x91, 0xa4, 0xde, 0xb4, 0x47, 0xc5, 0x38, 0xbd, 0x8e, 0x7b, 0x63, 0x6c, 0x8c, 0xfc, 0x4a, 0x92,
0xfa, 0xa6, 0x3d, 0x49, 0x26, 0xe9, 0x6d, 0x67, 0xa3, 0x99, 0xfc, 0x88, 0x1e, 0x02, 0x2f, 0x53,
0x65, 0x8e, 0x5e, 0xde, 0x7e, 0x66, 0x41, 0x0e, 0xb3, 0x20, 0x7f, 0xb3, 0x20, 0x5f, 0x8b, 0x28,
0x0e, 0x8b, 0x28, 0x7e, 0x17, 0x51, 0xbc, 0x2b, 0xe7, 0xb1, 0xdf, 0x6f, 0x1b, 0x03, 0x3b, 0xb5,
0xbe, 0x9d, 0x9d, 0x4f, 0x0e, 0xd4, 0x47, 0x9a, 0x09, 0x3f, 0x47, 0x1b, 0xb7, 0x65, 0xda, 0xe8,
0xf9, 0x3f, 0x00, 0x00, 0xff, 0xff, 0x46, 0x8a, 0xdb, 0xcf, 0x47, 0x01, 0x00, 0x00,
// 236 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0x90, 0xb1, 0x4e, 0xc4, 0x30,
0x10, 0x44, 0x63, 0x38, 0x02, 0x31, 0x0d, 0x72, 0x81, 0x5c, 0x20, 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0x67, 0xa2, 0xd7, 0x1e, 0xd2, 0x36, 0x9f, 0x37, 0xba, 0xff, 0x0e,
0x00, 0x00, 0xff, 0xff, 0x46, 0x26, 0x54, 0x4c, 0x47, 0x01, 0x00, 0x00,
}
func (m *Challenge) Marshal() (dAtA []byte, err error) {
@ -173,10 +173,10 @@ func (m *Challenge) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i--
dAtA[i] = 0x20
}
if len(m.Challangee) > 0 {
i -= len(m.Challangee)
copy(dAtA[i:], m.Challangee)
i = encodeVarintChallenge(dAtA, i, uint64(len(m.Challangee)))
if len(m.Challengee) > 0 {
i -= len(m.Challengee)
copy(dAtA[i:], m.Challengee)
i = encodeVarintChallenge(dAtA, i, uint64(len(m.Challengee)))
i--
dAtA[i] = 0x1a
}
@ -222,7 +222,7 @@ func (m *Challenge) Size() (n int) {
if l > 0 {
n += 1 + l + sovChallenge(uint64(l))
}
l = len(m.Challangee)
l = len(m.Challengee)
if l > 0 {
n += 1 + l + sovChallenge(uint64(l))
}
@ -340,7 +340,7 @@ func (m *Challenge) Unmarshal(dAtA []byte) error {
iNdEx = postIndex
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Challangee", wireType)
return fmt.Errorf("proto: wrong wireType = %d for field Challengee", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
@ -368,7 +368,7 @@ func (m *Challenge) Unmarshal(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Challangee = string(dAtA[iNdEx:postIndex])
m.Challengee = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 4:
if wireType != 0 {

View File

@ -8,6 +8,7 @@ import (
)
func RegisterCodec(cdc *codec.LegacyAmino) {
cdc.RegisterConcrete(&MsgReportPopResult{}, "dao/ReportPopResult", nil)
cdc.RegisterConcrete(&MsgReissueRDDLProposal{}, "dao/ReissueRDDLProposal", nil)
cdc.RegisterConcrete(&MsgMintToken{}, "dao/MintToken", nil)
cdc.RegisterConcrete(&MsgReissueRDDLResult{}, "dao/ReissueRDDLResult", nil)
@ -19,6 +20,7 @@ func RegisterCodec(cdc *codec.LegacyAmino) {
func RegisterInterfaces(registry cdctypes.InterfaceRegistry) {
registry.RegisterImplementations((*sdk.Msg)(nil),
&MsgReportPopResult{},
&MsgReissueRDDLProposal{},
&MsgMintToken{},
)

View File

@ -8,16 +8,18 @@ import (
// x/dao module sentinel errors
var (
ErrInvalidMintAddress = errorsmod.Register(ModuleName, 2, "invalid mint address")
ErrMintFailed = errorsmod.Register(ModuleName, 3, "minting failed")
ErrTransferFailed = errorsmod.Register(ModuleName, 4, "transfer failed")
ErrInvalidAddress = errorsmod.Register(ModuleName, 5, "invalid address")
ErrAlreadyMinted = errorsmod.Register(ModuleName, 6, "already minted")
ErrWrongBlockHeight = errorsmod.Register(ModuleName, 7, "wrong block height")
ErrReissuanceNotFound = errorsmod.Register(ModuleName, 8, "reissuance not found")
ErrInvalidProposer = errorsmod.Register(ModuleName, 9, "invalid proposer")
ErrTXAlreadySet = errorsmod.Register(ModuleName, 10, "tx already set")
ErrReissuanceProposal = errorsmod.Register(ModuleName, 11, "invalid reissuance proposal")
ErrReissuanceFailed = errorsmod.Register(ModuleName, 12, "reissuance of RDDL failed")
ErrDistributionNotFound = errorsmod.Register(ModuleName, 13, "distribution not found")
ErrInvalidMintAddress = errorsmod.Register(ModuleName, 2, "invalid mint address")
ErrMintFailed = errorsmod.Register(ModuleName, 3, "minting failed")
ErrTransferFailed = errorsmod.Register(ModuleName, 4, "transfer failed")
ErrInvalidAddress = errorsmod.Register(ModuleName, 5, "invalid address")
ErrAlreadyMinted = errorsmod.Register(ModuleName, 6, "already minted")
ErrWrongBlockHeight = errorsmod.Register(ModuleName, 7, "wrong block height")
ErrReissuanceNotFound = errorsmod.Register(ModuleName, 8, "reissuance not found")
ErrInvalidProposer = errorsmod.Register(ModuleName, 9, "invalid proposer")
ErrTXAlreadySet = errorsmod.Register(ModuleName, 10, "tx already set")
ErrReissuanceProposal = errorsmod.Register(ModuleName, 11, "invalid reissuance proposal")
ErrReissuanceFailed = errorsmod.Register(ModuleName, 12, "reissuance of RDDL failed")
ErrDistributionNotFound = errorsmod.Register(ModuleName, 13, "distribution not found")
ErrInvalidChallenge = errorsmod.Register(ModuleName, 14, "invalid challenge")
ErrFailedPoPRewardsIssuance = errorsmod.Register(ModuleName, 15, "PoP rewards issuance failed")
)

View File

@ -0,0 +1,47 @@
package types
import (
errorsmod "cosmossdk.io/errors"
sdk "github.com/cosmos/cosmos-sdk/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
)
const TypeMsgReportPopResult = "report_pop_result"
var _ sdk.Msg = &MsgReportPopResult{}
func NewMsgReportPopResult(creator string, challenge *Challenge) *MsgReportPopResult {
return &MsgReportPopResult{
Creator: creator,
Challenge: challenge,
}
}
func (msg *MsgReportPopResult) Route() string {
return RouterKey
}
func (msg *MsgReportPopResult) Type() string {
return TypeMsgReportPopResult
}
func (msg *MsgReportPopResult) GetSigners() []sdk.AccAddress {
creator, err := sdk.AccAddressFromBech32(msg.Creator)
if err != nil {
panic(err)
}
return []sdk.AccAddress{creator}
}
func (msg *MsgReportPopResult) GetSignBytes() []byte {
bz := ModuleCdc.MustMarshalJSON(msg)
return sdk.MustSortJSON(bz)
}
func (msg *MsgReportPopResult) ValidateBasic() error {
_, err := sdk.AccAddressFromBech32(msg.Creator)
if err != nil {
return errorsmod.Wrapf(sdkerrors.ErrInvalidAddress, "invalid creator address (%s)", err)
}
return nil
}

View File

@ -31,6 +31,94 @@ var _ = math.Inf
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
type MsgReportPopResult struct {
Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"`
Challenge *Challenge `protobuf:"bytes,2,opt,name=challenge,proto3" json:"challenge,omitempty"`
}
func (m *MsgReportPopResult) Reset() { *m = MsgReportPopResult{} }
func (m *MsgReportPopResult) String() string { return proto.CompactTextString(m) }
func (*MsgReportPopResult) ProtoMessage() {}
func (*MsgReportPopResult) Descriptor() ([]byte, []int) {
return fileDescriptor_7117c47dbc1828c7, []int{0}
}
func (m *MsgReportPopResult) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *MsgReportPopResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_MsgReportPopResult.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 *MsgReportPopResult) XXX_Merge(src proto.Message) {
xxx_messageInfo_MsgReportPopResult.Merge(m, src)
}
func (m *MsgReportPopResult) XXX_Size() int {
return m.Size()
}
func (m *MsgReportPopResult) XXX_DiscardUnknown() {
xxx_messageInfo_MsgReportPopResult.DiscardUnknown(m)
}
var xxx_messageInfo_MsgReportPopResult proto.InternalMessageInfo
func (m *MsgReportPopResult) GetCreator() string {
if m != nil {
return m.Creator
}
return ""
}
func (m *MsgReportPopResult) GetChallenge() *Challenge {
if m != nil {
return m.Challenge
}
return nil
}
type MsgReportPopResultResponse struct {
}
func (m *MsgReportPopResultResponse) Reset() { *m = MsgReportPopResultResponse{} }
func (m *MsgReportPopResultResponse) String() string { return proto.CompactTextString(m) }
func (*MsgReportPopResultResponse) ProtoMessage() {}
func (*MsgReportPopResultResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_7117c47dbc1828c7, []int{1}
}
func (m *MsgReportPopResultResponse) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *MsgReportPopResultResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_MsgReportPopResultResponse.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 *MsgReportPopResultResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_MsgReportPopResultResponse.Merge(m, src)
}
func (m *MsgReportPopResultResponse) XXX_Size() int {
return m.Size()
}
func (m *MsgReportPopResultResponse) XXX_DiscardUnknown() {
xxx_messageInfo_MsgReportPopResultResponse.DiscardUnknown(m)
}
var xxx_messageInfo_MsgReportPopResultResponse proto.InternalMessageInfo
type MsgReissueRDDLProposal struct {
Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"`
Proposer string `protobuf:"bytes,2,opt,name=proposer,proto3" json:"proposer,omitempty"`
@ -42,7 +130,7 @@ func (m *MsgReissueRDDLProposal) Reset() { *m = MsgReissueRDDLProposal{}
func (m *MsgReissueRDDLProposal) String() string { return proto.CompactTextString(m) }
func (*MsgReissueRDDLProposal) ProtoMessage() {}
func (*MsgReissueRDDLProposal) Descriptor() ([]byte, []int) {
return fileDescriptor_7117c47dbc1828c7, []int{0}
return fileDescriptor_7117c47dbc1828c7, []int{2}
}
func (m *MsgReissueRDDLProposal) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@ -106,7 +194,7 @@ func (m *MsgReissueRDDLProposalResponse) Reset() { *m = MsgReissueRDDLPr
func (m *MsgReissueRDDLProposalResponse) String() string { return proto.CompactTextString(m) }
func (*MsgReissueRDDLProposalResponse) ProtoMessage() {}
func (*MsgReissueRDDLProposalResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_7117c47dbc1828c7, []int{1}
return fileDescriptor_7117c47dbc1828c7, []int{3}
}
func (m *MsgReissueRDDLProposalResponse) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@ -144,7 +232,7 @@ func (m *MsgMintToken) Reset() { *m = MsgMintToken{} }
func (m *MsgMintToken) String() string { return proto.CompactTextString(m) }
func (*MsgMintToken) ProtoMessage() {}
func (*MsgMintToken) Descriptor() ([]byte, []int) {
return fileDescriptor_7117c47dbc1828c7, []int{2}
return fileDescriptor_7117c47dbc1828c7, []int{4}
}
func (m *MsgMintToken) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@ -194,7 +282,7 @@ func (m *MsgMintTokenResponse) Reset() { *m = MsgMintTokenResponse{} }
func (m *MsgMintTokenResponse) String() string { return proto.CompactTextString(m) }
func (*MsgMintTokenResponse) ProtoMessage() {}
func (*MsgMintTokenResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_7117c47dbc1828c7, []int{3}
return fileDescriptor_7117c47dbc1828c7, []int{5}
}
func (m *MsgMintTokenResponse) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@ -234,7 +322,7 @@ func (m *MsgReissueRDDLResult) Reset() { *m = MsgReissueRDDLResult{} }
func (m *MsgReissueRDDLResult) String() string { return proto.CompactTextString(m) }
func (*MsgReissueRDDLResult) ProtoMessage() {}
func (*MsgReissueRDDLResult) Descriptor() ([]byte, []int) {
return fileDescriptor_7117c47dbc1828c7, []int{4}
return fileDescriptor_7117c47dbc1828c7, []int{6}
}
func (m *MsgReissueRDDLResult) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@ -298,7 +386,7 @@ func (m *MsgReissueRDDLResultResponse) Reset() { *m = MsgReissueRDDLResu
func (m *MsgReissueRDDLResultResponse) String() string { return proto.CompactTextString(m) }
func (*MsgReissueRDDLResultResponse) ProtoMessage() {}
func (*MsgReissueRDDLResultResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_7117c47dbc1828c7, []int{5}
return fileDescriptor_7117c47dbc1828c7, []int{7}
}
func (m *MsgReissueRDDLResultResponse) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@ -339,7 +427,7 @@ func (m *MsgDistributionResult) Reset() { *m = MsgDistributionResult{} }
func (m *MsgDistributionResult) String() string { return proto.CompactTextString(m) }
func (*MsgDistributionResult) ProtoMessage() {}
func (*MsgDistributionResult) Descriptor() ([]byte, []int) {
return fileDescriptor_7117c47dbc1828c7, []int{6}
return fileDescriptor_7117c47dbc1828c7, []int{8}
}
func (m *MsgDistributionResult) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@ -410,7 +498,7 @@ func (m *MsgDistributionResultResponse) Reset() { *m = MsgDistributionRe
func (m *MsgDistributionResultResponse) String() string { return proto.CompactTextString(m) }
func (*MsgDistributionResultResponse) ProtoMessage() {}
func (*MsgDistributionResultResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_7117c47dbc1828c7, []int{7}
return fileDescriptor_7117c47dbc1828c7, []int{9}
}
func (m *MsgDistributionResultResponse) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@ -448,7 +536,7 @@ func (m *MsgDistributionRequest) Reset() { *m = MsgDistributionRequest{}
func (m *MsgDistributionRequest) String() string { return proto.CompactTextString(m) }
func (*MsgDistributionRequest) ProtoMessage() {}
func (*MsgDistributionRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_7117c47dbc1828c7, []int{8}
return fileDescriptor_7117c47dbc1828c7, []int{10}
}
func (m *MsgDistributionRequest) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@ -498,7 +586,7 @@ func (m *MsgDistributionRequestResponse) Reset() { *m = MsgDistributionR
func (m *MsgDistributionRequestResponse) String() string { return proto.CompactTextString(m) }
func (*MsgDistributionRequestResponse) ProtoMessage() {}
func (*MsgDistributionRequestResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_7117c47dbc1828c7, []int{9}
return fileDescriptor_7117c47dbc1828c7, []int{11}
}
func (m *MsgDistributionRequestResponse) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@ -540,7 +628,7 @@ func (m *MsgUpdateParams) Reset() { *m = MsgUpdateParams{} }
func (m *MsgUpdateParams) String() string { return proto.CompactTextString(m) }
func (*MsgUpdateParams) ProtoMessage() {}
func (*MsgUpdateParams) Descriptor() ([]byte, []int) {
return fileDescriptor_7117c47dbc1828c7, []int{10}
return fileDescriptor_7117c47dbc1828c7, []int{12}
}
func (m *MsgUpdateParams) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@ -590,7 +678,7 @@ func (m *MsgUpdateParamsResponse) Reset() { *m = MsgUpdateParamsResponse
func (m *MsgUpdateParamsResponse) String() string { return proto.CompactTextString(m) }
func (*MsgUpdateParamsResponse) ProtoMessage() {}
func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_7117c47dbc1828c7, []int{11}
return fileDescriptor_7117c47dbc1828c7, []int{13}
}
func (m *MsgUpdateParamsResponse) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@ -620,6 +708,8 @@ func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown() {
var xxx_messageInfo_MsgUpdateParamsResponse proto.InternalMessageInfo
func init() {
proto.RegisterType((*MsgReportPopResult)(nil), "planetmintgo.dao.MsgReportPopResult")
proto.RegisterType((*MsgReportPopResultResponse)(nil), "planetmintgo.dao.MsgReportPopResultResponse")
proto.RegisterType((*MsgReissueRDDLProposal)(nil), "planetmintgo.dao.MsgReissueRDDLProposal")
proto.RegisterType((*MsgReissueRDDLProposalResponse)(nil), "planetmintgo.dao.MsgReissueRDDLProposalResponse")
proto.RegisterType((*MsgMintToken)(nil), "planetmintgo.dao.MsgMintToken")
@ -637,52 +727,57 @@ func init() {
func init() { proto.RegisterFile("planetmintgo/dao/tx.proto", fileDescriptor_7117c47dbc1828c7) }
var fileDescriptor_7117c47dbc1828c7 = []byte{
// 717 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x55, 0x41, 0x4f, 0x13, 0x41,
0x14, 0xee, 0xd2, 0x0a, 0xf6, 0xd1, 0xa0, 0x2c, 0x08, 0xcb, 0x46, 0x96, 0x5a, 0x12, 0x2c, 0x24,
0x74, 0x15, 0x13, 0x0f, 0x7a, 0x30, 0x92, 0x26, 0x4a, 0xe2, 0x46, 0xb2, 0xe0, 0xc5, 0x98, 0x90,
0x6d, 0x77, 0x32, 0x4c, 0x68, 0x77, 0x96, 0x99, 0x29, 0x29, 0xf1, 0x62, 0xf8, 0x05, 0x9e, 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, 0x57, 0x37, 0x06, 0xe3, 0x51,
0xd0, 0x63, 0x98, 0x4b, 0x8e, 0xe2, 0xc6, 0x30, 0x6d, 0x21, 0x4f, 0x2d, 0x8d, 0xc6, 0x8b, 0x92,
0x79, 0x20, 0xa7, 0x8c, 0xd4, 0xbd, 0xd4, 0x28, 0x49, 0xa2, 0x6a, 0x8c, 0x48, 0x8c, 0xf2, 0x9d,
0xc0, 0x7c, 0x5a, 0xf3, 0x17, 0x47, 0x88, 0xc3, 0x99, 0x77, 0x1c, 0xd2, 0x80, 0x9e, 0x96, 0x3f,
0x40, 0xbe, 0xaf, 0x9f, 0xff, 0x4b, 0x8d, 0x10, 0xa7, 0xa8, 0x9b, 0x43, 0x29, 0x51, 0x74, 0x04,
0xb3, 0xb7, 0x5f, 0x75, 0xff, 0xdf, 0x71, 0x06, 0x7d, 0x2c, 0xf5, 0xfe, 0x28, 0xac, 0x6e, 0x9a,
0xdd, 0xbd, 0xcb, 0x8e, 0x26, 0x5d, 0x75, 0x34, 0xe9, 0x77, 0x47, 0x93, 0x3e, 0x5f, 0x6b, 0x99,
0xab, 0x6b, 0x2d, 0xf3, 0xf3, 0x5a, 0xcb, 0xbc, 0x37, 0x1c, 0x97, 0xd5, 0x5b, 0xd5, 0x52, 0x0d,
0x37, 0x8d, 0x5e, 0xc4, 0xd8, 0x72, 0xdb, 0xc1, 0x46, 0x3b, 0xfc, 0x44, 0x39, 0xf3, 0x11, 0xad,
0x4e, 0xf2, 0xd7, 0xf4, 0xa3, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x3f, 0x5c, 0xd6, 0x57, 0xc3,
0x08, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
@ -703,6 +798,7 @@ type MsgClient interface {
DistributionResult(ctx context.Context, in *MsgDistributionResult, opts ...grpc.CallOption) (*MsgDistributionResultResponse, error)
DistributionRequest(ctx context.Context, in *MsgDistributionRequest, opts ...grpc.CallOption) (*MsgDistributionRequestResponse, error)
UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error)
ReportPopResult(ctx context.Context, in *MsgReportPopResult, opts ...grpc.CallOption) (*MsgReportPopResultResponse, error)
}
type msgClient struct {
@ -767,6 +863,15 @@ func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts
return out, nil
}
func (c *msgClient) ReportPopResult(ctx context.Context, in *MsgReportPopResult, opts ...grpc.CallOption) (*MsgReportPopResultResponse, error) {
out := new(MsgReportPopResultResponse)
err := c.cc.Invoke(ctx, "/planetmintgo.dao.Msg/ReportPopResult", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// MsgServer is the server API for Msg service.
type MsgServer interface {
ReissueRDDLProposal(context.Context, *MsgReissueRDDLProposal) (*MsgReissueRDDLProposalResponse, error)
@ -775,6 +880,7 @@ type MsgServer interface {
DistributionResult(context.Context, *MsgDistributionResult) (*MsgDistributionResultResponse, error)
DistributionRequest(context.Context, *MsgDistributionRequest) (*MsgDistributionRequestResponse, error)
UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error)
ReportPopResult(context.Context, *MsgReportPopResult) (*MsgReportPopResultResponse, error)
}
// UnimplementedMsgServer can be embedded to have forward compatible implementations.
@ -799,6 +905,9 @@ func (*UnimplementedMsgServer) DistributionRequest(ctx context.Context, req *Msg
func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateParams) (*MsgUpdateParamsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented")
}
func (*UnimplementedMsgServer) ReportPopResult(ctx context.Context, req *MsgReportPopResult) (*MsgReportPopResultResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ReportPopResult not implemented")
}
func RegisterMsgServer(s grpc1.Server, srv MsgServer) {
s.RegisterService(&_Msg_serviceDesc, srv)
@ -912,6 +1021,24 @@ func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(in
return interceptor(ctx, in, info, handler)
}
func _Msg_ReportPopResult_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(MsgReportPopResult)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MsgServer).ReportPopResult(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/planetmintgo.dao.Msg/ReportPopResult",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MsgServer).ReportPopResult(ctx, req.(*MsgReportPopResult))
}
return interceptor(ctx, in, info, handler)
}
var _Msg_serviceDesc = grpc.ServiceDesc{
ServiceName: "planetmintgo.dao.Msg",
HandlerType: (*MsgServer)(nil),
@ -940,11 +1067,80 @@ var _Msg_serviceDesc = grpc.ServiceDesc{
MethodName: "UpdateParams",
Handler: _Msg_UpdateParams_Handler,
},
{
MethodName: "ReportPopResult",
Handler: _Msg_ReportPopResult_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "planetmintgo/dao/tx.proto",
}
func (m *MsgReportPopResult) 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 *MsgReportPopResult) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *MsgReportPopResult) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.Challenge != nil {
{
size, err := m.Challenge.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintTx(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x12
}
if len(m.Creator) > 0 {
i -= len(m.Creator)
copy(dAtA[i:], m.Creator)
i = encodeVarintTx(dAtA, i, uint64(len(m.Creator)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func (m *MsgReportPopResultResponse) 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 *MsgReportPopResultResponse) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *MsgReportPopResultResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
return len(dAtA) - i, nil
}
func (m *MsgReissueRDDLProposal) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
@ -1372,6 +1568,32 @@ func encodeVarintTx(dAtA []byte, offset int, v uint64) int {
dAtA[offset] = uint8(v)
return base
}
func (m *MsgReportPopResult) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.Creator)
if l > 0 {
n += 1 + l + sovTx(uint64(l))
}
if m.Challenge != nil {
l = m.Challenge.Size()
n += 1 + l + sovTx(uint64(l))
}
return n
}
func (m *MsgReportPopResultResponse) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
return n
}
func (m *MsgReissueRDDLProposal) Size() (n int) {
if m == nil {
return 0
@ -1557,6 +1779,174 @@ func sovTx(x uint64) (n int) {
func sozTx(x uint64) (n int) {
return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *MsgReportPopResult) 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: MsgReportPopResult: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: MsgReportPopResult: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Creator", 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.Creator = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Challenge", 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
}
if m.Challenge == nil {
m.Challenge = &Challenge{}
}
if err := m.Challenge.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
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 *MsgReportPopResultResponse) 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: MsgReportPopResultResponse: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: MsgReportPopResultResponse: 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 *MsgReissueRDDLProposal) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0